A "mask" allows the user to exclude certain pixels from plots and calculations.
These might be known "bad" pixels, scattering near the beamstop, scattering near known spurious features,
etc. By default, pixels outside the data collection area are excluded, but these boundaries can be moved in.
Generally, masks fall into two categories: rule-based masks and pixel arrays.
A rule-based mask relies in an algorithm, such as "ignore all the pixels inside this circle."
An array-based mask consists of a list of pixels to be ignored. Both types of mask are currently supported by Datasqueeze.
In the mask editor window, the user has the option of adding additional masks to exclude data inside specified rows or columns,
individual pixels, inside a user-defined box or circle, outside a user-defined circle, or inside a quadrilateral
(4-sided polygon with arbitrary vertices). You want to add masks after using the Manipulate panel to symmetrize or reorient the image.
It is also possible to read in an array of pixels from a previously created file.
This file is written in the format used by Foxtrot, data processing application from the ESRF.
Note that importing a file in either rule or pixel format erases whatever masks were previously there.
However, it is possible to combine the two forms: read in a pixel array using the Import command, edit it to add shapes,
and then re-save as a pixel array.
To edit a current mask, either type the new desired value(s) in the box, or drag the blue cursor dot corresponding to that mask. For example, the first mask always excludes points outside the left-hand side of the image, and the default setting is to exclude pixels with -1 >= x. To create a new mask, select the desired mask type from the drop-down menu and then click Create. Currently available options are: "Exclude Points In Row", "Exclude Points In Column", "Exclude Points In One Pixel", "Exclude Points Inside Box", "Exclude Points Inside Circle", "Exclude Points Outside Circle", "Quadrilateral". To use the new masks, click Done. To revert to previously used masks, click Cancel. |