pynrc.reduce.calib.get_ipc_kernel

pynrc.reduce.calib.get_ipc_kernel(imdark, tint=None, boxsize=5, nchans=4, bg_remove=True, hotcut=[5000, 50000], calc_ppc=False, same_scan_direction=False, reverse_scan_direction=False, ref_info=[4, 4, 4, 4], suppress_error_msg=False)[source]

Derive IPC/PPC Convolution Kernels

Find the IPC and PPC kernels used to convolve detector pixel data. Finds all hot pixels within hotcut parameters and measures the average relative flux within adjacent pixels.

Parameters
  • imdark (ndarray) – Image to search for hot pixels in units of DN or DN/sec. If in terms of DN/sec, make sure to set tint to convert to raw DN.

  • Keyword Parameters

  • ==================

  • tint (float or None) – Integration time to convert dark current rate into raw pixel values (DN). If None, then input image is assumed to be in units of DN.

  • boxsize (int) – Size of the box. Should be odd. If even, will increment by 1.

  • nchans (int) – Number of amplifier channels; necessary for PPC measurements.

  • bg_remove (bool) – Remove the average dark current values for each hot pixel cut-out. Only works if boxsize>3.

  • hotcut (array-like) – Min and max values of hot pixels (above bg and bias) to consider.

  • calc_ppc (bool) – Calculate and return post-pixel coupling?

  • same_scan_direction (bool) – Are all the output channels read in the same direction? By default fast-scan readout direction is [-->,<--,-->,<--] If same_scan_direction, then all -->

  • reverse_scan_direction (bool) – If reverse_scan_direction, then [<--,-->,<--,-->] or all <--