Dataset

exp=ascdaq18,run=170 - dark, 5 steps

exp=ascdaq18,run=171 - charge injection, 50 steps for space=5

Command

epix10ka_charge_injection -k exp=ascdaq18,run=171 -d epixhr -i0 -o ./work

epix10ka_charge_injection -h

2023-02-21 version of --help option epix10ka_charge_injection -h
(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

-D, --display - turns off plots that reduces processing time

Plots

Charge injection map

AML good pixel


AML bad pixel

AHL good pixel

AHL bad pixel

Constants

pixel status

Arrays of offset, gain, chi2 in AML-M,  AML-L, AHL-H, AHL-L and a couple of arrays with number of found pulser periods in AML and AHL are used to evaluate pixel status.

At first stage pixels in the good range (as shown in table) are selected.

value

minmaxgood range
offset0<data-bits>(min, max)
gain0<data-bits>/10(min, max)
chi20unlimited(min, max)
neg13[min, max]

Then, for each array (except neg) pixels in good range two median values are evaluated,

med = median(arr)

spr = median(|arr-med|)

Finally, pixels between the limits

med ± nsigm * spr, where by default nsigm=8

are considered as good, while other marked by the status bit in the pixel_status_ci array, with summary table printed at the end of the job,

bad pixel status summary table
[I] UtilsEpix10kaChargeInjection.py L0997 
Summary of the bad pixel status evaluation, pixel_status array shape:(288, 384) size:110592 dtype:uint64 
                   0o1:    89412 / 110592 (80.849%) pixels AML number of CI pulser periods < 1
                   0o2:        0 / 110592 ( 0.000%) pixels AML number of CI pulser periods > 3
                   0o4:    87561 / 110592 (79.175%) pixels AHL number of CI pulser periods < 1
                  0o10:        1 / 110592 ( 0.001%) pixels AHL number of CI pulser periods > 3
                  0o20:    90643 / 110592 (81.962%) pixels offset_ml_m <= 4967.606
                  0o40:      578 / 110592 ( 0.523%) pixels offset_ml_m >= 15297.282
                 0o100:    89760 / 110592 (81.163%) pixels offset_ml_l <= 7433.904
                 0o200:     3115 / 110592 ( 2.817%) pixels offset_ml_l >= 11402.713
                 0o400:    87570 / 110592 (79.183%) pixels offset_hl_h <= 0.000
                0o1000:      575 / 110592 ( 0.520%) pixels offset_hl_h >= 20707.813
                0o2000:    87605 / 110592 (79.215%) pixels offset_hl_l <= 5815.481
                0o4000:        3 / 110592 ( 0.003%) pixels offset_hl_l >= 13108.555
               0o10000:    89849 / 110592 (81.244%) pixels gain_ml_m <= 13.133
               0o20000:        6 / 110592 ( 0.005%) pixels gain_ml_m >= 25.567
               0o40000:    93851 / 110592 (84.862%) pixels gain_ml_l <= 0.324
              0o100000:      507 / 110592 ( 0.458%) pixels gain_ml_l >= 1.413
              0o200000:    90913 / 110592 (82.206%) pixels gain_hl_h <= 6.156
              0o400000:        0 / 110592 ( 0.000%) pixels gain_hl_h >= 96.874
             0o1000000:    89096 / 110592 (80.563%) pixels gain_hl_l <= 0.663
             0o1000000:       71 / 110592 ( 0.064%) pixels gain_hl_l >= 1.200
             0o4000000:    89648 / 110592 (81.062%) pixels chi2_ml_m <= 0.000
            0o10000000:     3380 / 110592 ( 3.056%) pixels chi2_ml_m >= 343865.194
            0o20000000:    89648 / 110592 (81.062%) pixels chi2_ml_l <= 0.000
            0o40000000:     4092 / 110592 ( 3.700%) pixels chi2_ml_l >= 12921.188
           0o100000000:    87570 / 110592 (79.183%) pixels chi2_hl_h <= 0.000
           0o200000000:     4101 / 110592 ( 3.708%) pixels chi2_hl_h >= 707366.964
           0o400000000:    87570 / 110592 (79.183%) pixels chi2_hl_l <= 0.000
          0o1000000000:     4230 / 110592 ( 3.825%) pixels chi2_hl_l >= 74386.133

AML-M plots for offset, gain, and chi2

Images corresponds to --slice "0:144,0:192" single ASIC of total panel shape:(288, 384).

Summary

  • charge injection processing for epixhr is ready
  • single-ASIC panel contains a lot of dead and noisy pixels
  • H and M gain modes shows significant non-linearity
  • 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

References


  • No labels