View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Patches to STSDAS v2.0.1 for the following packages: synphot, CALSTIS v1.9, CALNICA v3.2, CALNICB v2.2

Ellyne Kinney wrote on Aug 07, 1998


Patches for STSDAS v2.0.1 are available for the following packages:
synphot, calstis v1.9, calnica v3.2, calnicb v2.2

The patch files and instructions for installing them are available 
on out Web site at:

	http://ra.stsci.edu/Advisory.html

and on our anonymous ftp site at:

	ra.stsci.edu/pub/stsdas/synphot
	ra.stsci.edu/pub/stsdas/calstis1.9
	ra.stsci.edu/pub/stsdas/calnica3.2
	ra.stsci.edu/pub/stsdas/calnicb2.2

with installation instructions in the README files.
Appended below is a breif description of the changes made to each package.

If you have any questions or problems installing the patch, 
you can contact me at: help@stsci.edu or (410)338-1082.

Ellyne Kinney


SYNPHOT
-------
The procedure getthrucol in gethrucol.x checks the column units and
prints an error message with the throughput file name if the units are
incorrect. The filename in the error mesage was getting truncated to
two characters because tbtnam was being passed TY_CHAR as the length
of the string. Changing this to SZ_FNAME fixed the problem.

After a user complaint that synphot died under Linux, I ran the spp
library through spplint. There were some type mismatches in the
function calling sequences, as well as the function value
returned. These have been fixed in calcrange.x, catfunc.x, gridname.x,
plfunc.x, syncompile.x, and synsort.x. The code in compfiles.x was not
checking for array bounds overflow, so I added a check.

The default wavelength set size was increased from 2000 to 10000 in
libsynphot.h. I also modified getnwave.x to set the number of
wavelengths to the default value (10000) if less than that.

The default flux units has been changed from photlam to flam. The
default units are used when the input spectrum does not have any flux
units. This is most likely to occur when the input spectrum is an
ascii table, as there is no way to specify units in an ascii
table. The change was made because it seemed that users most often
have spectra in units of flam.

The changes were made to rdspec.x and rdstopec.x. Since the change
added a call to anytophot, it cause an illegal subroutine recursion in
rdstospec when anytophot was called with ubits of vegamag. So I
modified rdstospec to include some of the code to anytophot instead of
calling anytophot.

CALSTIS v1.9
------------
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:

o 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

o 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

CALNICA v3.2
------------
CALNICA v3.2 was installed in the STScI OPUS production pipeline system
on July 16, 1998. It includes the following changes.

 ZSIGCORR calibration keywords:

 The ZSIGCORR calibration step (which detects and corrects for non-zero
 signal in the zeroth read of MultiAccum exposures) now uses the new
 ZSIGCORR, ZSIGDONE, and SAMPZERO header keywords, which have been
 included in NICMOS science images since April 1998. Setting the
 ZSIGCORR keyword to "OMIT" will turn off this step when reprocessing
 data. When processing older NICMOS images that do not contain these
 keywords, suitable defaults are used.

 ZSIGCORR and CRIDCALC algorithm enhancements:

 The ZSIGCORR algorithm has been modified to use any available good data
 in the MultiAccum zeroth (or bias) read for pixels that are already
 saturated in the first readout. These data are passed to the CRIDCALC step
 for populating the output _cal file for these pixels. The ZSIGCORR step
 also now sets the new ZEROSIG DQ flag (value 2048) for all pixels with
 detected signal in the zeroth read. Hence users may expect to see these DQ
 values in their output _ima and _cal files if the images contain very bright
 sources.

 New DQ flags:

 All routines within CALNICA have been modified to handle the new ZEROSIG
 DQ flag, as well as another new flag (value = 16) which will be used in
 the bad pixel mask reference file (MASKFILE) to flag pixels affected by
 "grot" within the instrument. Note that both of these new flag values
 are treated by CALNICA as warnings only. Thus pixels containing only these
 DQ values are not rejected from any processing step, but the flags are
 passed on to the output _ima and _cal files so that users may inspect their
 images for pixels affected by these conditions.

 Median image statistics:

 New image statistics keywords - GOODMEDN, QAMEDN, QBMEDN, QCMEDN, QDMEDN -
 have been added to NICMOS image headers. CALNICA v3.2 populates these
 keywords in the output _ima and _cal files with the median of good 
 (i.e. unflagged) pixel values from the whole image and from each image
 quadrant.

CALNICB v2.2
------------
CALNICB v2.2 was installed in the STScI OPUS production pipeline on
July 16, 1998. It includes the following changes.

 New DQ flags:

 All processing steps have been updated to handle the new ZEROSIG (value 2048)
 and GROT (value 16) data quality flags. As with CALNICA, the ZEROSIG flag is
 treated as a warning only and pixels containing only this flag will not be
 rejected. The GROT flag, however, is treated as an error condition by the
 image combining steps, so that pixels with this flag will be rejected and
 replaced by good pixel values (if available).

 Median image statistics:

 New image statistics keywords - GOODMEDN, QAMEDN, QBMEDN, QCMEDN, QDMEDN -
 have been added to NICMOS image headers. CALNICB v2.2 populates these
 keywords in the output _mos files with the median of good (i.e. unflagged)
 pixel values from the whole image and from each image quadrant.

 New task parameters:

 There are six new task parameters which allow users to control various
 aspects of the processing. The new parameters are subbkg, meanbkg, readbkg,
 readoffsets, crthresh, and xcwin. The subbkg parameter switches the scalar
 background subtraction step on and off (default = on). The meanbkg parameter
 controls whether the scalar background is computed as the mean background
 level in all images, or computed and subtracted on an image-by-image basis
 (default = mean). The readbkg and readoffsets parameters instruct CALNICB to
 read the scalar background values and image offsets from the input association
 table, rather than computing them. This allows users to take an output _asc
 table from a previous execution of CALNICB, possibly modify the image
 background or offset values, and rerun CALNICB using the modified _asc table
 as input and overriding the values that would normally be computed. The
 crthresh parameter sets the cosmic-ray rejection threshold level used in all
 image combining steps. The xcwin parameter sets the size of the
 cross-correlation search window used when computing image offsets.

 Median backgrounds:

 The routine that computes the scalar background level in each image now
 computes the median of the pixel values, rather than the mean. This helps
 to avoid biasing by sources that are present in the images.

 Cross-correlate on sources only:

 The processing flow has been modified slightly, so that sources are
 identified in all images before computing any image offsets. This allows
 the cross-correlation routine, which is used to compute the image offsets,
 to use only pixels flagged as containing sources and thus helps to eliminate
 spurious correlations caused by hot pixels or residual cosmic-ray hits.

Last post on Aug 07, 1998