Mask Editor GUI is intended to manually create/edit mask of bad pixels and save it as 2-d image and 3-d array shaped as data.
Content
Launch Mask Editor
Mask Editor GUI can be launched in lcls2 software release (>ps-4.6.0) by command
masked
with(out) optional parameters as explained in help
masked -h
Mask Editor GUI main window
Mask Editor main window consists of sub-panels listed in this section with brief description of their functionality.
Image with axes and cursor info panel
Image nested in center of the main window.
Displays assembled image of the detector or stack of panels if geometry constants are not available. Click and drag or scroll mouse on image to translate or zoom-in/out desired part of the image. At mouse release spectrum will be updated. for visible part of the image. The same operation on axis works for appropriate transformation of its dimension, changing aspect ratio.
Spectrum with statistical data
Spectral widget is displayed on the right side of the image.
It shows spectral histogram of the visible part of the image, color bar, two axes, and statistical panel on the top.
Click and drag or scroll mouse on spectrum to select its part projected on color map on image. The same works for vertical axis. Horizontal scale does the same things for histogram scale. At mouse release image will be updated.
Color bar selection
Color bar maps intensity values to color map used on image. There are eight pre-defined color maps currently available.
To change color map - click on color bar and select color map/bar from pop-up window. The color bar and Image will be updated after selection is done.
Logger
Most important info messages are displayed in the logger window located in the bottom part of the main window. By default it has low profile, but can be expanded by mouse using expansion mark on the top boarder of the logger window.
Control panel
Control panel with multiple fields allows to set imaging array and geometry constants from DB or files.
Select DB parameters
After click on the button next to DataSource: label a bunch of sequentially pop-up windows for instrument, experiment, and run number allows to set DB parameters. To terminate selection - click on highlighted-yellow title.
Select detector
After click on the button next to Detector: label pop-up menu window allows to select detector from specified DB
If geometry is available for specified DataSource and Detector the field next to geo DB will be filled out automatically.
If many geometry constants available for specified detector, click on button next to geo DB: label and select desired constants from pop-up menu window.
Select files
Use standard dialog to select I/O files
More fields
Switching button More/Less shows more or less control field between default and advanced modes. It adds fields to load geometry constants from file (button next to label geo:) and array (button next to label array DB:) for image from DB constants.
ROI control buttons
Control buttons for ROI are stacked in menu on the left side of the main window. Their functionality is described below.
Translate and zoom image
Click on Image mode button, then click and drag or scroll mouse for translation or zooming image, respectively. At release mouse button spectrum will be updated for visible part of the image.
Add ROI
Click on Add button and select ROI type from pop-up menu:
Available shapes of ROIs are self-explaining in this pop-up menu.
Adding ROI
Right after selected ROI type click on image to mark ROI control point locations as many times as it is necessary to define particular ROI shape.
Add/Remove PIXEL and PIXGROUP
Right after click on Add button and selection of PIXEL or PIXGROUP ROI, start clicking on desired pixels or click-hold-and-pan. Added pixels will be marked by color. Double click removes appropriate pixel. Input of the PIXGROUP is compleated by the click on Compl.(ete) button.
Button Cancel
Button Cancel cancels adding of non-compleated ROI if it is not too late...
Button Compl.
Button Compl. completes adding of ROI with multi-point definition like PIXGROUP and POLYGON.
Select and Delete ROIs
Currently Select mode is used in combination with Delete in order to preview deleting ROI.
Click on Select button, then on ROIs to select. Selected items will change color.
PIXEL type ROI will be selected one-by-one. PIXGROUP ROI will be selected as whole by a single click.
Invert bad pixel region
Click on button Invert then select ROIs to invert region of good/bad pixels. By default internal region of each ROI is marked as bad pixels. Operation Invert inverts this definition.
Edit mode
Click on Edit button, then on ROIs to edit. Selected for edition ROI changes color and shows control handle. Then, click and pan control handles to translate, resize or rotate ROIs.
Save/restore ROI constants
Current ROIs parameters can be saved in json file by clicking on Save button and selecting output file name
Button Load loads constants from json file and draws ROIs on image.
Mask
Button Mask creates mask for drawn ROIs and save it in files for 2-d image (with suffix "-2d") and 3-d array (for panels like in data).
References
- Mask Editor - for LCLS(1)
- Mask Editor Development Notes
- Detector Calibration Constants Deployment
- Detector geometry constants deployment
- Bad Pixel Status
- LCLS-II Calibration DB
- Private Calibration Constants
- cdb - CLI for management of calibration DB
- calibman
- Calibration Scripts Repository and Logging