SSC Home Page

Supported Software: coad


SPITZER HOME - SPITZER SCIENCE - INSTRUMENTS - SCIENCE USER SUPPORT - SEARCH

  1. Purpose and Description
  2. The IDL procedures coad.pro and doall_coads.pro both combine Spitzer IRS BCDs. Each procedure requires the user to supply a list of input BCD images to be combined. The difference between the two is that coad.pro combines all of the input images to produce a single coadded image, while doall_coads.pro makes one coadded image for each subset of the input list that shares the same module, aorkey, and expid (see the IRS Data Handbook for definitions). Each coadded image produced by either of these procedures is accompanied by an uncertainty image and a mask image.

    The output combined image is computed as a trimmed mean of the input BCD images. NaN values and fatal bits (8, 12, 13, 14 by default) are not included in the mean. The IDL procedure "meanclip.pro" (found in the IDL Astronomy User's Library) is used with its default values.

    The output uncertainty image is computed as the square root of the sum of the squares of the pixel values in the uncertainty files associated with the input BCDs, normalized by the number of valid BCD pixels that contribute to a coad pixel. NaN values and fatal bits (8, 12, 13, 14 by default) are not included. The procedure finds the appropriate uncertainty files by assuming that they are in the same directory as the input BCD files.

    The output coad mask file keeps track of only two conditions: whether a coadded pixel was derived from input pixels with uncertain flatfields (bit 7) and whether a coadded pixel value could not be derived due to no invalid input pixels (bit 13). Both of these are considered fatal by default in SPICE.

    The names of the output images are determined automatically, using the same root as the first input BCD image, but adding 'coa2d.fits', 'c2unc.fits', or 'c2msk.fits' to the end of this root.

    The header information in the output combined images will be identical to the input images of the same type. All are appropriate for use with SPICE.

  3. System Requirements
    1. You must have IDL installed.
    2. You must have the IDL Astronomy User's Library installed in your IDL path.

  4. Download and Installation
    1. Place coad.pro, doall_coads.pro, and bitget.pro in a directory that is in your IDL path.

  5. Running the Software
  6. To use coad.pro,

    1. Create a list of BCDs that you wish to combine. They should all be at the same nod or map position. For this example, call it 'bcdlist.txt'.

    2. At the IDL prompt, type:

      IDL>coad, 'bcdlist.txt', /verbose, fatalbits=[8,12,13,14]
      (The /verbose argument is optional, as is the fatalbits argument, for which the default values are shown.)
    3. Examine the output files, which end in 'coa2d.fits', 'c2unc.fits', and 'c2msk.fits'.

    To use doall_coads.pro,

    1. Create a list of BCDs for which you wish to create coadded images. They do not need to all be at the same nod or map positions. The procedure will figure out which BCDs should be combined based on their filenames. It will create a separate coadded image (with accompanying uncertainty and mask files) for each subset that shares the same module, aorkey, and expid. For this example, call the BCD list 'mixedbcdlist.txt'.

    2. At the IDL prompt, type:

      IDL>doall_coads, 'mixedbcdlist.txt', /verbose, fatalbits=[8,12,13,14]
      (The /verbose argument is optional, as is the fatalbits argument, for which the default values are shown.)
    3. Examine the output files, which end in 'coa2d.fits', 'c2unc.fits', and 'c2msk.fits'. For each 'coa2d.fits' file, a 'bcdlist.txt' file will also be created, so that the user can see which BCD files went into each 'coa2d.fits' file. The 'bcdlist.txt' files can also be used as input to coad.pro.


SPITZER HOME - SPITZER SCIENCE - INSTRUMENTS - SCIENCE USER SUPPORT - SEARCH

Contact us
This file was last modified on Wed Aug 13 16:27:16 2008.
California Institute of Technology Jet Propulsion Laboratory NASA