Changes that have been made to CALSTIS in version 1.9 include:
Improved algorithm for extraction of echelle orders
When extracting the orders of an echelle observation, CALSTIS6 determined the location of each order individually, based on the signal in that order. If a given order had a weak signal, the location algorithm failed, and the spectrum was extracted at the nominal position (zero offset). We have modified CALSTIS6 to enhance the extraction of weak orders. An average offset (compared with the nominal position) for all orders is determined, with discrepant points (more than 2 sigma) removed from the average. If a given order is too weak to locate the spectrum, then this average offset is used when performing the extraction. A message is printed in the trl file for all orders where this global average was used, and a complete list of the offsets used for each order is included in the resultant x1d table.
Correction to sky level determination for CCD filtered observations
The CCD filters F28X50LP, F28X50OII, and F28X50OIII are significantly smaller than the full detector size, especially in the second image axis (i.e. the filters are 28" in height, while the detector is 52"). This can cause a problem with determining the sky level during cosmic ray rejection, because the illuminated and non-illuminated regions are comparable in area. If the sky is improperly determined, it could lead to one of the two pieces of a cr-split image being rejected as mostly cosmic rays. To resolve this potential problem (which has been seen in one observation that we are aware of), CALSTIS now flags regions that are outside the aperture, but in the illuminated portion of the detector, with a value of 4 (bad detector pixel or beyond aperture) in the DQ extension when doing DQICORR for CCD observations. This will prevent the unilluminated portion of the detector from being used in determining the sky value.
Note that this flagging is not done, however, for apertures that cover nearly the full detector in the second image axis, such as 50CCD or long slits, or for apertures smaller than six arcseconds. For spectroscopic type observations, only regions above and below the aperture are flagged, since a spectrum could extend beyond the aperture to the left or right.
Correction to the calculation of the error array in 1-d spectra
Currently CALSTIS6 (x1d) sums pixel values within the extraction region to obtain the flux in the object. However, when computing the corresponding error, a weighted average was used. We have corrected CALSTIS6 to compute the errors by adding in quadrature.
New error initialization value for MAMA data
Currently, when CALSTIS1 initializes the error array (ERR extension) for MAMA data, the minimum value it assigns is one. However, if there is no science data (flux=0), then an error of one is not meaningful. We have therefore changed the minimum value for the error to zero. In other words, if the science data value is greater than zero, the error array value should be set to the square root of the science array value; otherwise, the error array value should be set to zero.
When computing statistics, a zero error should only be regarded as a bad value if the science value is greater than zero. If both the science and error array values are less than or equal to zero, the signal to noise should be set to zero. Currently all pixels with error less than or equal to zero are counted as bad.
A number of additional enhancements and minor problem fixes include:
- the pipeline now performs the bias correction prior to the cosmic ray
rejection processing, to allow for proper bias correction in those cases
where the 2 (or more) exposures used for cosmic ray rejection have unequal
exposure times
- the pipeline now searches for bad voltages (indicative of a CCD reset), and produces a warning message (in the trl file) if the voltages are below the minimum allowed values