Space Telescope Science Institute
help@stsci.edu
Table of Contents Previous Next Index Print


NICMOS Data Handbook > Chapter 3: Calibration > 3.3 Basic Data Reduction

3.3 Basic Data Reduction
3.3.1
Before the *_raw.fits images are processed by calnica, the temperature as determined from the detector bias levels is calculated using the STSDAS task CalTempFromBias for all images taken with MULTIACCUM mode (the only mode for which the method works). This step is attempted by default (tfbcalc = ’perform’) and results in a keyword setting tfbdone = ’performed’ if the task succeeds. The resulting temperature is assigned to the tfbtemp keyword. tfbcalc makes it possible to accurately select temperature dependent calibration products when calibrating (e.g. dark correction, flat-field correction and photometric calibration) NICMOS MULTIACCUM mode data.
CalTempFromBias uses the fact that the NICMOS bias levels are temperature dependent. The detector can be thought of as a simple diode in this case and the first read of a MULTIACCUM NICMOS exposure (before light reaches the detector) can be used to compute a temperature of the actual detector at the time the exposure was started. This method is believed to result in more accurate temperatures (accurate to within 0.05K) than those reported by the mounting cup sensors. It also produces more precise temperature estimates since the temperatures reported by the mounting cup sensor have been observed to slowly diverge from the real temperatures during the last few years. The bias-derived temperature shows that there has been a drift in the detector temperature during the years 2002 to 2008 (for all detectors). This is shown for NIC 1 in Figure 3.2, where the bias-derived temperature (tfbtemp) is plotted together with the mounting cup temperature (ndwtmp11) as a function of date for a number of dark images. The drift in temperature is about Δt~2K for tfbtemp. Note that the normalization of tfbtemp is arbitrary using this method, but the relative evolution of tfbtemp with time gives a measurement of temperature changes. For further updates please refer to the NICMOS Web page at:
http://www.stsci.edu/hst/nicmos
Figure 3.2: Temperature for Individual Dark Images
3.3.2
The calnica task operates on individual NICMOS datasets and performs the job of removing the instrumental signature from the raw science data. The calnica task also tries to identify cosmic ray hits and combines the multiple readouts in MULTIACCUM observations.
The inputs to calnica are the raw science (*_raw.fits) files. The output of calnica is usually a single file containing the calibrated science data (*_cal.fits). For MULTIACCUM mode datasets there is an additional intermediate output file (*_ima.fits) which contains the calibrated data from all the intermediate readouts. The _ima.fits data are fully calibrated up to, but not including, the cosmic ray rejection. The format of the input and output science data files are identical, so that the output data can be reused as input to calnica, if desired. One could, for example, process a science data file through some subset of the normal calibration steps performed by calnica, examine or modify the results, and then process the data through calnica again, performing other calibration steps or using alternate calibration reference files. One example of such a procedure would be reducing data where there are significant changes in the quadrant bias level from readout to readout in a MULTIACCUM sequence. In Section 4.2, we discuss this common NICMOS data anomaly, and in Section 4.2.4 we describe one technique for treating it using the biaseq task. At present, the use of this routine requires multiple, re-entrant applications of calnica in order to partially process the images before and after the use of the biaseq task.
Figure 3.3 shows the portion of a calibrated NICMOS science file header containing the switches and reference file keywords that pertain to the processing performed by the OTFR. The accompanying flow chart (Figure 3.4) shows the sequence of calnica calibration steps, the input data and reference files and tables, and the output data file. Each calibration step is described in detail in the following sections.
Figure 3.3: Partial NICMOS Header
Figure 3.4: Calnica Processing Flow for a MULTIACCUM Observation
ZSIGCORR (Zero-Read Signal Correction)
At the beginning of a NICMOS observation the detector pixels are reset to a bias level and then read out to record that bias level. There is an interval of approximately 0.2 seconds that elapses between the time each pixel is reset and then read. Because NICMOS does not have a shutter, signal from external sources starts to accumulate during that 0.2 second interval. When the initial (or “zeroth”) read is later subtracted from subsequent readouts, any signal in the zeroth read will also be subtracted. For very bright sources, the amount of signal in the zeroth read can be large enough to lead to inaccurate linearity corrections, as well as the failure to detect saturation conditions in the NLINCORR calibration step, because the linearity correction and saturation checking both depend on the absolute signal level accumulated in a pixel.
For MULTIACCUM observations, the ZSIGCORR step is used to estimate the amount of source signal in the zeroth read and to supply this estimate to the NLINCORR step for linearity corrections. The ZSIGCORR step estimates the amount of signal in the zeroth read by first measuring the amount of signal that arrived in each pixel between the zeroth and first reads, and then scaling that signal to the effective exposure time of the zeroth read (nominally 0.203 seconds). Pixels that have an estimated zeroth read signal greater than 5 times their ERR value are assumed to contain detectable signal; those below this threshold are ignored. (The ERR value for each pixel is the error in the fit through the MULTIACCUM sequence.) The user may set a different zero-read detection threshold by using the zsthresh task parameter for calnica. The estimated zeroth read signal is then passed, on a pixel-by-pixel basis, to the NLINCORR step, so that it can account for that signal when applying linearity corrections and saturation checking on the zeroth-read subtracted images with which it works. The ZSIGCORR step also performs saturation checking on the zeroth and first readout images.
Note that this technique will not work well for pixels covered by targets that are so bright that the signal is already beginning to saturate in either the zeroth or first readouts.
Pixels that are determined to have detectable signal in the zeroth read are marked in the DQ images of the output *_cal.fits and *_ima.fits file with a data quality flag value of 2048. The ZSIGCORR routine uses the maskfile, noisfile, darkfile or tempfile, and nlinfile reference files.
 
The ZSIGCORR routine is implemented in calnica versions 3.0 and higher. It was implemented in the standard OPUS calibration pipeline on 11 November 1997, and archived data from before that time does not have the ZSIGCORR step applied. If you are concerned about accurate flux measurements for bright sources in NICMOS observations taken before that time, you may wish to reprocess the data using the latest version of calnica (see Section 3.5), or to retrieve the data again from the HST Archive via OTFR, which will automatically apply the ZSIGCORR step.
ZOFFCORR (Subtract Zero-Read Image)
The ZOFFCORR step of calnica performs the subtraction of the zeroth read from all readouts in a MULTIACCUM file. This step is performed for data generated by the MULTIACCUM readout mode only. For ACCUM and BRIGHTOBJ readout modes, the subtraction of the zeroth read is performed on-board, because the images returned to the ground are formed by taking the difference of initial and final non-destructive detector readouts.
The pipeline will subtract the zeroth read image from all readouts, including the zeroth read itself. Furthermore, the self-subtracted zeroth-read image will be propagated through the remaining processing steps and included in the output products, so that a complete history of error estimates and data quality (DQ) flags is preserved. After this step is performed, the science data are in the same form as the raw science data from any other observing mode and are processed the same way throughout the remaining steps of calnica. No reference files are used by this step.
MASKCORR (Mask Bad Pixels)
Flag values from the static bad pixel mask file are added to the DQ image. This uses the MASKFILE reference file, which contains a flag array for known bad (hot or cold) pixels with flag value DQ = 32. There is one MASKFILE for each detector. Besides the truly “defective” bad pixels included in the MASKFILE reference images there are other bad pixels, for example, pixels affected by “grot” (see Section 4.7.1). In the MASKFILE, pixels affected by "grot" have a flag value DQ =16.
BIASCORR (Wrapped Pixel Correction)
NICMOS uses 16-bit analog-to-digital converters (ADCs), which convert the analog signal generated by the detectors into signed 16-bit integers. Because the numbers are signed and because the full dynamic range of the converter output is used, raw pixel values obtained from individual detector readouts can range from –32768 to +32767 DN. In practice the detector bias level is set so that a zero signal results in a raw value on the order of –23000 DN. In ACCUM and BRIGHTOBJ modes, where the difference of initial and final readouts is computed on-board, the subtraction is also performed in 16-bit arithmetic. Therefore, it is possible that the difference between the final and initial pixel values for a bright source could exceed the dynamic range of the calculation, in which case the final pixel value will wrap around the maximum allowed by the 16-bit arithmetic, resulting in a negative DN value.
The BIASCORR step searches for pixel values in the range –23500 to –32768 DN and adds an offset of 65536 DN to these pixel values to reset them to their original real values. The BIASCORR step only affects ACCUM and BRIGHTOBJ mode observations, although it is applied to all NICMOS data sets. For MULTIACCUM data, it should have no effect.
No reference files are used by this step.
NOISCALC (Compute Statistical Errors)
The errors of the calibrated NICMOS images are stored in the ERR extension. The way errors are calculated depends on the observing mode and resulting file type (*_cal.fits or *_ima.fits files).
Errors for *_ima.fits files from the MULTIACCUM mode and the ACCUM and the BRIGHTOBJECT modes are calculated using the NOISCALC step. This performs the task of computing an estimate of the errors associated with the raw science data based on a noise model for each detector. Currently the noise model is a simple combination of detector read noise and Poisson noise in the signal, such that:
 
(DN)
 
where σrd is the read noise in units of electrons, adcgain is the analog-to-digital conversion gain factor in electrons per DN (given by header keyword ADCGAIN). Noise is computed in units of electrons, but the result is converted to units of DNs for storage in the error image. The detector read noise is read pixel-by-pixel from the NOISFILE reference image. The data quality flags set in the DQ image of the NOISFILE are propagated into the DQ images of all image sets (imsets) being processed.
Because the noise calculation is performed before dark subtraction has taken place, the noiseless electronic signal component known as “shading” (see DARKCORR below) is still present in the data. In calnica versions 3.3 and later the NOISCALC step estimates the level of the shading signal in the data by computing column or row statistics in the DARKFILE reference file. The computed shading estimate is subtracted from the signal in the science image when computing Poisson noise on the detected counts. This yields a more accurate noise estimate than what was produced in earlier versions of the pipeline.
For the calibrated MULTIACCUM *_cal.fits files, the errors represent the uncertainties in the linear fit of the count vs. time in the up-the -ramp sampling for each individual pixel. This is calculated in the CRIDCALC step of calnica. Prior to calnica version 4.2, Poisson statistics were used in the linear fit of the up-the-ramp scaling. However, this in combination with a non-optimal weighting applied, led to errors that do not truly represent the total errors.
For images using calnica version 4.2 and later, a new optimal weighting scheme is applied which does not include Poisson statistics. This gives errors that represent the effective read-noise, but do not include the Poisson errors. More about the rationale for this update is described in NICMOS ISR 2008-002. While the errors only include the read-noise, it is possible for a user to add the Poisson contribution by hand after running calnica. To do this, add in quadrature the Poisson contribution to the errors already in the ERR extension. In the default case, where the count rate in the SCI extension is normalized to counts/s, the Poisson contribution will be:
 
 
where the exposure time is given by the TIME extension and adcgain is the gain factor. Since the errors in the ERR extension represent the read noise, the total error including both Poisson and read noise contributions can be calculated as
Throughout the remaining steps in calnica, the error image is processed in lock-step with the science image, getting updated as appropriate. Errors are mostly propagated through combination in quadrature.
In general, the values in the error images should only be regarded as an estimate of the data uncertainties. The precise pixel noise values in NICMOS images are difficult to compute a priori because many factors may contribute, sometimes in unpredictable ways (see, e.g. the discussions of data anomalies such as cosmic ray persistence in Chapter 4).
In general, the values in the error images should only be regarded as an estimate of the data uncertainties. The precise pixel noise values in NICMOS images are difficult to compute a priori because many factors may contribute, sometimes in unpredictable ways (see, e.g., the discussions of data anomalies such as cosmic ray persistence in Chapter 4).
DARKCORR (Dark Current and Bias Shading Subtraction)
Dark images taken with NICMOS contain three distinct, additive signal components: the so-called “shading”, the amplifier glow, and the true dark current. The shading is a noiseless signal that appears as gradient across a detector quadrant and is due to the fact that the bias level on the pixels is gradually changing as they are being read out. The amplitude of the shading signal is a function of the time since a pixel was last read out. The amplifier glow is a signal produced by a small amount of infrared radiation from the detector readout amplifiers. The amplitude of the amplifier glow is directly proportional to the total number of readouts in an observation. The true detector dark current signal is quite small for the NICMOS arrays and is linearly dependent on the total exposure time of an observation. All three signal components are also more or less dependent on detector temperature.
Because the shading and amplifier glow signals depend on factors other than the exposure time of an observation, it is not possible to apply a simple scaling of a single dark reference image to match the exposure time of the science data that is being calibrated. To solve this calnica originally used a library of dark current images for each of the three cameras, covering all of the predefined MULTIACCUM sample sequences, and a subset of ACCUM exposure times and NREAD values. The reference dark file appropriate for the exposure sequence used in MULTIACCUM, or the exposure time and NREAD values used in ACCUM, is determined by the OPUS generic conversion process when it populates the DARKFILE reference file keyword in the primary header of raw data files. The calnica DARKCORR step subtracts the dark reference images, readout-by-readout for MULTIACCUM observations, from the science data. Error estimates of the dark current, stored in the ERR images of the DARKFILE, are propagated in quadrature into the ERR images of all processed science imsets. Data quality (DQ) flags set in the DARKFILE are also propagated into the DQ images of all processed imsets.
One disadvantage with these DARKFILE reference files is that they do not include any temperature dependence of the dark signal. To also include this, new temperature dependent TEMPFILE reference files have been created. There is one such dark reference file for each camera and each file includes the linear dark, the amp glow and the shading components in different extensions. This makes it possible to scale the different components individually in the DARKCORR step in calnica, including a scaling for the temperature dependence.
Images taken in Cycles 7 and 7N that are retrieved after March 2002 have the tempfile keyword set. This is also the case for images in Cycle 11 and later if retrieved after September 2002. However, for the latter images, the full temperature dependence of all components was not implemented until May 2009. If both the DARKFILE and TEMPFILE keywords are set in the header of the *_raw.fits file, then calnica uses the TEMPFILE in the DARKCORR step. For images retrieved before the dates given above, where only the DARKFILE exists, observers may want to consider using the OTFR to download their images again to include the temperature dependence of the dark signal in the image calibration.
For BRIGHTOBJ mode data, dark subtraction is skipped by default in calnica, because in general the short exposure times should result in insignificant dark current relative to the object signal. In practice there may be bias components with non-zero amplitude (e.g., akin to "shading") which are present in BRIGHTOBJ mode data. At present, however, there is no standard procedure for removing these. Given the very limited use of BRIGHTOBJ mode for on-orbit science, we will not discuss its reduction further here.
Chapter 4 includes a more detailed discussion of NICMOS dark and bias components, their properties and behavior, including irregularities which are not well handled by the standard processing pipeline, and which require special care on the part of the user. Proper removal of additive instrumental signatures (i.e. dark and bias) can be one of the most important steps in achieving high quality, science grade NICMOS data reductions, and we recommend that the user read the relevant sections of Chapter 4 in detail.
NLINCORR (Linearity Correction)
The linearization correction step corrects the integrated counts in the science image for the non-linear response of the detectors. The observed response of the detectors can conveniently be represented by 2 regimes:
At low and intermediate signal levels the detector response deviates from the incident flux in a way that is correctable using the following expression:
where c1, c2 and c3 are the correction coefficients, F is the uncorrected flux (in DN) and Fc is the corrected flux. In practice the coefficient c1 is set to 1, so that the total correction factor starts at a value of 1 at the zero signal level.
At high signal levels—as saturation sets in—the response becomes highly non-linear and is not correctable to a scientifically useful degree; the saturation levels are about 21,500 DN (NIC1), 22,500 DN (NIC2), and 26,200 DN (NIC3).
The NLINCORR step applies the linearity correction to pixels with signal below their defined saturation levels. However, it applies no correction to pixels in the high signal regime, but rather flags them in the DQ image as saturated (DQ value = 64). This step uses the NLINFILE reference file, which consists of a set of images containing the c1, c2, and c3 correction coefficients and their variances at each pixel. The [NODE,2] extension of the NLINFILE sets the saturation value for each pixel. Error estimates on the correction applied to non-saturated pixels are propagated into the ERR images of all imsets processed. Data quality flags set in the NLINFILE are also propagated into the processed DQ images. There is one NLINFILE per detector. See also Section 4.4 and Section 4.5 for further discussion on non-linearity issues, including also count-rate non-linearity.
Early versions of NICMOS non-linearity correction used a linear correction scheme. Starting in calnica v3.3 (September 26, 2001), the NLINCORR step was updated to accommodate the 2nd-order correction1, but is backwards-compatible such that old NLINFILEs using the linear correction may still be used if desired. Additionally, the nonlinearity reference files include a [NODE,1] extension which sets the data value below which no nonlinearity correction is applied. Currently, the [NODE,1] values are uniformly set to 0.0, reflecting NICMOS nonlinearity at all count levels. However, NLINFILEs retrieved prior to 26 September 2001 have non-zero [NODE,1] values (the low count nonlinearity was not well known at the time). If you have NICMOS data from Cycle 7 or 7N retrieved prior to this date and think that your data may benefit from the more accurate linearity corrections, you should reprocess the images (see Section 3.5), or retrieve them again using the OTFR.

1
The correction term in the nonlinearity equation given above is quadratic. This is then multiplied by the uncorrected flux, yielding an effectively cubic relation between uncorrected and corrected values.

BARSCORR (Bars Correction)
Some NICMOS images will have pairs of bright and dark columns or rows, which have come to be known as “bars”. The bars are believed to arise from electrical cross-talk in the detector lines during the readout of one camera when another of the cameras enters the auto-flush idle state. The bars manifest themselves as a noiseless DC offset of a few DNs along a pair of columns or rows, with the pattern replicated exactly in all four image quadrants. They are discussed and illustrated in Section 4.3 of this Handbook.
Versions 3.3 and higher of calnica use the BARSCORR routine to remove the effects of the bars from MULTIACCUM observations. The routine scans pairs of columns or rows (depending on the camera) in each readout of the MULTIACCUM observation and identifies those with median signals more than 2σ different from the surrounding columns or rows as containing a bar. The user can set a different bars detection threshold by using the barthresh task parameter for calnica. It flags these pixels with a data quality value of 256 (bad pixel detected during calibration) in the DQ array of the appropriate imsets. In the subsequent CRIDCALC calibration step, where the data from all readouts is combined, the flagged pixels are rejected, so that the final combined image (*_cal.fits file) will be free of the bars.
No reference file is used by this step.
BARSCORR is available in version 3.3 and higher of calnica and all data retrieved from the HST Archive after 26 September 2001 are processed using the BARSCORR step. However, if you have Cycle 7 and 7N NICMOS data retrieved from the Archive prior this date and want to take advantage of this step, you will need to recalibrate your data, or to retrieve them again using the OTFR.
FLATCORR (Flat-Field Correction)
In this step the science data are corrected for variations in Detector Quantum Efficiency (DQE) between pixels by multiplying by an (inverse) flat-field reference image. This step is skipped for observations using a grism because the flat-field corrections are wavelength dependent. Starting with calnica version 4.4, this step uses the TDFFILE reference file, which contains the flat-field image for a given detector and filter (or polarizer) combination. The TDFFILE file contains five imsets, each with a flat-field image valid for a particular temperature range. Having a set of temperature dependent flat-fields makes it possible to correct for some of the temperature dependent pixel-to-pixel DQE variations seen in the NICMOS detectors. In the FLATCORR step, calnica reads the detector temperature from the TFBTEMP keyword and selects the appropriate imset from the TDFFILE to use. The particular imset used is written to the TDFGROUP keyword in the header of the calibrated *_cal.fits files. The temperature dependent flat-fields were delivered to the Archive on November 19, 2008 for Cycle 11 and later observations and on January 23, 2009 for data taken during Cycles 7 and 7N. For data retrieved prior to these dates there is no TDFFILE listed in the header. In this case, the FLATFILE reference file is used instead. This consists of a single static (non-temperature dependent) flat-field image. If both TDFFILE and FLATFILE reference files are given in the header, calnica chooses the TDFFILE (unless the tfbtemp keyword is missing, then FLATFILE is used instead). Error estimates and DQ flags contained in the TDFFILE/FLATFILE are propagated into the processed images.
The difference between the temperature dependent TDFFILE and static FLATFILE flat-fields is small, but can affect the resulting photometry on a ~1% level. If you have retrieved images from the Archive prior to the dates given above, or have calibrated *_raw.fits images using calnica versions earlier than 4.4, and are concerned about photometry at a percent level, you may want to consider retrieving them again using the OTFR. You can also download the TDFFILEs from the NICMOS Web page and rerun calnica (using a version 4.4 or later).
UNITCORR (Convert to Count Rates)
The conversion from raw counts to count rates is performed by dividing the science (SCI) and error (ERR) image data by the exposure time (TIME) image data. No reference file is needed.
PHOTCALC (Photometric Calibration)
This step provides photometric calibration information by populating the photometry keywords PHOTMODE, PHOTFLAM, PHOTFNU, PHOTZPT, PHOTPLAM, and PHOTBW with values appropriate to the camera and filter combination used for the observation. The photometry parameters are read from the PHOTTAB reference file, which is a FITS binary table containing the parameters for all observation modes. The values of PHOTFLAM and PHOTFNU are useful for converting observed count rates to absolute fluxes in units of erg/s/cm2/Angstrom or Jy, respectively (see Section 5.2). PHOTTABs associated with NICMOS images retrieved after 23 January 2009 also include coefficients for correcting for the temperature dependence of the photometry caused by the temperature dependence of the DQE. Calnica (version 4.4 and later) reads the detector temperature from the tfbtemp keyword and uses the coefficients to calculate a scaling factor that is stored in the zpscale keyword of the *_cal.fits files. The output science image is then multiplied by this scaling factor to account for the temperature dependence of the DQE. The coefficients for Cycle 7 and 7N data are included in the PHOTTABs starting 23 January 2009. For Cycle 11 and later, the coefficients were updated in May 2009.
 
The photometry of NICMOS images may vary by up to a few percent due to variations in the detector temperature. If you are concerned about photometry at these levels and have data retrieved before the dates given above, you may want to download the images again using the OTFR. You can also download the PHOTTABs from the NICMOS Web page and recalibrate using calnica (version 4.4 or later).
CRIDCALC Cosmic Ray Identification and Signal Accumulation)
This step identifies and flags pixels suspected of containing cosmic ray (CR) hits. For MULTIACCUM mode observations, this step also combines the data from all readouts into a single image. In MULTIACCUM mode, the data from all readouts are analyzed pixel-by-pixel, iteratively computing a linear fit to the accumulating counts-versus-exposure time relation and rejecting outliers from the fit as CR hits. The default rejection threshold is set to 4σ, but the user can override this, if desired, by setting the crthresh task parameter for calnica. The fit for each pixel is iterated until no new samples are rejected. Pixel samples identified as containing a CR hit are flagged in the DQ images of the intermediate MULTIACCUM (*_ima.fits) file, with a DQ value of 512. The pixel values in the SCI and ERR images of the _ima file, however, are left unchanged.
Once all outliers have been identified, a final count rate value, and its uncertainty, are computed for each pixel using only non-flagged samples. The result of this operation is stored as a single imset in the output *_cal.fits file in which the number of unflagged samples used to compute the final value for each pixel and the total exposure time of those samples is reflected in the SAMP and TIME images, respectively. The variance ascribed to the final mean count rate is the uncertainty in the slope of the counts-versus-time relation at each pixel location, and is recorded in the ERR image of the *_cal.fits file. Pixels for which there are no unflagged samples, e.g., permanently hot or cold pixels, will have their output SCI, ERR, SAMP, and TIME values set to zero, with a DQ value that contains all flags that were set.
The CRIDCALC step also looks for curvature in the count vs. time relation. Such deviation from the expected almost linear response is rare but may occur close to bright or saturated sources, in particular in crowded fields. Pixels with curvature are assigned a flag value DQ=16384. This step is included in calnica version 4.2 and later. For more information see ISR 2008-002. CRIDCALC is only applied to MULTIACCUM images. For data taken in ACCUM or BRIGHTOBJ mode, both the raw and calibrated images will contain cosmic rays and should be treated as with ordinary CCD data.
BACKCALC (Predict Background)
This step computes a predicted background (sky plus thermal) signal level, based on models of the zodiacal scattered light and the telescope plus instrument thermal background. This step uses the BACKTAB reference table which contains the background model parameters. Results of these predictions, along with direct estimates of the background level from the data themselves, are written to the backest1, backest2, and backest3 header keywords. The image data are not modified in any way. At the time of this writing, this step has not yet been implemented. If there are future changes to the calibration procedures or software regarding the BACKCALC step, these will be reported in the Space Telescope Analysis Newsletter (STAN) and posted on the NICMOS Web site.
WARNCALC (User Warnings)
In this step various engineering keyword values from the *_spt.fits files are examined and warning messages are generated if there are any indications that the science data may be compromised due to unusual instrumental characteristics or behavior. At the time of this writing, this step has not yet been implemented. Any future changes to the software implementing WARNCALC will be reported in the Space Telescope Analysis Newsletter (STAN) and posted on the NICMOS Web site.
3.3.3
The runcalsaa routine in the pipeline comprises of two PyRAF tasks, saaclean and nic_rem_persist which are available in the stsdas.hst_calib.nicmos package. Runcalsaa removes persistence from images affected by SAA passages as well as Bright Earth Persistence which are discussed below. Runcalsaa runs on cal images which are output of calnica. Saaclean is run only when the saa_dark and flatfile keywords are populated in the raw file header.
SAACLEAN: Removing SAA Persistence from NICMOS Images
Approximately half of all HST orbits transit through the South Atlantic Anomaly (SAA), where the cosmic ray rate is so high that their residual flux contributes a significant noise component to many subsequent exposures. NICMOS data is particularly susceptible to this "image persistence" or latent charge. This residual charge escapes slowly, introducing a decaying "persistence" in potentially many science exposures during the same orbit. For more details about SAA persistence please refer to Section 4.8.2.
In an attempt to recover the lost signal-to-noise in the SAA-impacted science exposures, a PyRAF task called saaclean was developed (see NICMOS ISR 2007-001) and has been implemented in the OTFR pipeline. This task is run on post-SAA NICMOS images to identify the amount of charge in each pixel that can be attributed to persistent flux from SAA cosmic rays, and apply a correction based on an SAA persistence model to remove this flux from the data.
The saaclean task will be run on science data in the pipeline only if the data is determined to be SAA-impacted. If the task determines that the science data signal-to-noise would be improved with a correction, the task will apply the correction to the *_cal.fits file and populate the associated keywords in the science exposure header. Please see the saaclean task help file in the stsdas.hst_calib.nicmos package of PyRAF and the NICMOS ISR 2007-001 for more complete details.
NIC_REM_PERSIST: Removing Bright Earth Persistence from NICMOS images
It has recently been found that the NICMOS detectors may be exposed to another type of persistence, Bright Earth Persistence (BEP, see Section 4.8.3) This occurs in rare instances when HST is pointed towards the bright earth and one or more of the NICMOS filter wheels are not yet in the blank position.
Removal of the BEP is done in a manner similar to the removal of cosmic ray induced persistence from SAA passages. A stored BEP persistence image is scaled to the measured persistence and subtracted from the science image. This procedure is repeated until less than 50% of the background pixels are affected. This rather high limit is set to avoid affecting sources in the image. Due to the large coverage of afflicted pixels, the scaling is done by minimizing the residuals relative to a flat sky (without sources). In contrast, SAA cosmic ray persistence is scaled by minimizing residuals relative to adjacent pixels.
A number of new keywords are introduced to handle the BEP removal. The task nic_rem_persist uses persistence model file given by the keyword pmodfile, and persistence mask file given by the keyword pmskfile. Both these reference files are specific for each camera. Calibration indicator bepdone indicates whether the BEP correction was applied or not. Bright Earth Persistence keyword bepscale shows the level of persistence calculated, a default value of bepvallo=0.5 shows minimum allowed value of the persistence to apply, a default value of bepuselo=0.5 shows minimum allowed fraction of pixels used and bepfrac gives the fraction of pixels used to calculate persistence.
Please note that the BEP removal procedure has been implemented in the pipeline for NIC2(2008) and it will soon be implemented for NIC1 and NIC3. Check the NICMOS Web page for updates.

Table of Contents Previous Next Index Print