Mask creation recipes

Mask creation recipes are a sequence of steps, each applying an algorithm to the elastic image.

The steps can come in any almost any order and can be repeated. At the end of the final step, the illuminated pixels in the mask will be set to a value of 1 so that the final mask can be used as an AND mask to create a point in the HERFD or XES spectra.

Care is taken at the end to remove bad pixels that might have been restored by the Gaussian, polyfill, areal, or social pixel steps.

Other steps

These are mostly things that I implemented in earlier stages of development. I find the Gaussian blur works better than the lonely and social steps and the areal mean. But all of these are still there for testing purposes.

Multiply

Multiply emission image by an overall constant. The syntax is multiply by # where the number is the constant scaling factor.

Areal mean or median

Apply an areal median or mean to each pixel. The syntax is areal (median|mean) radius #. The number defines the size of the square considered around each pixel. A value of 1 means a 3x3 square, a value of 2 means a 5x5 square. The value of each pixel is set to either the mean or the median value of the pixels in the square.

The median is not implemented at this time.

Lonely pixels

Remove all the lonely pixels. A lonely pixel is one which is illuminated but is not surrounded by enough illuminated pixels. The syntax is lonely #. The number defines how many illuminated pixels are required for a pixel not to be considered lonely.

Social pixels

Include all social pixels. A social pixel is one which is not illuminated but is surrounded by enough illuminated pixels. The syntax is social #. The number defines how many of the surrounding pixels must be illuminated for the pixel to be turned on.

A recipe using these might be:

[steps]
steps = <<END
bad 400 weak 2 power 1
lonely 3
social 2
END

Development tools

Energy map

Use the energy map computed by the map task. The syntax is map # where the number is the width in eV about the emission energy. Any pixels with a value of <emission> +/- <width> will be included in the mask. Note that it makes no sense to use this step with any step other than the bad/weak step, which should precede this step.

This is not working at present.

Entire image

Use the entire image. The syntax is entire image. This step just sets all the pixels in the mask to 1 so that the entire image is used to compute the energy point. Note that it makes no sense to use this step with any step other than the bad/weak step, which should precede this step.



Xray::BLA and METIS are copyright © 2011-2014, 2016 Bruce Ravel and Jeremy Kropf – This document is copyright © 2016 Bruce Ravel

This document is licensed under The Creative Commons Attribution-ShareAlike License.

If this software and its documentation are useful to you, please consider supporting The Creative Commons.