pre_nircam_image_reader

mosviz.loaders.pre_nircam_image_reader(file_name)[source]

Data loader for simulated NIRCam image. This is for the full image, where cut-outs will be created on the fly.

From the header: If ISWFS is T, structure is:

  • Plane 1: Signal [frame3 - frame1] in ADU
  • Plane 2: Signal uncertainty [sqrt(2*RN/g + |frame3|)]

If ISWFS is F, structure is:

  • Plane 1: Signal from linear fit to ramp [ADU/sec]
  • Plane 2: Signal uncertainty [ADU/sec]

Note that in the later case, the uncertainty is simply the formal uncertainty in the fit parameter (eg. uncorrelated, WRONG!). Noise model to be implemented at a later date. In the case of WFS, error is computed as SQRT(2*sigma_read + |frame3|) which should be a bit more correct - ~Fowler sampling.

The FITS file has a single extension with a data cube. The data is the first slice of the cube and the uncertainty is the second slice.