News:

:) If you are a member, please feel free to add your website URL to your forum profile

Main Menu

Removing "hot pixels" from map in CalcImage/Surfer?

Started by Anette von der Handt, November 20, 2015, 02:01:06 PM

Previous topic - Next topic

Anette von der Handt

Dear all,

I still have a problem with my machine where spurious intensities (always 256, 512 or rarely 768 counts) show up randomly in my maps (on all 5 spectrometers, maybe the electronics are going "bad"?). This not only looks ugly but we are also doing a lot of quant maps to estimate bulk compositions, so they can skew the data quite a bit.

Does anyone know a good way to exclude the false data points in either CalcImage or Surfer or elsewhere (and re-import) to remove these pixels (my Thermosoftware has a magic "suppress hot pixels" button)? Maybe already has a Matlab script for this to run? Extra points for "filling in" the hot pixel with interpolated data or something similar.

I hope I can eventually figure out what the problem is but until then I would like to save the already acquired maps. Any help or suggestions are appreciated.

Thanks!
Against the dark, a tall white fountain played.

Probeman

#1
Quote from: Anette von der Handt on November 20, 2015, 02:01:06 PM
Dear all,

I still have a problem with my machine where spurious intensities (always 256, 512 or rarely 768 counts) show up randomly in my maps (on all 5 spectrometers, maybe the electronics are going "bad"?). This not only looks ugly but we are also doing a lot of quant maps to estimate bulk compositions, so they can skew the data quite a bit.

Does anyone know a good way to exclude the false data points in either CalcImage or Surfer or elsewhere (and re-import) to remove these pixels (my Thermosoftware has a magic "suppress hot pixels" button)? Maybe already has a Matlab script for this to run? Extra points for "filling in" the hot pixel with interpolated data or something similar.

I hope I can eventually figure out what the problem is but until then I would like to save the already acquired maps. Any help or suggestions are appreciated.

Thanks!

First of all: throw an oscilloscope on the spectro pre-amps power supply and look for noise spikes!

As for your existing data, after you quant your maps in CalcImage, you can go into Surfer and select this button:



and then adjust your color levels manually as seen here:



Or even better, simply use the log weight percent output in CalcImage as seen here, for visualizing high and low concentration distributions:

http://smf.probesoftware.com/index.php?topic=55.msg509#msg509

and

http://smf.probesoftware.com/index.php?topic=107.msg402#msg402

You'll still see the noise spikes, but you'll also be able to the see the low level variations.
The only stupid question is the one not asked!

Joe Boesenberg

Hi All

I did some trace element mapping (Cr in olivine) over the holidays. Some of my Cr maps are really dark because I had either chromite inclusions in the olivine or a stray pixel that came out really bright, and this caused the binning to compress all of the useful data into two or three bins on the dark side. This makes the images essentially useless since it really can't be adjusted any further in brightness/contrast. Is there a way in Probe Image or a program such as ImageJ to stretch the binning on the dark end of the gray scale so I can see if there is zoning in the trace elements. I am not a photo expert and am not sure if a photo can be reparsed and binned again.


Thanks Joe
Joseph Boesenberg
Brown University
Electron Microprobe Manager/Meteoriticist

John Donovan

Quote from: Joe Boesenberg on January 05, 2026, 11:18:30 AMI did some trace element mapping (Cr in olivine) over the holidays. Some of my Cr maps are really dark because I had either chromite inclusions in the olivine or a stray pixel that came out really bright, and this caused the binning to compress all of the useful data into two or three bins on the dark side. This makes the images essentially useless since it really can't be adjusted any further in brightness/contrast. Is there a way in Probe Image or a program such as ImageJ to stretch the binning on the dark end of the gray scale so I can see if there is zoning in the trace elements. I am not a photo expert and am not sure if a photo can be reparsed and binned again.

See here for manually setting the min/max in Surfer or use the log weight percent output option in CalcImage:

https://smf.probesoftware.com/index.php?topic=634.msg3708#msg3708
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

Because you mentioned x-ray maps, I thought you have quantified the maps (what's the good of raw map data?), so I figured you could export them to Surfer:

https://www.youtube.com/watch?v=EebepH_8po8&;

and create output like this:

https://smf.probesoftware.com/index.php?topic=55.msg509#msg509

But if you can't/won't quant your x-ray maps you could just import the PrbImg files, then export them as GRD files, using the File menu in CalcImage. 

Then open them in Surfer and modify the min/max.  I think you can also select log scaling for the Z (intensity) data in Surfer.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Probeman

One can also export the PrbImg files to GRD from Probe Image:


The only stupid question is the one not asked!

JonF

Quote from: Joe Boesenberg on January 05, 2026, 11:18:30 AMa program such as ImageJ to stretch the binning on the dark end of the gray scale so I can see if there is zoning in the trace elements. I am not a photo expert and am not sure if a photo can be reparsed and binned again.

This can be done in ImageJ/Fiji as well, if you are just after the images.

First thing, you will need to convert the .prbimg file to ASCII using CalcImage. You can do this with Convert > Convert All PrbImg Files In Folder To ASCII menu item in CalcImage.
This will create a .DAT file and a .TXT file that is just an array of the individual pixel values from your map.

In ImageJ/Fiji, you can import the .TXT file via File > Import > Text Image.
From here, you now apply a threshold to your image with the Image > Adjust > Threshold item. Use the sliders to select just the pixels you want to keep i.e. the red box encompasses all your "normal" i.e. not hot pixels on the histogram. You can also type in the count rate min and max values in the appropriate text boxes. I leave "Dark Background" and "Don't reset range" check boxes selected and "Stack histogram" and "Raw values" deselected.

Hit Apply and you should see a pop up box asking whether to convert to a mask or set background pixels to NaN. I select NaN (Not a Number).

If you now open the Brightness and Contrast controls (Image > Adjust > Brightness/Contrast), you should see that the histogram range has been reset to the new minimum and maximum values.

Of course, none of this will help if there are only 1 or 2 counts difference between the different zones!