For number of years the same median algorithm is used for epix100, epix10ka, and Jungfrau panels with appropriate variation for bank shapes. This algorithm is migrated to LCLS2 detector interface. This note contains a few examples of this algorithm for recently implemented epix100 detector.
Common mode correction implementation for epix100
For epix100 panel shape=(1, 704, 768). Panel consist of 2x8 banks, bank shape=(352,96), with 352 rows and 96 columns per bank.
Algorithm is controlled by tuple of parameters:
cmpars (tuple) - common mode parameters.
[0] - (int) algorithm number - currently this number is void, median algorithm is used everywhere.
[1] - (uint) mode bitword - 1/2/4 : correction applied in rows per bank / columns per bank / banks.
[2] - (float) absolute maximal allowed correction. Correction is not applied if exceeds this value.
[3] - (uint) minimal number of (unmasked) pixels to evaluate correction.
Code example
Code example to account for common mode correction - cmpars=(0,7,100,10)
from psana import DataSource ds = DataSource(exp='tmoc00318',run=10) orun = next(ds.runs()) det = orun.Detector('epix100') for evt in orun.events(): arr = det.raw.calib(evt, cmpars=(0,7,100,10)) add = det.raw._common_mode_increment(evt, cmpars=(0,7,100,10))
Test images
All intensities are in ADU, gain factor is turned off.
Images are shown in psana frame with rows/columns along Cartesian x/y axes, respectively.
Uncorrected and corrected intensities for raw-peds
raw-peds image uncorrected and corrected with cmpars=(0,7,100,10)
Common mode increment in banks, rows, columns separately
raw-peds images with cmpars=(0,4,100,10)/(0,1,100,10)/(0,2,100,10) correction in 16 banks/rows per bank/columns per bank, respectively.
Common mode increment in banks, rows, columns together
raw-peds images with cmpars=(0,7,100,10) - all common mode corrections applied together