Page History
...
Code Block | ||||
---|---|---|---|---|
| ||||
(ps-4.5.26) [dubrovin@psanagpu101:~/LCLS/con-lcls2]$ epix10ka_charge_injection -k exp=ascdaq18,run=171 -d epixhr -i0 -o ./work --slice "0:144,0:192" -h usage: TEST EXAMPLE epix10ka_charge_injection -k exp=ascdaq18,run=171 -d epixhr -i0 -o ./work # with graphics epix10ka_charge_injection -k exp=ascdaq18,run=171 -d epixhr -i0 -o ./work -D # without graphics epix10ka_charge_injection -k exp=ascdaq18,run=171 -d epixhr -i0 -o ./work --slice "0:144,0:192" # select part of the panel to evaluate pixel status and plot Process charge injection data for epixhr/epix10ka optional arguments: -h, --help show this help message and exit -k DSKWARGS, --dskwargs DSKWARGS Data source parameters; string of comma-separated (no spaces) parameters for DataSource(**kwargs), ex: exp=<expname>,run=<runs>,dir=<xtc-dir>, ..., or <file- name.xtc> or files=<file-name.xtc> or pythonic dict of generic kwargs, e.g.: "{'exp':'tmoc00318', 'run':[10,11,12], 'dir':'/a/b/c/xtc'}", default = None -d DET, --det DET detector name, default = None -i IDX, --idx IDX panel index (0-15/3 for epix10ka2m/quad), default = None -b NBS, --nbs NBS number of frames to calibrate offsets, default = 4600 -n NSPACE, --nspace NSPACE space between calibrated pixels - TO BE AUTOMATED, default = 5 -o DIRREPO, --dirrepo DIRREPO repository for results, default = ./work -L LOGMODE, --logmode LOGMODE logging mode, one of CRITICAL, FATAL, ERROR, WARN, WARNING, INFO, DEBUG, NOTSET, TRACE, default = INFO -X NPOFF, --npoff NPOFF discard in fit number of points on trace around switching point, default = 10 -c CCNUM, --ccnum CCNUM step number to process (from 0 to 49) for debugging or all by default, default = None -m CCMAX, --ccmax CCMAX maximal number of steps to process(for debugging), default = 50 -s CCSKIP, --ccskip CCSKIP skip number steps in the beginning of the data file (for debugging), default = 0 -P PIXRC, --pixrc PIXRC selected pixel for graphics: comma separated pixel row and colon, ex. 23,234, default = None -S NSIGM, --nsigm NSIGM number of sigma/spread to discard outlaiers for pixel_status, default = 8 -D, --display turn off graphical display, default = True -N, --nperiods use all found saw periods of the pulser, default = True -E, --errskip flag to skip errors and keep processing (stop otherwise), default = False -C, --savechi2 save chi2 files, default = True --dirmode DIRMODE directory mode for all created directories, default = 0o2775 --filemode FILEMODE file mode for all saved files, default = 0o664 --group GROUP group ownership for all saved files, default = ps-users --slice SLICE (str) slice of the panel image 2-d array selected for plots and pixel status, FOR DEBUGGING ONLY, ex. "0:144,0:192", default = 0:,0: |
Preserving intermediate fit results for debugging
For debugging purpose, intermediate fit results are preserved in temporary *.npz file like
<repository>/<panel-id>/work/epixhr2x2_0001_19900121012401_ascdaq18_r0171_sp05_df.npz
If this file is available, data processing is omitted, but final pixel status evaluation and resulting plots can be repeated. To re-process data this file must be deleted.
Parameters for debugging
-S NSIGM, --nsigm NSIGM - defines range of the good pixel status
--slice SLICE - sets a part of the penel to be displayed on plots--slice SLICE
-D, --display ,etc.- turns off plots that reduces processing time
Plots
Charge injection map
...
At first stage pixels in the good range (as shown in table) are selected.
value | min | max | good range |
---|---|---|---|
offset | 0 | <data-bits> | (min, max) |
gain | 0 | <data-bits>/10 | (min, max) |
chi2 | 0 | unlimited | (min, max) |
neg | 1 | 3 | [min, max] |
Then, for each array (except neg) pixels in good range two median values are evaluated,
...
are considered as good, while other marked by the status bit status in . the pixel_status_ci array, with summary table printed at the end of the job,
...
AML-M plots for offset, gain, and chi2 chi2
Images corresponds to --slice "0:144,0:192" single ASIC of total panel shape:(288, 384).
Summary
- Charge charge injection processing for epixhr is nearly ready
- test 1single-ASIC panel contains a lot of dead and noisy pixels
- H and M gain modes shows significant non-linearity
- Q: what to save and how to apply constants
Questions
- fit results in terms of offset and gain constants are saved along with chi2 and pixel status arrays
- Philip: at 1st stage this script will be used for detector characterization
- pedestals are not re-evaluated
- gains are not used directly
- What fit parameters should be saved? (offset and gain)
- Formula to apply pedestals, offset and gain for intensity correction
References
- Gabriel's formula for intensity correction
- Paper in JAC: Automatic bad-pixel mask maker for X-ray pixel detectors with application to serial crystallography,
- Journal of Applied Crystallography - 2022 - Sadri - Automatic bad‐pixel mask maker for X‐ray pixel detectors with.pdf