Author Topic: New Features in CalcImage  (Read 19229 times)

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2227
  • Other duties as assigned...
    • Probe Software
Re: New Features in CalcImage
« Reply #45 on: March 20, 2017, 10:53:02 pm »
Yes, please!

Ok, I added a Copy To Clipboard button to the Align and Crop window.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Probeman

  • Emeritus
  • *****
  • Posts: 1606
  • Never sleeps...
    • John Donovan
Re: New Features in CalcImage
« Reply #46 on: March 21, 2017, 05:49:02 pm »
Yes, please!

Now you must post a cool example of why this is useful!    :D
The only stupid question is the one not asked!

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2227
  • Other duties as assigned...
    • Probe Software
Re: New Features in CalcImage
« Reply #47 on: March 23, 2017, 04:54:41 pm »
On the new align and crop feature in CalcImage described here:

http://probesoftware.com/smf/index.php?topic=41.msg5752#msg5752

I realized that it's a little ambiguous as to exactly what stage coordinates should be utilized in the final cropped map outputs.  Each map has the same stage coordinates to begin with, but because the sample or beam may have drifted during the multiple spectrometer passes (if not why are you aligning and cropping!), so they are close, but not exactly in agreement (due to the degree of alignment necessary).

Now since we want the cropped maps to all have the same stage coordinates, what is a programmer to do?  I decided to just apply the total change in stage extents, based on the reference (base) image, by taking the common offsets and applying that to all cropped images.  This means that the cropped images sizes (width and height) are very accurate, and as for the absolute stage positions... well, when the sample is drifting, who's to say!
john
« Last Edit: March 23, 2017, 05:05:09 pm by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2227
  • Other duties as assigned...
    • Probe Software
Re: New Features in CalcImage
« Reply #48 on: April 15, 2017, 11:19:22 am »
The newest version of PFE (CalcImage) fixes the "missing image" warning in the align and crop code when you have different numbers of maps per acquisition (for multiple spectrometer passes when you map more elements than you have spectrometers).

Also this new version now automatically copies specified subsequent (spectrometer pass) acquisitions (for the replicate to TDI conversion) to the \TDI folder for creating a new project in CalcImage for beam sensitive samples.
john
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2227
  • Other duties as assigned...
    • Probe Software
Re: New Features in CalcImage
« Reply #49 on: May 27, 2017, 03:33:12 pm »
As you all know if you acquire a single pixel line scan on a JEOL or Cameca instrument you get something like this:

JEOL stage scan: 1 by N pixels because the fast scan direction is up to down. The X axis is one pixel wide.

Cameca stage or beam scan and JEOL beam scan: N by 1 pixel because the fast scan dimension is left to right.  The Y dimension is one pixel high.

When you quantify such one pixel line scans in CalcImage you might get something like this:



Yes, one can hover the mouse cursor over the image and read out the Z weight percent values, but it's not very satisfactory.  And if you decide to output the images to Surfer for presentation output, you'll get this error in the Surfer Scripter app:



This is because Surfer map grids must have both axes between 2 and 32K pixels.

So I wrote some new code and attached it to the log window menu in CalcImage as seen here:



Using this new menu you simply select one PrbImg map file from Probe Image, for the selected acquisition and the software will automatically convert all maps from one pixel wide maps to 2 pixel wide maps.  This is done by merely duplicating the single scan line of data, plus adjusting the slow scan axis to be non-zero by setting it to the beam diameter (if the beam size is fully focused (0 microns), the code will set it to one micron, though this can be adjusted).

All maps with the same base name will be converted to two pixels wide, even subsequent element passes (for more than 5 element map acquisitions).

After this is complete you can create a new project using the CalcImage New Project Wizard as usual, but when selecting the PrbImg files, just browse to the \TwoPixel sub folder and select one of the converted two pixel acquisition maps.

When you are done quantifying the maps you will see the map images in CalcImage looking like this:



It looks slightly stretched in Y because there are actually two duplicate scan lines.  And now you can send the data to Surfer for presentation output as you would for any normal XY map as seen here:



However, you will probably need to tweak the Surfer plot parameters a bit depending on the aspect ratio of the line scan. But after a little mousing around changing the text sizes and labels, you can end up with something like this:



So update PFE and give it a try and let me know what you all think...
john
« Last Edit: May 28, 2017, 12:27:46 am by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2227
  • Other duties as assigned...
    • Probe Software
Re: New Features in CalcImage
« Reply #50 on: May 28, 2017, 01:34:58 pm »
OK sorry, but I changed my mind!    :D

So for this one pixel line scan to two pixel conversion feature, rather than set the two pixel dimension (slow scan direction) to the beam size diameter (which is quite arbitrary when you think about it), I decided to set the two pixel dimension to the same distance as the fast scan dimension.  In doing this, Surfer is now much happier about displaying the line scans as quant maps as seen here (note this time I'm using the Cameca coordinate system):



With this change, one can now perform "slice" operations quite easily as seen here (though the graphical elements output by the script overlap a little):



However with a minimum of clicking and dragging (just the title, image map and color scale bar) I can quickly obtain this result:



Let me know what you all think...
john
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2227
  • Other duties as assigned...
    • Probe Software
Re: New Features in CalcImage
« Reply #51 on: June 03, 2017, 01:12:56 pm »
I have, on occasion, been accused of "spoiling" our users.   ;)  But seriously, I don't think so because one of my internal criteria for judging whether a requested feature is worth implementing is simply: would I find the requested feature in question, useful and/or fun?   And this feature request is something my students and I would use in our own lab.

As you know there is an enormous number of x-ray map data types that can be output from the CalcImage quantitative mapping software.  e.g, elemental wt%, oxide wt.%, atomic %, formula basis, detection limits, analytical sensitivity, net intensities, bgd intensities, k-ratios, log wt.% and many, many more quantitative x-ray map data types.  A few examples are shown here in our latest brochure:

http://probesoftware.com/download/probesoftware%208-30-2016%20single%20pages_reduc.pdf

Anyway, at EMAS last month a bunch of us were brainstorming and Anette von der Handt asked (and was echoed by Paul Carpenter) if we could add a new menu to CalcImage, which would output all calculated data types (previously specified by the user), to the Surfer application for presentation quality output. So, one mouse click for everything output, instead of two mouses click for each data type...

This feature has now been implemented in the latest Probe for EPMA version, now available for download, as seen here:

« Last Edit: June 03, 2017, 02:54:24 pm by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2227
  • Other duties as assigned...
    • Probe Software
Re: New Features in CalcImage
« Reply #52 on: November 25, 2017, 04:50:52 pm »
As many of you know, Cameca instrument stages have a "Cartesian" orientation.   Because Golden Software's Surfer application was originally designed for GIS work, it always assumed a Cartesian coordinate system with the upper right being the X and Y maxima.   But as we know, JEOL, for some reason:

http://probesoftware.com/smf/index.php?topic=101.0

utilizes an "anti-Cartesian" stage orientation!  Originally Surfer did not handle this different stage orientation internally, and therefore I had to re-write all the JEOL stage coordinates "on the fly" to use inverted coordinates (by multiplying by -1) and then the quantitative plots would be oriented properly.  However, the slice, polygon and strip scripts still displayed the mirror image in their output.

A while ago, I asked Golden Software if they could add a reverse orientation flag to their scripting and eventually, starting in version 13 of Surfer, they added this capability.  So this weekend I finally got around to implementing this new flag for all scripts.  I think it is backwards compatible with Surfer versions prior to 13, but let me know.

Here are some JEOL CalcImage script quant output with the new reverse axes flags. First for the slice script output:



And here the polygon extraction script output:



And here the strip extraction script output:



Note that your existing default scripts will be updated automatically when you update PFE, but the "custom" scripts will not be automatically updated. But if you haven't manually edited your "custom" scripts, I've attached them below in a ZIP so you can extract them and overwrite your existing "custom" scripts in the ProgramData\Probe Software\Probe for EPMA folder.

If you have modified your "custom" scripts you will need to make the changes yourself manually by editing them.  The key change is the addition of these lines:

' If Surfer v. 13 or higher, check for JEOL axis invert
If Val(Left$(SurferApp.Version, 2)) >= Val("13") Then
If XInvert% <> 0 then SurferAxes.Item("Bottom Axis").Reverse = True
If YInvert% <> 0 then SurferAxes.Item("Left Axis").Reverse = True
End If

But there are some additional parameters being passed (the XInvert and YInvert variables), so check the custom examples attached below and contact us if you need any help.
john
« Last Edit: May 01, 2018, 06:51:30 pm by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2227
  • Other duties as assigned...
    • Probe Software
Re: New Features in CalcImage
« Reply #53 on: February 17, 2018, 03:19:18 pm »
We decided to create a new Surfer options dialog in CalcImage for specifying various Surfer output options such as plots per page, default vs. custom plot templates and other Surfer output parameters.

This change allows us to get rid of a large number of menus in the main CalcImage window for better efficiency. The new Surfer options looks like this:



Once that was done we realized that we could now implement a new menu as requested by Philipp Poeml for creating virtual standard intensities for quantification, just as we already have in Probe for EPMA. Here is the new virtual standard intensity menu:



This should be useful for mapping of nuclear materials and other elements for which we do not have readily available standards, e.g., argon... see this topic for more on using virtual standard intensities. This post shows Philipp's virtual standard calculation for Am Ma using Pu Ma and Cm Ma as calibration points:

http://probesoftware.com/smf/index.php?topic=179.msg6743#msg6743
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2227
  • Other duties as assigned...
    • Probe Software
Re: New Features in CalcImage
« Reply #54 on: February 24, 2018, 09:06:03 am »
We remapped some of the menus in CalcImage to make things easier for users.  Basically we moved the file conversion and help menus to the main CalcImage menu.  First here is the new Convert menu in CalcImage:



and here is the new Help menu in CalcImage:



I also updated the CalcImage Help file to include a detailed explanation of the .CIP file format.  Note that one can always get the help file by typing <ctrl> h from the main CalcImage window.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2227
  • Other duties as assigned...
    • Probe Software
Re: New Features in CalcImage
« Reply #55 on: May 01, 2018, 07:49:39 pm »
We fixed some minor issues in the strip and modal presentation output scripts. The latest version of Probe for EPMA will update your default scripts, but because the custom scripts are not automatically overwritten, if you haven't modified your custom output scripts you can grab a ZIP file of the updated custom scripts and manually overwrite the existing ones in your ProgramData\Probe Software\Probe for EPMA folder.  The updated custom script zip file is attached to this post:

http://probesoftware.com/smf/index.php?topic=41.msg6488#msg6488

If you have modified your custom strip output scripts you can just compare the default strip and custom strip output scripts to see what was changed.  Basically we fixed an issue with the increment value text output in the strip output scripts. A file compare of stripxy1.bas and stripxy1_Custom1.bas will reveal all. 

Basically these two lines were modified to add the InStr function:

      If InStr(XLabel$, "um") > 0  Then MicronUnits$ = Format$(Round(StripIncrement! ,0)) & "um"
      If InStr(XLabel$, "mm") > 0  Then MicronUnits$ = Format$(Round(1000 * StripIncrement! ,0)) & "um"

There are no custom modal output scripts so we just turned off "hill shading" if v13 or higher of Surfer in the default modalxy.bas script.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"