Spitzer Documentation & Tools
Stray Light Masker

Purpose: Identifies pixels potentially affected by stray light.
Author: Mark Lacy (IRAC IST); Rick Arendt (IRAC IT)
Date Contributed: 17 May 2005
System Requirements: IDL v5.4 or higher, tested up to IDL v6.

This software is not considered part of the pipeline and no installation support from IRSA should be expected. We are however very interested in your feedback in order to improve the algorithm and are glad to work with you in test cases and analysis. Questions and comments should be directed to the Helpdesk.

Information and Download

Download the Stray Light Masker (mask_straylight_v5p2.pro) (PRO, 46 KB).

The IRAC stray light masker was written by Mark Lacy of the IRAC Instrument Support Team with help from Rick Arendt of the IRAC Instrument Team and is provided "as is" for testing and usage by IRAC observers. In short, the program will create one mask per input file with pixels likely to be affected by stray light set equal to 1. If the CHDMSK keyword is set then the program will alter the Dmasks, putting the scattered light mask into bit 3 of the Dmask. The program also masks filter ghost images, using bit 2 of the Dmask for marking ghosts. You will need to have the BCD, Dmask and 2MASS table files of your data in the directory where you run the straylight masker. The 2MASS lists should be in the same format as those generated by the SSC IRAC pipeline, so the pipeline table lists can be used directly as downloaded as part of the pbcd products. The masker was written under IDL 5.4, but has been tested successfully up to version 6.

Observers are reminded that observations that are not suitably dithered (use of small dither pattern) will have gaps if the stray light mask is used. An unaggressive option may be run by setting the /UNAGGR keyword. This disables production of the larger masks for very bright stars (which produce diffuse scattered light over a large fraction of the array), avoiding gaps in coverage in low coverage data if used as masks during mosaicing.

To run the masker, you need files containing lists of BCD and Dmask image filenames (for example, files my_bcds.lis, my_dmasks.lis), and a table file containing the 2MASS stars in this area (for example, my_2masslist.tbl). 2MASS tables produced by the IRAC pipeline are in the right format. If you generate your own 2MASS table (e.g., with an IRSA Gator server query), the following columns (and only these columns) must be in the table: 1. Right Ascension, 2. Declination, 3. dRA, 4. dDec, 5. delta, 6. J mag, 7. H mag, 8. K mag. Then type


within IDL. You will get new files prefixed by "smask_", one for each BCD, with the stray light masks in. If you want to change bit 8 of the input Dmask files, you would call the program in the following way


within IDL. This would modify the dmasks in my_dmasks.lis so that the straylight mask is written to bit 8. The program uses the following internal procedures to mask each source of straylight:

  1. straymask[1-4]fpa: scattering from the hole in the FPA cover (especially strong in channels 1 and 2)
  2. straymask1c: unknown source of scattering in channel 1 off lower right corner of the BCD ("zone 1C").
  3. straymask[3-4]det: scattering off edge of detector in channels 3 and 4
  4. straymask3s: unknown source of scattering producing "conic section" pattern in channel 3 off top right-hand edge of BCD.

Thresholds for applying the masks are hard-coded in, but are easy to alter if necessary by editing the program. Currently the masking is rather conservative. Some of the rarer straylight spots (zone 1C, FPA and conic section scattering in channel 3, and FPA scattering in channel 4) do not have well-established thresholds at this time.

Example masks from Galactic FLS AOR 4958976 are available below for each channel. For each channel there is also a corresponding list of the masks which actually have the straylight bit (8) set. The corresponding BCDs, Dmasks, and 2MASS tables (*irsa.tbl) for this AOR can be downloaded from the archive. The easiest way is probably to use an AOR ID Query and give AOR ID 4958976.

Further notes and a revision history can be found in the comments within the program.

Examples (see above)