Spitzer Documentation & Tools
CUPID User's Guide

Chapter 3. The CUPID Pipelines

The following pipelines are available in CUPID:

 

·         1. BCD          --- Make BCD images from raw images.

·         2. COADD     --- Make coadd images from BCD images.

·         3. BKSUB      --- Make background subtracted images from coadd images.

·         4. BKSUBX   --- Make spectral extractions of BKSUB images.

·         5. COADDX --- Make spectral extractions of COADD images.

·         6. BCDX        --- Make spectral extractions of BCD images.

·         7. CUTOUT   --- Make blue and red cutout images from ch0 BCD images.

·         8. BCDACQ --- Make BCD cutouts from peakup uisition (2D) raw images.

·         D.                   DARK               --- Make composite dark cube image from individual dark cube images.

3.1            BCD Pipeline

This pipeline makes BCD images from raw images.  Details about the function of the modules called in this pipeline may be found in the IRS Instrument Handbook. The logic for this pipeline is in wrappers/wrapper_BCD.pl

 

Input datafiles come from the raw/ subdirectory. All (3D)*_raw.fits datafiles will be processed.

 

Output datafiles will be written to the bcd/ subdirectory.

 

Parameter overrides may be selected with:  SET.module-flag=value.

 

Pipeline STEP flow options may be selected with any of the following:

START.step

STOP.step

SKIP.step

DO.step1.AFTER.step2

 

This pipeline runs the following STEPs:

 

·         CVTI2R4                           --- convert pixels from integer to floating point

                                                     (module calls: remove_file cvti2r4)

 

·         ADDKWDS                       --- update FITS header keywords

                                                     (module calls: hdrupd8 hdrupd8)

 

·         SNEST_IRS                       --- compute uncertainty file

                                                     (module calls: copy_file basecal snest_irs)

 

·         DNTOFLUX                      --- convert FLUX and UNC files from DN to electrons

                                                     (module calls: dntoflux dntoflux)

 

·         SATCOR                           --- perform saturation correction

                                                     (module calls: radhit imagest)

 

·         DROOPOP                         --- correct for global droop

                                                     (module calls: droopop)

 

·         ROWDROOP                     --- correct for droop per row

                                                     (module calls: rowdroop)

 

·         SNEST_IRS2                        --- compute final uncertainty file

                                                                (module calls: snest_irs2)

 

·         DARKBASE                      --- zero the dark baseline

                                                     (module calls: copy_file darkbase)

 

·         CUBESUB                         --- subtract the dark

                                                     (module calls: cubesub)

 

·         LINEARIZ                         --- correct for non-linearity

                                                     (module calls: lineariz)

 

·         RADHIT                            --- flag rahhits (in DMASK file)

                                                     (module calls: radhit)

 

·         DARKDRIFT                     --- remove "jail bars"

                                                     (module calls: darkdrift)

 

·         SLOPE_FINDER               --- compute slope estimates of ramps

                                                     (module calls: slope_finder)

 

·         DROOPRES                       --- remove residual droop

                                                     (module calls: copy_file droopres)

 

·         STRAYCROSS (ch0)         --- remove stray light

                                                     (module calls: copy_file slremov)

 

·         STRAYCROSS (ch1&ch3)     --- remove crosstalk

                                                     (module calls: crosstalk)

 

·         STRAYCROSS (ch2)         --- just copy files

                                                     (module calls: copy_file copy_file)

 

·         FLATAP                            --- apply FLAT

                                                     (module calls: flatap)

 

·         FPGEN                              --- run 'final product generator' and add velocity keywords

                                                     (module calls: velocity remove_file fpgen)

 

 

3.2            COADD Pipeline

This pipeline makes coadd images from BCD images. The logic for this pipeline is in wrappers/wrapper_COADD.pl

 

Input datafiles come from the bcd/ subdirectory. All *_bcd.fits datafiles will be processed (plus associated *_func.fits and *_bmask.fits datafiles).

 

Output datafiles will be written to the pbcd/ subdirectory.

 

Parameter overrides may be selected with: COADD/SET.module-flag=value

 

Pipeline STEP flow options are not available for this pipeline.

 

This pipeline runs the following STEPs:

 

·         COADD2D --- Create coadded image

                        (module calls: coadd2d)

3.3            BKSUB Pipeline

This pipeline makes background subtracted images from coadd images (only for ch0 and ch2 data). The logic for this pipeline is in wrappers/wrapper_BKSUB.pl

 

Input datafiles come from the pbcd/ subdirectory. All (ch0,ch2)*_coa2d.fits datafiles will be processed (plus associated *_c2unc.fits and *_c2msk.fits datafiles)

 

Output datafiles will be written to the pbcd/ subdirectory.

 

Parameter overrides are not available for this pipeline.

 

Pipeline STEP flow options are not available for this pipeline.

 

This pipeline runs the following STEPs:

 

·         IMSUBTRACT            --- Create background subtracted image

                             (module calls: imsubtract)

3.4            BKSUBX Pipeline

This pipeline makes spectral extractions of BKSUB images. The logic for this pipeline is in wrappers/wrapper_X.pl

 

Input datafiles come from the pbcd/ subdirectory. All *_bksub.fits datafiles will be processed (plus associated *_bkunc.fits and *_bkmsk.fits datafiles).

 

Output datafiles will be written to the pbcd/ subdirectory.

 

Parameter overrides may be selected with: X/SET.module-flag=value

 

Pipeline STEP flow options may be selected with any of the following:

X/START.step

X/STOP.step

X/SKIP.step

X/DO.step1.AFTER.step2

 

This pipeline runs the following STEPs:

 

·         PROFILE     --- get a cross scan profile of flux in all orders

                        (module calls: profile)

 

·         RIDGE        --- locate the source (max of profile)

                        (module calls: ridge)

 

·         EXTRACT --- extract spectrum

                        (module calls: extract)

 

·         IRS_TUNE  --- apply flux conversion and minor tuning corrections

                        (module calls: irs_tune)

 

·         TBL2FITS   --- create FIS binary table

                        (module calls: tbl2fits)

 

3.5            COADDX Pipeline

This pipeline makes spectral extractions of COADD images. The logic for this pipeline is in wrappers/wrapper_X.pl

 

Input datafiles come from the pbcd/ subdirectory. All *_coa2d.fits datafiles will be processed (plus associated *_c2unc.fits and *_c2msk.fits datafiles).

 

Output datafiles will be written to the pbcd/ subdirectory.

 

Parameter overrides may be selected with: X/SET.module-flag=value

 

Pipeline STEP flow options may be selected with any of the following:

X/START.step

X/STOP.step

X/SKIP.step

X/DO.step1.AFTER.step2

 

This pipeline runs the following STEPs:

 

·         PROFILE     --- get a cross scan profile of flux in all orders

                        (module calls: profile)

 

·         RIDGE        --- locate the source (max of profile)

                        (module calls: ridge)

 

·         EXTRACT --- extract spectrum

                        (module calls: extract)

 

·         IRS_TUNE      --- apply flux conversion and minor tuning corrections

                        (module calls: irs_tune)

 

·         TBL2FITS   --- create FITS binary table

                        (module calls: tbl2fits)

3.6            BCDX Pipeline

This pipeline makes spectral extractions of BCD images. The logic for this pipeline is in wrappers/wrapper_X.pl

 

Input datafiles come from the bcd/ subdirectory. All *_bcd.fits datafiles will be processed (plus associated *_func.fits and *_bmask.fits datafiles).

 

Output datafiles will be written to the bcd/ subdirectory.

 

Parameter overrides may be selected with: X/SET.module-flag=value

 

Pipeline STEP flow options may be selected with any of the following:

X/START.step

X/STOP.step

X/SKIP.step

X/DO.step1.AFTER.step2

 

This pipeline runs the following STEPs:

 

·         PROFILE     --- get a cross scan profile of flux in all orders

                        (module calls: profile)

 

·         RIDGE        --- locate the source (max of profile)

                        (module calls: ridge)

 

·         EXTRACT  --- extract spectrum

                        (module calls: extract)

 

·         IRS_TUNE  --- apply flux conversion and minor tuning corrections

                        (module calls: irs_tune)

 

·         TBL2FITS   --- create FIS binary table

                        (module calls: tbl2fits)

3.7            CUTOUT Pipeline

This pipeline makes blue and red cutout images from ch0 BCD images. These cutouts include WCS information and can be used in MOPEX.

 

The logic for this pipeline is in wrappers/wrapper_CUTOUT.pl

 

Input datafiles come from the bcd/ subdirectory. All (ch0)*_bcd.fits datafiles will be processed.

 

Output datafiles will be written to the bcd/ subdirectory.

 

Parameter overrides are not available for this pipeline.

 

Pipeline STEP flow options are not available for this pipeline.

 

This pipeline runs the following STEPs:

 

·         BLUE     --- do BLUE cutout

               (module calls: cropfits2 cropfits2 cropfits dntoflux)

 

·         RED   --- do RED cutout

               (module calls: cropfits2 cropfits2 cropfits dntoflux)

3.8            BCDACQ Pipeline

This pipeline makes BCD cutouts from 2D peakup acquisition (PUA) raw images. The DCENUM=3 files are not processed since they are not normal peakup acquisition frames. The logic for this pipeline is in wrappers/wrapper_BCDACQ.pl.

 

Input datafiles come from the raw/ subdirectory. All (2D)*_raw.fits datafiles except for DCENUM=3 will be processed.

 

Output datafiles will be written to the bcd/ subdirectory.

 

Six BCD peakup cutouts are produced by this pipeline, three each at the acquisition and sweet spot positions (see IRS Data Handbook sec. 2.3 for details on peakup acquisition observations).  For a successful peakup, the target should be centered on pixel 23,26 (acq_b.fits) or 22,30  (acq_r.fits).  The peakup acquisition cutouts are calibrated to have pixel units of MJy/sr. The BCDACQ pipeline makes use of the DCS mode flat and darks, which have not previously been released.  However, unlike other IRS BCD data products, no uncertainty image is available because peakup acquisition uses DCS mode instead of SUR. Users are advised to estimate the uncertainty based on the dispersion of the six cutouts.

 

Parameter overrides may be selected with: BCDACQ/SET.module-flag=value

 

Pipeline STEP flow options may be selected with any of the following:

 

BCDACQ/START.step

BCDACQ/STOP.step

BCDACQ/SKIP.step

BCDACQ/DO.step1.AFTER.step2

 

This pipeline runs the following STEPs:

 

·         CVTI2R4         --- convert pixels from integer to floating point

                             (module calls: remove_file cvti2r4)

 

·         ADDKWDS     --- update FITS header keywords

                             (module calls: hdrupd8 hdrupd8)

 

·         DNTOFLUX    --- convert from DN to electrons/sec

                             (module calls: dntoflux)

 

·         IMSUBTRACT     --- Subtract the dark

                             (module calls: imsubtract)

 

·         DARKDRIFT   --- remove "jail bars"

                             (module calls: darkdrift)

 

·         FLATAP          --- apply FLAT

                             (module calls: flatap)

 

·         FPGEN            --- run 'final product generator' and add velocity keywords

                             (module calls: velocity remove_file fpgen)

 

·         BLUE              --- do BLUE cutout

                             (module calls: cropfits2 cropfits dntoflux)

 

·         RED                 --- do RED cutout

                             (module calls: cropfits2 cropfits dntoflux)

3.9            DARK Pipeline

This pipeline will make composite dark cube image from individual dark cube images. The logic for this pipeline is in wrappers/wrapper_DARK.pl

 

Input datafiles come from the bcd/ subdirectory. All *_darkbase.fits datafiles will be processed (plus associated *_darkbase_unc.fits and *_dmask.fits datafiles).

 

Output datafiles will be written to the pbcd/ subdirectory.

 

Parameter overrides may be selected with: DARK/SET.module-flag=value

 

Pipeline STEP flow options are not available for this pipeline.

 

This pipeline runs the following STEPs:

 

·         DARKEST --- Coadd the bcd image cubes

                        (module calls: darkest)