Page History
...
Mask from ~valmar/psana-extra-extreme-sabine2.h5 - very agressive masking - radial=9 pix around bad!
Bad pixel status as mask
...
- mask = det.status_as_mask(par, mode=3, mstcode=63) - mask all status codes but bad gain switch
- mstcode=64 - mask of the new bad gain switch status
- mstcode=127 - mask all bad status codes
cxic00120 run 42
cxic00120 run 24
cxic00120 run 42 NEIGHBOURS MASKED AS +/-1pixel around each bad
- mstcode=64 strongly overlaps with 63
- mstcode=63 and 127 shows about the same mask, difference is minor as shown in pixel status statistics.
...
Bad status code 64 adds 7734-7673=61 bad pixel.
Combined mask
mask = det.mask(parevt, calib=False, status=True, edges=True, central=True, unbond=False, unbondnbrs=False, mode=30o377, width=5, wcentral=5, mstcode=0xffff)
Custom mask
import PSCalib.GlobalUtils as gu
mask = det.status_as_mask(evt, mstcode=0o377) # mode=0 - by default do not mask neighbors
mask = gu.mask_neighbors_in_radius(mask, rad=6, ptrn='r')
mask = gu.merge_masks(mask, det.mask_geo(evt, width=10, wcentral=5)) # mbits=0o377, where 1-edges, 2-central, 4-non-bonded for cspad2x1, ... non-bonded neighbors
#mask = gu.merge_masks(mask, gu.mask_edges(mask, mrows=2, mcols=4)) # masks each segment edges only
mask = gu.merge_masks(mask, det.mask_calib(evt))
Summary
- New bad pixel status code is added for bad gain mode switch:
...