| You are in: Instruments > NIRI > Data Reduction > Data Primer |
![]() |
NIRI Data Primer |
Raw data and nprepare
Raw NIRI images are written as multi-extension FITS (MEF) files with a single unnamed extension [1] containing the image data. Most of the information is contained in the primary header unit (PHU, extension [0]). Additional important information is added to the PHU by the IRAF task NPREPARE, which is part of the current release of the Gemini IRAF package.
Raw files stored by the Data Handling System (DHS) are written with file names of the form N20051010S0001.fits. The date is the UT date at the beginning of the night. Because the DHS is writing data from multiple instruments, including the wavefront sensors, the NIRI file number sequence is frequently interrupted. Missing file numbers do not indicate missing NIRI data.
NIRI writes images taken as coadds as a summed, not averaged, image. This means that if one takes 10 coadds of 1 sec each, the final image will have a flux level in ADU equivalent to 10 sec. The task NPREPARE leaves the pixel values as written by NIRI but modifies the header keyword EXPTIME to be the total exposure (the original exposure time x number of coadds). NPREPARE adds a keyword COADDEXP that contains the original exposure time for each individual frame. While this behavior may be confusing to some, it is consistent with one ADU in the output image representing a fixed number of detected electrons.
The NIRI array controller averages the data based on the number of digital averages or multiple non-destructive read pairs, so no modification is necessary for different LNRS or NDAVGS values. The flux value will correspond to the exposure time, and the noise will vary as a function of the number of reads.
NPREPARE can help you better understand the raw data by adding a few header keywords. These include GAIN, RDNOISE, SATURATI, NONLINEA, and BIAS which give estimates of the gain (e-/ADU), read noise (e-), saturation level (ADU), the level at which the data start to be non-linear (ADU), and the array bias voltage. These important header keywords are used by other scripts in the NIRI package. NPREPARE refers to a data file named nprepare.dat that contains vital information for adding these header keywords. The user must make sure that the version of NPREPARE and nprepare.dat is appropriate for the data being reduced. nprepare.dat is included with the current release of the NIRI package. nprepare.dat will be modified from time to time to reflect updates in the array parameters or instrument configuration.
Note that the slit centerings are slightly different than before, and we have distributed a modified version of nsappwave.dat to account for a small central wavelength shift.
NPREPARE can also add variance and data quality planes, as described in the help pages for NPREPARE.
Array characteristics
Raw NIRI images are dominated by the landscape of the pixel sensitivity variations. You will notice a number of common features:
The read noise for this array is approximately 35 electrons (3 ADU) in images with a single low-noise read-pair and 16 digital averages. This number can be reduced by a factor of nearly 4 by increasing the number of read pairs to 16 (with an additional overhead of about 10 sec per frame; see the NIRI Overheads).
The gain of the array has been measured to be 12.3 e-/ADU. The dark current in the lab was 0.25 e-/sec, but the dark background on the telescope is somewhat higher at just under 0.5 e-/sec.
Vignetting by the peripheral wavefront sensors
The peripheral wavefront sensors are used for tip-tilt correction and guiding when using the NIRI f/6 camera (the on-instrument wavefront sensor is almost completely blocked by the f/6 beamsplitter mirror, and is therefore unusable in the wide field configuration). The peripheral wavefront sensor probe arms will vignette the f/6 field of view when the separation from the science target is less than approximately 5.5 arcmin. Sometimes, however, the only or best available guide stars are near this limit and some positions in the dither pattern may be affected. Care must be taken to exclude vignetted images when constructing the sky image if the other unvignetted images are not to be corrupted by sky subtraction.
Recognizing saturation
The saturation level in a single coadd and low-noise read pair is about 16,000 ADU (although well depth varies with quadrant and region). Because of the way the array is operated (reset-read-read), progressively brighter sources will approach saturation and then begin to get FAINTER as the array begins to saturate in the time between the reset and the first read. Saturated stars often show and central hole, sometimes even becoming negative in the core. Because the array reads from the corners to the center, along rows, this effect may be different at different places in the array. In particular, when the whole array is saturated, values in the center will pass the saturation value and start approaching zero again. A gradient in the background with saturation near the edges and lower levels in the middle indicates a highly saturated array! Please see the NIRI web pages for more information on saturation.
The array is very linear (better than 1%) until flux levels reach approximately 70% of the full well, or 11,000 ADU in a frame with 1 coadd and 1 read pair. Most observations are kept well below this level for both standard stars and science observations. Standard star flux levels are typically at the same level as the background in the science frames. No linearity corrections have been made to any of the released data. Nonlinear pixels are flagged by NPREPARE in the data quality plane.
Image persistence is small in this array, but saturated or nearly saturated images will leave a ghost in one or two subsequent frames. The persistence of a very bright source is typically 0.5 to 1% in the next frame and less than 0.1% by the third frame.
Dark current, array instability, and problems with the first frame
At present, the NIRI array is not continuously reset when idle. The result is that when starting exposures after a change in program, target, or offset sequence, the background or dark current level is different, probably due to image persistence after saturating the array (NIRI has no shutter). In practice, this means that the first exposure of each new sequence will show terrible background subtraction and should be rejected. These bad first images are included in the distributed data set, and care should be taken to review and reject them as necessary.
For quality assessment, Gemini astronomers usually exclude the first image of each data set. The first image of each set of flat field images is also excluded. The first image in each set of standard star measurements is NOT typically excluded (although it is not used to generate the sky image) because the short exposures are not badly affected by this problem. There is no measurable change in the photometry in a standard star when the first frame is excluded. The problem is cosmetic and affects the background, not the detected flux from the star.
Quadrant bias offsets + Vertical striping
There are sporadic bad frames (about 1%) where the four NIRI quadrants have mismatched bias levels and vertical striping with a periodicity of 8 pixels (the number of amplifiers reading out each quadrant). There is an IRAF task in the Gemini GNIRS package called 'nvnoise' which subtracts a constant from each of the 32 amplifier channels, and seems to work relatively well in removing this noise from imaging data. We are currently working on trying to isolate the source of this noise.
Last update 2005 October 10 by Andrew Stephens