This note describes raw intensity correction algorithms in the method Detector.calib and their variation on detector type.

LCLS Detector Interface

Method calib

   arr = det.calib(evt, cmpars=None, **kwargs)

Regular sequence of applied algorithms

  • dark correction - pedestals subtraction using calib/.../pedestals
  • common mode correction depending on cmpars or calib/.../common_mode or default from PSCalib.CalibParsBase*V1.py
  • gain correction factors from calib/.../pixel_gain. Depending on detector pixel_gain calibration array may contain per-pixel gain in ADU/keV or gain correction factor gfactor in keV/ADU, where gfactor=1/gain.
  • apply mask depending on **kwargs

Correction formula

(common_mode(raw - peds))/gain * mask(**kwargs)

or for gain factors in pixel_gain:

(common_mode(raw - peds))*gfactor * mask(**kwargs)

Mask

To construct the mask use **kwargs and algorithms from method mask_v2 from AreaDetector.

TURN OFF common mode correction

For cmpars = None - default constants are used

For regular detectors: cmpars = 0 or cmpars[0] = 0 - OFF

For epix10ka and Jungfrau cmpars[1] = 0 - OFF

See also Common mode correction algorithms.

Detector dependent algorithms

Spreadsheet below contains comments on detector specific application

Detector typepedestal subtractioncommon mode correctionpixel_gain content,  by default gain factorgainmaskformulacomments
LCLS (1)
CSPAD+

default cmpars = (1, 25, 25, 100)

cmpars = 0 or cmpars[0] = 0 - OFF

gain factor, keV/ADU

*gainmask

det.set_gain_mask_factor(gfactor=6.85)

+

gain map extracted from detector configuration data and applied with gfactor

gainmask is applied before regular gain factor

CSPAD2x2+

shape=(185, 388, 2) → common_mode shape=(2, 185, 388) → back to (185, 388, 2)

default cmpars = (1,25,25,100)

gain factor, keV/ADU++
shape is converted before common mode correction in order to apply regular CSPAD algorithm then it is converted back to daq shape.
epix100a+

default cmpars =(4,6,30,30)

gain factor, keV/ADU++

pnCCD+

default cmpars =(3,350,350,128)

or alg #8 (8,5,500)


++

Andor3d+

default cmpars =(2,10,10,cols)


++

Princeton+

default cmpars =(1,50,50,100,1,size,1)


++

Camera+other Cameras default cmpars = (0,0,0,0), cmpars = 0 or cmpars[0] = 0 - OFF
++

epix10ka+

applied for pixels in high gain mode only in combination with mask

cmpars=None: default (7,2,10,10)

(*,0,...) - OFF

gain, ADU/keVpixel_gain constants are used and per event depending on gain range+

(common_mode(raw - peds)/gain * mask

UtilsEpix10ka.calib_epix10ka_any(det, evt, cmpars=None, **kwa)

offsets are already accounted at deployment of pedestals in calib/.../pedestals

Jungfrau+

applied for pixels in high gain mode only in combination with mask

cmpars=None: default cmpars = (7,1,100,0)

(*,0,...) - OFF

gain, ADU/keV

pixel_gain and pixel_offset are used and per event depend on gain range


+(common_mode(raw - peds - offset))/gain * maskUtilsJungfrau.calib_jungfrau(det, evt, cmpars=(7,3,200,10), **kwa)

LCLS-II Detector Interface

Method calib

   arr = det.raw.calib(evt, **kwa)

Regular sequence of applied algorithms

  • dark correction - pedestals subtraction using constants of ctype pedestals from DB
  • common mode correction depending on cmpars or constants of ctype common_mode from DB
  • gain correction with constants from DB for ctype pixel_gain. In LCLS-II we intend to always use in pixel_gain constants the gains in ADU/keV.
  • mask is not applied by default (see below)

Correction formula

common_mode(raw-peds)/gain

Mask

In lcls2 mask is derived and applied separately as explained in Area detector mask examples or Detector interfase in LCLS-II.

TURN OFF common mode correction

  • cmpars=None - use constants from DB

  • cmpars[1] = 0 - OFF

  • both cmpars=None and common_mode constants are missing in DB - common mode correction is OFF

Detector dependent algorithms

Spreadsheet below contains comments on detector specific application

Detector typepedestal subtractioncommon mode correctiongainmaskformulacomments
LCLS-II
epix10ka+

default cmpars=None - search common_mode pars in DB. Correction is OFF if constants missing in DB.

ex. (7,2,100,10)

+-(common_mode(raw - peds)/gain

calib_epix10ka_any(det.raw, evt, cmpars=None, **kwa)

mask defined by **kwa is used in common_mode_correction

see UtilsEpix10ka

epixhr2x2++ the same as epix10ka+-
the same as epix10ka
epix100a+

+ the same as epix10ka

ex. (7,7,100,10)

+-

calib_epix100(det.raw, evt, cmpars=None, **kwa)

UtilsEpix100

opal+-+-(raw-peds)/gainopal_base
piranha4+-+-(raw-peds)/gainpiranha4_base

References

  • No labels