readout#

msfc_ccd.noise.readout(images, axis, threshold=5, signal_max=<Quantity 100. DN>)[source]#

Estimate the readout noise of each tap from a sequence of dark images.

The difference between each image and the previous image along axis is computed, which removes the bias, the dark current and the fixed pattern noise, and leaves only the readout noise of the two images. The readout noise is then the standard deviation of the active pixels outside the masked rows, where_masked(), in each difference image, divided by \(\sqrt{2}\), after rejecting pixels affected by cosmic rays or other spikes.

The result has one fewer element along axis than the input, since it is defined for each pair of adjacent images. Take the mean along axis to estimate the readout noise of the camera.

This is the point at zero signal of the photon transfer curve computed by photon_transfer(). The shot noise of a pair of images with a mean signal above signal_max would add to the readout noise, so such a pair cannot be a pair of darks, and raises an error.

Parameters:
  • images (TapDataT) – A sequence of dark images from each tap, such as the taps of a sequence of images.

  • axis (str) – The logical axis along which the images are a sequence of darks.

  • threshold (float) – Pixels in the difference image further than this many standard deviations from the median are rejected. The standard deviation used for the rejection is estimated from the median absolute deviation, which is not affected by the spikes.

  • signal_max (Quantity) – The largest mean signal of a pair of images which is accepted as a pair of darks.

Returns:

  • A copy of images, of the same type, whose outputs are the readout

  • noise of each tap for each pair of adjacent images.

Raises:
  • TypeError – If images is not the images from each tap.

  • ValueError – If there are fewer than two images along axis, or a pair of them has a mean signal above signal_max.

Return type:

TapDataT