Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ImgCalib gets the input raw image, subtracts pedestals and normalized background, apply the gain factors and mask, and saves the corrected image in the event.

Functionality:

  • use ImgCalib uses the source and key_in parameters to get the input raw image (ndarray<double,2>),
  • get gets the calibration parameters from files fname_peds, fname_bkgd, fname_gain, and fname_mask, if their names are specified,
  • the specified by the file name corrections are applied per-pixel to raw data as follows:
    [[ {{ A_cor = (A_raw - pedestal - N*background) * gain (*apply) mask]]}},
  • corrected image is saved in the event with key key_out.

...

  • 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, and bkgd_col_max. Normalization factor [N] 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 the masked_value.

...