Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

by default converts the file  mask-roi.txt to mask-nda.txt

Image ModifiedImage Modified

Fig.4: Mask on the top of enumerated (color-coded) pixels (left) and result of the mask conversion to the ndarray (right).

...

Our particular goal was to make this mask for module ImgAlgos::NDArrCalib, which can be included in the psana configuration file:

 

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.

 

...