pynrc.reduce.ref_pixels.reffix_hxrg

pynrc.reduce.ref_pixels.reffix_hxrg(cube, nchans=4, in_place=True, fixcol=False, **kwargs)[source]

Reference pixel correction function

This function performs a reference pixel correction on HAWAII-[1,2,4]RG detector data read out using N outputs. Top and bottom reference pixels are used first to remove channel offsets.

Parameters
  • cube (ndarray) – Input datacube. Can be two or three dimensions (nz,ny,nx).

  • in_place (bool) – Perform calculations in place. Input array is overwritten.

  • nchans (int) – Number of output amplifier channels in the detector. Default=4.

  • fixcol (bool) – Perform reference column corrections?

Keyword Arguments
  • altcol (bool) – Calculate separate reference values for even/odd columns.

  • supermean (bool) – Add back the overall mean of the reference pixels.

  • top_ref (bool) – Include top reference rows when correcting channel offsets.

  • bot_ref (bool) – Include bottom reference rows when correcting channel offsets.

  • ntop (int) – Specify the number of top reference rows.

  • nbot (int) – Specify the number of bottom reference rows.

  • left_ref (bool) – Include left reference cols when correcting 1/f noise.

  • right_ref (bool) – Include right reference cols when correcting 1/f noise.

  • nleft (int) – Specify the number of left reference columns.

  • nright (int) – Specify the number of right reference columns.

  • perint (bool) – Smooth side reference pixel per integration, otherwise do frame-by-frame.

  • avg_type (str) –

    Type of side column averaging to perform to determine ref pixel drift. Allowed values are ‘pixel’, ‘frame’, or ‘int’:

    • ’int’ : Subtract the avg value of all side ref pixels in ramp.

    • ’frame’ : For each frame, get avg of side ref pixels and subtract framewise.

    • ’pixel’ : For each ref pixel, subtract its avg value from all frames.

  • savgol (bool) – Using Savitsky-Golay filter method rather than FFT.

  • winsize (int) – Size of the window filter.

  • order (int) – Order of the polynomial used to fit the samples.