STSDAS: Space Telescope
Science Data Analysis System
STSDAS v2.0.2 release notes

STSDAS v2.02 release notes



***********************



ANALYSIS.DITHER.PRECOR:

- The 'precor' script was modified to handle .imh files, and to get file
  name extensions from 'imtype', if not supplied. 

ANALYSIS.FITTING:

- fixed a bug that caused the fitting tasks to crash when the output table
  was a FITS table, and was being created for the first time. 

ANALYSIS.ISOPHOTE.ELLIPSE:

- The logic that handles semi-major axis growing/shrinking was prematurely
  stopping semi-major axis growing when the first isophote generated an
  INDEF gradient error. The code was modified such that the semi-major
  axis always grows from the first isophote, no matter what the error is.

CONTRIB.GAUSSFIT:

- The version of gaussfit in the contrib package has been updated to
  v2.56. It has not been tested on all platforms.

  The Sparc Solaris Gaussfit v2.56 standalone version using the 
  Solaris cc compiler was compiled under both gcc and cc with a mkpkg file.
  Minor changes to the source code were made to correct compiler
  warnings.  The contrib version of Gaussfit now runs under both
  Solaris as well as Linux (Red Hat 5.0), though extensive tests
  under Linux have not been run.

  Gaussfit 2.56 (instead of the 3.x versions also in use)
  ensures that parameter values in the program are preserved
  with full double precision accuracy: the 3.x version of
  Gaussfit suffers from the use of floating point representations, which
  can be detrimental in exceptional cases.

OTHER CONTRIB packages were modified to fix various compiler warnings

HST_CALIB.CTOOLS, TOOLBOX.IMGTOOLS.MSTOOLS:

- Support for "grot" and "zero-read" DQ bits was added to all NICMOS tasks.

STSDAS.HST_CALIB.CTOOLS

- CKWNICMOS:

  Added the new calibration switch "zsigcorr" to the list of available
  switches. This switch controls the zero-read signal correction step
  in the calnica task.

- CKWFOS

  Installed an updated version of 'ckwfos.par' to include the new PCPHFILE
  keyword.

- RESAMPLE

  A change in IRAF v2.11 to accommodate IEEE systems has caused an error in 
  the 'resample' task to surface.  An improper check was being done in the 
  'resample' task which was causing a very large value to be written to the 
  output header file.  This value was too large and the attempt to write it 
  to the output file would fail and resulted in an overflow error.  In 
  IRAF v2.10, this check was the same for both REALS and DOUBLES, so the 
  'resample' task worked just fine.

- ENG2TAB

  Fixed the bu_free routine in the bu_obj.x file.  The "j loop" referred to
  BU_N_VALUES instead of the proper BU_N_VALUES(o).

- DOC

  Updated the help file for 'vac2air' to note this task ONLY works for GEIS
  image files.

  Updated the 'poffsets' help file with regard to the use of the cross
  correlation option.  The cross correlation option should only be used with
  spectra that have strong spectral features to use for registration.  When
  this is not true, the default offsets based upon the differences in the
  wavelength scales should be used.  Added many cautions.

HST_CALIB.FOS

- CALFOS

  The 'calfos' calibration pipeline program was upgraded to calibrate properly 
  post-COSTAR spectropolarimetry data (v3.1).  While 'calfos' always has 
  calibrated spectropolarimetry data, the calibration of post-COSTAR data
  previous to 'calfos' v3.1 did not account for the two additional reflections
  caused by the COSTAR mirrors.  If the spectropolarimetry data 
  were acquired during the post-COSTAR epoch as indicated by the Science
  header keyword/value pair, KYDEPLOY=T, and a post-COSTAR calibration
  is available, the post-COSTAR polarimetry correction reference file,
  'PCPHFILE', is required for a proper calibration.  However, it should be
  noted that if no post-COSTAR polarimetry calibration file for the 
  'PCPHFILE' calibration file keyword is provided,  'calfos' will not abort.  
  Instead, warning messages will be issued and the data in the output'c3h' 
  file will still be calibrated, but the additional post-COSTAR
  correction will not have been applied.

- CALPOLAR

  The 'calpolar' task was upgraded to coincide with the modifications made to
  the 'calfos' calibration pipeline task.  Both tasks now properly calibrate
  post-COSTAR spectropolarimetry data.  The 'calpolar' task performs the
  routine spectropolarimetric processing of FOS data and is equivalent
  to the special mode processing performed by the 'calfos' task when the 
  keywords "MOD_CORR=YES" and "GRNDMODE=SPECTROPOLARIMETRY". 
  'Calpolar' provides the additional freedom to manipulate or massage the
  flux calibrated data prior to polarization processing and to exclude
  spectra at individual waveplate positions.  As is true for 'calfos',
  if the spectropolarimetry data were acquired during the post-COSTAR
  epoch and a post-COSTAR calibration is available, the post-COSTAR
  polarimetry correction reference file, 'PCPHFILE', is required for a
  proper calibration.  However, it should be noted that if no post-COSTAR 
  polarimetry calibration file for the 'PCPHFILE' calibration file 
  keyword is provided,  'calpolar' will continue to process the data.  Warning 
  messages will be issued and the data in the output 'c3h' file will still be
  calibrated, but the additional post-COSTAR correction will not have been
  applied.

- Minor bug fixes to CALFOS and SPEC_POLAR.

HST_CALIB.NICMOS.CALNICA:

- 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.

- CALNICA v3.2.1 will be installed in the STScI OPUS production pipeline
  system in the very near future. It includes a bug fix for a memory
  allocation error that was causing the task to crash on Linux systems.

HST_CALIB.NICMOS.CALNICB:

- 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.

HST_CALIB.NICMOS.NLINCORR:

- Fixed compilation warning message underr IRIX.

HST_CALIB.PAPERPROD:

- Enabled FOS polarimetry paper product.
- Skiped obs and calib flags on the visit level if SCLAMP is not "NONE"
- Print out consistent pedigree and descrip for the STIS calibration summary
  page
- Added flux info as second title for ACQ and ACQ/PEAK images
- Only display the middle 200 pixels for ACQ/PEAK images when the X dimension
  is at least 10 times larger than the Y-dimension
- For moving targets, do not check V2 and V3 P2P values to prevent tripping 
  the error
- Added calstis version number on the summary page
- Added units to jitter keywords
- Skiped all LRC pages
- Reduced the compass size
- Scaled the 1-D spectrum plot to the highest "good" pixel value.  If a pixel's
  neighboring pixels are 5 times lower, it will be regarded as a cosmic 
  ray or bad pixel.  Do not get the max flux from the table parameter anymore.
- Changed the x2d min/max/mean values to the G format

HST_CALIB.STIS

New Tasks (provided by Paul Goudfrooij of the STScI Spectrographs group)

- DAYDARK (new task)

  The main purpose of DAYDARK is to provide a daily update to the
  locations and intensities of hot pixels in the STIS CCD, by
  updating the hot pixels that are present in the "baseline" STIS CCD
  superdarks that are delivered weekly to the archive. After running
  the DAYDARK script, the actual dark correction is done by running
  the calstis pipeline calibration (e.g., tasks calstis or basic2d)
  on the "raw" STIS fits file (the file with "_raw" suffix) after
  having chosen outfile as the DARKFILE.

- NORMSPFLAT (New task)

  This task provides the first step towards the creation of a "fringe
  flat" image that can be used  to  eliminate the fringes that are
  present in STIS first-order CCD spectra at wavelengths longer than
  about 700 nm. This task is suitable for both contemporaneous flat
  field images and library flat field images.

- PREPSPEC (New task)

  PREPSPEC prepares STIS G750L or G750M spectra for subsequent fringe
  correction procedures (tasks mkfringeflat and defringe).  PREPSPEC
  is intended only for STIS first-order CCD spectra at wavelengths
  longer than about 700 nm, which suffer from fringing.

- MKFRINGEFLAT (New task)

  This task provides the second (and last) step towards the creation
  of a "fringe flat" image that can be used to eliminate the fringes
  that are present in STIS first-order CCD spectra at wavelengths
  longer than about 700 nm. This task is suitable for flat field
  images that have been normalized by means of task normspflat (which
  supports both contemporaneous flat field images and library flat
  field images).

- DEFRINGE (New task)

  DEFRINGE eliminates the fringes that are present in STIS first-order
  CCD spectra at wavelengths longer than about 700 nm, by dividing  by
  "fringe  flat  field  images"  that  have been treated in advance by
  means of tasks normspflat and/or mkfringeflat.
 
Existing Tasks:

- ECHPLOT (and ECHSCRIPT which is a hidden task)

  The 'echplot' task was modified to have a "view only" mode.  The "output" 
  parameter would ordinarily contain the name of the output 'igi' script.  
  However, if the output parameter is null (e.g., ""), the "view only" mode 
  will be triggered and the graphics are automatically sent to the screen only,
  regardless of the setting of the "device" parameter.  No permanent output
  'igi' script is generated in this mode.  "View only" mode allows the user not
  only to view each plot, but also allows the user to have minimal interaction 
  with each plot.  In this mode if more than one page of graphics has been 
  chosen, a graphics cursor is invoked.  The main purpose of the graphics
  cursor for this task is to allow the user to "page" through a series
  of requested graphics at their own pace.  The added advantages of the
  "view only" mode are the additional capabilities offered such as zoom
  and redraw.

HST_CALIB.STIS.CALSTIS

- BIASCORR is now performed prior to cosmic ray rejection.

- Calibration switch values (such as FLATCORR) are now case insensitive.
  Aside from case, the switch value must be one of PERFORM, OMIT, COMPLETE,
  or SKIPPED.

- If the wavecal file name is "N/A", WAVECORR will be skipped.

- For CCD data, a check is included on whether certain voltages on STIS are
  within a valid range; if not, a warning message will be printed.  (At the
  current time, however, the necessary keywords have not been copied into
  the science header, so the test is not performed yet.)

- When initializing the values in the ERR array for MAMA data, zero is used
  instead of one as the minimum error.  The message printed to the trailer
  only includes readnoise, gain, and bias for CCD data.

- For CCD imaging type observations, regions that are within the illuminated
  portion of the detector but beyond the aperture are now flagged with a value
  of 4, which is also used for out of bounds.  (This is skipped for BIAS and
  DARK observations, however).  This is needed to prevent problems with cosmic
  ray rejection for such apertures as F28X50LP.

- In 2-D rectification, SPORDER is only written to the SCI extension headers.

- When specifying an outroot name for calstis, it is now possible for the
  input file name to include a directory prefix.  There was a bug in this
  option for the case that outroot is a directory.

- There was a sign error in the Doppler shift applied when doing DOPPCORR.
  In addition, the Doppler convolution was not correct near the right edge
  of the image. Both now fixed.

- DQICORR was modified so that if the flag value read from the bpixtab
  contains DETECTORPROB (4), which flags the outer four pixels (low-res) of
  MAMA data, then Doppler shifting is restricted to expanding the flagged
  region toward the center.  This border region may not be shifted away from
  the edge, and it may not be shrunk toward the edge.

- The cosmic ray rejection was modified so that REJ_RATE will not be computed
  and udpated in the output header if the total exposure time is zero.

- If a science observation and its associated wavecal were taken with different
  apertures, the offset between those apertures was being taken into account
  twice.  It was done in calstis12, which copies the shifts from the wavecal
  header to the science header, and it was accounted for in the incidence angle
  correction.  This bug was fixed by not applying the offset in calstis12.

HST_CALIB.STIS.CALSTIS6 (x1d in stis package):

- In echelle data, the peak finding algorithm was changed to include
  a preliminary pass in which spectral orders that have not enough
  signal-to-noise to warrant a reliable peak find are detected and
  flagged. Later on, at the time of spectral order extraction, the
  position in the array for these low S/N spectral orders is determined
  by interpolation from other orders.

- The former ASCII debug file option was replaced by extra columns in
  the output table. The -d command line flag was replaced by -e and now
  turns off the extra column writting. Alternatively, the 'x1d' task
  has the new 'extrinf' boolean parameter to control extra column
  writting.

- Flux calibration can be performed in non-background-subtracted data.

- A bug in the computation of the ERROR output column was fixed.

- Some minor changes in the _trl output file.

HST_CALIB.SYNPHOT:

- Bugs which caused synphot to fail running on Linux were fixed.
- Default wavelength set size increased to range between 2000 and 10,000
  angstroms.
- Fixed bug which resulted in truncated filename printed in error message
  when incorrect column units are detected.
- Default flux units changed from photlam to flam when source has no
  units given (e.g., for an ASCII table).
- Previously, countrate failed to recognize spectrographs if they were
  typed in upper case, thus leading to incorrect results for the counts
  at the reference wavelength. This has been fixed.

HST_CALIB.WFPC.CRREJ:

- Fixed problem arising when the integration times are different and there
  are saturated pixels in the longer exposure.

HST_CALIB.WFPC.INVMETRIC:

- Now checks to see if the point is too far out of bounds

TOOLBOX.HEADERS.EHEADER:

- Eheader was inserting nulls in the headers of fits images after many
  lines were deleted from the header. This problem was caused by an
  unfortunate interaction between eheader and the fits kernel. The
  length of the header stored by the fits kernel is not updated after
  eheader is called. Eheader was modified to insert blank lines to bring
  the header back to its original length when the image type is fits.

TOOLBOX.IMGTOOLS.GCOMBINE:

- A bug that caused the task to crash when the number of input files was
  exactly 10 and when certain input parameters had certain specific values,
  was partially fixed. The task won't crash anymore, but the output error
  and mask files will look weird, with most of the pixel values set to zero.
  This behavior was tracked down to a design bug that will only go away after
  a complete task re-design. A note was added in the BUGS section of the
  help file.

- A bug that caused gcombine to fail when both external masks and pixel
  rejection were applied simultaneously, was fixed.

- A memory leak was fixed.

TOOLBOX.IMGTOOLS.GCOPY

- A problem surfaced when copying from a file to another with a different 
  filename extension surfaced when no filename extension was specified for
  the input file (the specified output filename was ignored). This has
  been corrected.

TOOLBOX.IMGTOOLS.MSTOOLS.MSARITH:

- The task was modified to handle (old) STIS reference files that have no 
  NEXTEND keyword.

TOOLBOX.IMGTOOLS.MSTOOLS.MSCOMBINE:

- Fixed a bug in the hidden task that is called by "mscombine" to extract
  imsets from FITS files and convert them to GEIS format. The bug was
  encountered only when operating on FITS imsets that have null data arrays
  in their ERR or DQ image extensions.

TOOLBOX.IMGTOOLS.MSTOOLS.ECDEL,ECEXTRACT,EXTDEL,MSDEL,MSSORT:

- Minor bug fixes and changes to parameter case for consistency.

TOOLBOX.TOOLS/DOC

- Modified the fparse help file and the fparse.x source file to reflect changes
  in the base IRAF system under v2.11.  The cl_index and cl_size parameters for
  the fparse task now have default values of -1.  Formerly, the default values 
  were 0.


***************************************************************************

SYSTEM CHANGES

HSTIO

- hstioirf.c - Fixed a bug in the put[Float/Short]Data routine when
  checking to determine if an image is constant.  PPix indices were reversed
  and non-square images where NAXIS1>NAXIS2 would not be identified constant.

- numeric.c - Changed the definition of min/maxFloat and  min/maxDouble to the
  ANSI standard of FLT_MIN/MAX and DBL_MIN/MAX as defined in .
  Modified the initialization of values from 0xffffffff to 0x7fffffff to 
  eliminate warning messages when compiling.

- mkpkg - The HSTIO header files are no longer copied from the hstio directory
  to the lib directory.
  
- Modified to handle properly the overwriting of string values and 
  associated comments for FITS keywords.

CVOS

- The XIMIO interface was modified to resolve a conflict with IRAF LIBC.
  The C-binding for imaccess.x (c_imaccess.c) was in conflict with a routine
  of the same name in IRAF LIBC.

- c_iraf_priv.c - The call to the errget routine was simplified to avoid a 
  segmentation violation on SGI.  Also, replaced calls to the iraf2char routine
  in set_cvoserr and erract with a "for loop" to fill the error message.

- irafcmain.c - Modified the ifdef statements surrounding the setpgrp function.

- irafsppinit.x - Removed unused function declarations for streq, oscmd, and 
  sys_getcommand from irinit routine.

- mkpkg - The CVOS header files are no longer copied from the cvos directory
  to the lib directory.  

- stdio.h - Added a check around definition of TMP_MAX to avoid conflicts with
  other standard header files.  Also, decreased value of TMP_MAX from 17567 to 
  16384 to be the "lowest common denominator" for all ported machines.