Page History
...
Code Block |
---|
[ImgAlgos.NDArrCalib] source = DetInfo(:Cspad.0) ... do_mask = yes fname_mask = mask-nda.txt |
ROI mask for ndarray (or numpy array) can also be used in any stand-alone application, for example in python code. To apply the mask in python code the data numpy array should be multiplied by the mask numpy array.
Implementation of the ROI mask conversion algorithms in calibman
The same algorithms are implemented in the Calibration Management Tool as a GUI under the tab "Mask EditorROI". The files with ndarray and geometry constants should be selected as input parameters. The names of other intermediate output files are optional. Three procedures for image reconstruction, mask editor, and mask conversion can be performed sequentially by clicking on relevant buttons. All files and images can be "Plot"-ted and "View"-ed. For now, mask file is saved in the work directory and is not deployed. In stead, its path could be used in the ImgAlgos.NDArrCalib module.
...