pynrc.reduce.ref_pixels.reffix_amps

pynrc.reduce.ref_pixels.reffix_amps(cube, nchans=4, in_place=True, altcol=True, supermean=False, top_ref=True, bot_ref=True, ntop=4, nbot=4, **kwargs)[source]

Correct amplifier offsets

Matches all amplifier outputs of the detector to a common level.

This routine subtracts the average of the top and bottom reference rows for each amplifier and frame individually.

By default, reference pixel corrections are performed in place since it’s faster and consumes less memory.

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.

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

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

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

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