Page History
...
- ImgCalib uses the
source
andkey_in
parameters to get the input raw image (asndarray<doublendarray<T,2>
object), where T stands for uint16_t, int, float, uint8_t, or double, - gets the calibration parameters from files
fname_peds
,fname_bkgd
,fname_gain
,fname_mask
, andfname_nrms
, if their names are specified, - the specified by the file name corrections are applied per-pixel to raw data image as follows:
Code Block A_cor = A_raw (1) - pedestal | if the file name is specified in the parameter "fname_peds" (2) - N*background | if the file name is specified in the parameter "fname_bkgd" (3) * gain | if the file name is specified in the parameter "fname_gain" (4) apply mask | if the file name is specified in the parameter "fname_mask" (5) apply N*RMS threshold | if the file name is specified in the parameter "fname_nrms" (6) apply threshold | if the "do_threshold" = true
- corrected image is saved in the event with key
key_out
. The type of output data is the same as the type of input data asdouble
type.
Details:
- All files with input calibration parameters should have the same shape as image and formatted as regular text file containing 2d matrix (table) of float (or integer) values, with columns separated by space(s), ' ', and rows(lines) terminated by the '\n'.
- Background normalization is performed in window defined by the parameters
bkgd_row_min
,bkgd_row_max
,bkgd_col_min
, andbkgd_col_max
. Normalization factorN
is evaluated for pixel amplitudes in this window as:
N = sum(A_raw - pedestal) / sum(A_bkgd)
. - Masking algorithm assumes that good pixels in the
fname_mask
file should be marked by '1' (ones) and bad pixels – by '0' (zeros). Mask is applied as a last correction. The bad masked pixel amplitudes are substituted by themasked_value
.
...
Overview
Content Tools