Versions Compared

Key

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

...

Note
  • Stages 1 and 3 should use the same geometry file in the option -g. This will guarantee that image production and mask conversion algorithms work on the same pixel maps.
  • Stage 2 may be omitted if the mask for geometry-dependent bad pixels (edge, central column, non-bound pixels) is needed only. Then command for Stage 3 should have appropriate name for input mask file.
  • Since ana-0.13.14 all roicon procedures work with numpy (*.npy) files to I/O ndarrays (see examples in command roicon -h).

 

Launching this app with -h option gives enough information about its functionality. In this note we demonstrate graphical content of the files generate in examples for this procedure. 

...

Code Block
Usage: roicon [options]
Examples:

1) Construct 2-d image (or mask-of-segments) from ndarray with image shaped as data using appropriate geometry file
         roicon -p1 -g <geometry-file> [-a <ndarray-with-image-(input)file>] [-i <image-(output)file>] [-c <control-bitword>]
  ex1:   roicon -p1 -g /reg/d/psdm/CXI/cxitut13/calib/CsPad::CalibV1/CxiDs1.0:Cspad.0/geometry/0-end.data
  ex2:   roicon -p1 -g /reg/d/psdm/CXI/cxitut13/calib/CsPad::CalibV1/CxiDs1.0:Cspad.0/geometry/0-end.data -a /reg/neh/home1/dubrovin/LCLS/CSPadAlignment-v01/calib-cxi-ds1-2014-03-19/cspad-ndarr-ave-cxii0114-r0227.dat
  ex3:   roicon -p1 -g /reg/d/psdm/CXI/cxitut13/calib/CsPad::CalibV1/CxiDs1.0:Cspad.0/geometry/0-end.data -a /reg/neh/home1/dubrovin/LCLS/CSPadAlignment-v01/calib-cxi-ds1-2014-05-15/cspad-arr-cxid2714-r0023-lysozyme-rings.npy -i image.npy
2) Create ROI mask using mask editor "med" (DO NOT FORGET to save mask in file!)
         roicon -p2 [-i <image-(input)file>] [-m <roi-mask-(output)file>]
  ex1,2: roicon -p2
  exex3:   roicon -p2 -i image.npy -m roi-mask.npy
3) Convert ROI mask to ndarray with mask shaped as data
         roicon -p3 -g <geometry-file> [-m <roi-mask-(input)file>] [-n ndarray-with-mask-(output)-file] [-c <control-bitword>]
  ex1,2: roicon -p3 -g   ex:/reg/d/psdm/CXI/cxitut13/calib/CsPad::CalibV1/CxiDs1.0:Cspad.0/geometry/0-end.data
  ex3:   roicon -p3 -g /reg/d/psdm/CXI/cxitut13/calib/CsPad::CalibV1/CxiDs1.0:Cspad.0/geometry/0-end.data -m roi-mask.npy -n ndarray-mask.npy

Optional input parameters.
Options:
  -h, --help            show this help message and exit
  -g GFNAME, --gfname=GFNAME
                        geometry file name, default = /reg/d/psdm/CXI/cxitut13
                        /calib/CsPad::CalibV1/CxiDs1.0:Cspad.0/geometry/0-end.
                        data
  -a AFNAME, --afname=AFNAME
                        input ndarray file name, default = None
  -i IFNAME, --ifname=IFNAME
                        image file name, default = mask-img.txt
  -m MFNAME, --mfname=MFNAME
                        ROI mask file name, default = mask-roi.txt
  -n NFNAME, --nfname=NFNAME
                        ndarray mask file name, default = mask-nda.txt
  -c CBITS, --cbits=CBITS
                        mask control bits, =0-none, +1-edges, +2-middle,
                        etc..., default = 65535
  -p PROC, --proc=PROC  process number: 1-construct image, 2-run mask editor
                        on image, 3-convert image mask to ndarray; default = 1
  -v, --verb            verbosity, default = False

...