First the integer PHA input value will be converted to float with randomization depending on whether the calibration state variable randomize. The randomization interval will be taken from the keywords E_RAND_MIN and E_RAND_MAX that are available in CCF ADUConf.
The local offset will be subtracted from the PHA value. Offset subtraction is performed by additively shifting the parameterized dark frame (CCF DarkFrame, section 4.4.10) with the value stored in OFFSET in the second extension of CCF ADUConv (section 4.4.4), or with the result of rgsoffsetcalc, if available.
The offset is provided by the CCF ADUCONV as a
parameterization depending on the start of observation time :
with OFFSET_SLOPE,REFTIME and OFFSET_CONST being available from the CCF.
Alternatively, the offset can be calculated and interpolated using the queue memory data (if available) with rgsoffsetcalc, otherwise the data as stored in the CCF can be used as fall back.
The formula for the surface independent offset correction is