spacer link to MAST page spacer logo image spacer
link to STScI page




      To read the 'bst' files and stack appropriate scans




      star   (req) (i) (0) (is)
             Star number

      infile (key) (i)
             Listing to read.  Default is BST file for that star.

      outext (key) (i)
             Set this keyword to write output FITS files.  If not set equal
             to an extension, default is BU1.  (Thus, /outext writes files
             with .BU1 extension; outext='test' writes files with .test)

      bkgnd  (opt) (i)
             Background subtraction option.  1=use background vectors from
             raw data file (default).  2=use backgrounds from table. 
             0=no background subtraction.

      istack (key) (i) (0,1) (i)
             EXACT stack number(s) to process.  Stack numbers start with 1.

      iscan  (key) (i) (0,1) (i)
             Stack(s) which include the scan number(s) given via ISCAN will be

      sstack (key) (i) (0) (i)
             Starting stack number.  All stacks beginning with stack SSTACK
             will be processed.

      sscan  (key) (i) (0) (i)
             All stacks beginning with the stack containing scan SSCAN will
             be processed.

      nstacks (key) (i) (0) (i)
             Number of stacks to process.  This keyword may be used with the
             SSTACK or SSCAN keywords, but NOT with ISTACK or ISCAN.

      inspect (key) (i) (0) (i)
              If set, the user will be able to screen individual scans.

      batch   (key) (i)
             If set, no plots will appear on the screen and the user will
             not be prompted or allowed to reject portions of scans.  A
             postscript file of the results will be generated.  Without
             this keyword, the user has the option of writing a postscript
             file after viewing the plot on the screen.


      Process all stacks for star 22 in batch mode, creating output files:


      Process stacks 30, 31, and 32 in star 22, writing output FITS files:


      Process stacks 30, 40, and 50 in star 22, writing output FITS files:


      Process those stacks that contain scans 500 and 600, no FITS files:


      Process the stack containing scan 500 and all subsequent stacks:



      stk_read  Reads BST file
      within    Range checking
      stack     Stacks the scans


      BST listing file
      Input raw data file (STACK)
      Temperature and/or background correction files (STACK)
      Output stacked spectral file(s) and/or postscript files (STACK)




      The scan numbers are read from the listing (BST) file.  Then, the
      input raw file name is constructed using the star number.  A list of
      output file names is constructed using the star number and an image
      sequence number (1 through the number of stacks).  The stacks are
      determined on the basis of zeroes located in the listing file.  If
      the ISTACK, ISCAN, or NSTACKS keywords are set, the list of stacks
      is modified accordingly.  Then STACK is called for each stack.


      22 Jun 95 LLT Wrote.
      26 Jul 95 LLT fixed some things and added sscan and sstack
      29 Feb 96 RWT use either '.bu1 or '.uu1' extension depending on value
                    of wdiff
      01 May 96 RWT use !copr system variable for disk location