pynrc.reduce.ref_pixels.ref_filter

pynrc.reduce.ref_pixels.ref_filter(cube, nchans=4, in_place=True, avg_type='frame', perint=False, edge_wrap=False, left_ref=True, right_ref=True, nleft=4, nright=4, **kwargs)[source]

Optimal Smoothing

Performs an optimal filtering of the vertical reference pixel to reduce 1/f noise (horizontal stripes).

Adapted from M. Robberto IDL code: http://www.stsci.edu/~robberto/Main/Software/IDL4pipeline/

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

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

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

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

  • avg_type (str) – Type of ref col averaging to perform. Allowed values are ‘pixel’, ‘frame’, or ‘int’.

  • 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.

Keyword Arguments
  • 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.

  • mean_func (func) – Function to use to calculate averages of reference columns.