SSC Home Page

A Portion of the Galactic First Look Survey:
IRAC, channel 3, 5.8 micron

Requirements:

Outline of the demo:

Here we use AOR 4958976, one of several which together comprise the galactic First Look Survey (FLS). AOR 4958976 contains data taken in IRAC's high dynamic range (HDR) mode. This means the even (odd) numbered images have exposure times of 0.4 (10.4) seconds i.e. nominal 0.6 (12) seconds. I illustrate how to make a ch3 [5.8 micron] 10.4s mosaic. See also this example of how to make the corresponding ch1 [3.6 micron] 10.4s mosaic. The examples are very similar but the overlap correction is more dramatic for ch3. If you have already worked through the ch1 example you may be able to skip straight to step (4) section 3.

The following example will explain how to perform three steps - creating a reference frame appropriate to the available images, applying an overlap correction to the bcd images (a constant offset to compensate for the varying bias level), and finally creating the mosaic itself.

The IRAC team is working on developing several (IDL) scripts to fix artifacts eg column pulldown, muxbleed. It is not clear on what timescale these will be released. The example here will be expanded to include these steps at the time the scripts are made publicly available.

You will need to run these MOPEX commands:

You will need to use these namelists:

A namelist file contains a list of modules and parameters expected by MOPEX. The modules may be set either to 0 or to 1. If set to 0, they are ignored and no operation is performed.

Step by Step Guide

(1) Download the data (if you haven't already done this)

  1. Download AOR 4958976 using the AORID option under "File" from the leopard main menu.

  2. Select IRAC channel 3 (or all four IRAC channel if you prefer) using "Enabled IRAC" under "Select". Choose bcd (basic calibrated data ie single images which have been run through the Spitzer online pipeline, had some rough clean-ups applied (orientation flipping, dark subtraction, flatfield correction, conversion into units of MJy/sr) and pbcd (post-basic calibrated data ie MOPEX has been run automatically on the bcds with "best-guess" default parameters and mosaics etc created). To download click on the boxes in the bottom right-hand corner of leopard main window.

  3. unzip the files that leopard puts on your disk. Here's a script that'll do it for you:
    unix% foreach i (`ls *.zip`)
    unix% foreach? unzip $i
    unix% foreach? end

(2) A quick look at your data

  1. cd into the "pbcd" area of your new data.
    cd /where/you/unpacked_data/gflsirac/r4958976/ch3/pbcd/

  2. Look at the ch3 mosaic. (ds9 or any other viewer of choice, even Spot)
    Download the fits file

    You should see this image:

(3) Set up files and namelists in preparation to remosaic data

  1. In /where/you/unpacked_data/gflsirac, you will want to make directories "cal" and "cdf". Download the pmask calibration files provided by the IRAC team to your "cal" directory. Also download these useful namelist files to your "cdf" directory.

  2. For simplicity I recommend copying all the bcd, bunc (uncertainty), and bdmsk (bad pixel mask) fits images to one directory. For now I'll use the top directory ie gflsirac although this is messy and clutters it up. It would probably be better to put them into eg an images directory and edit the various required list files appropriately. If you leave them where they are, some steps may overwrite them - this may or may not be a problem for you. The bcd, bunc and bdmsk images are channel and AOR dependent and sit in eg /where/you/unpacked_data/r4958976/ch3/bcd. So you'll want to type something like:
    cp /where/you/unpacked_data/r4958976/ch3/pbcd/*bcd.fits .
    cp /where/you/unpacked_data/r4958976/ch3/pbcd/*bunc.fits .
    cp /where/you/unpacked_data/r4958976/ch3/pbcd/*bdmsk.fits .

  3. MOPEX's various namelist files require a set of lists of images to process. We'll make them now. Separate lists of the bcd (IMAGE_STACK_FILE_NAME), bunc ie the uncertainty images (SIGMALIST_FILE_NAME), and the bdmsk ie mask images (DCE_STATUS_MASK_LIST) are required, one per line.

    Make these three files for each channel and exposure time eg ch3_10.4_bcd.lst, ch3_10.4_bunc.lst, ch3_10.4_bdmsk.lst.

    Also make a a master list containing the names of all images in the four channel or whichever subset of these you think you will want to mosaic. If you have already worked through the example for ch1 you will already have made the fiducial image frame (FIF) and can skip to (5). eg masterch3.lst

    cat masterch1.lst  masterch2.lst  masterch3.lst  masterch4.lst  >  master.lst 
    This list is used to make the fiducial image frame (FIF) - see (4) section 2. Since you probably want the mosaics for the various channels to be registered to one fiducial frame of reference, you need to include the names of all the BCDs of interest and for all the channels of interest.

(4) Remosaic data

NOTE - MOPEX expects all the nl (namelist) files to be in the cdf directory.

  1. In the window where you will be working, once per session, do this:
    source /your/path/here/mopex_030106/mopex.csh 

  2. Make a reference frame (fif) to include all 4 IRAC channels. You need to simply run one module, run_fiducial_image_frame, in the mosaic.pl script and make sure to include all 4 channels data. If you run the same module in overlap.pl, only one channel will be used to create the fif and some images from an alternate channel might extend out of the fif region and cause an error.
    /path/to/your/mopex/mopex_030106/bin/mosaic.pl -n fif_2mass.nl > & fif_2mass.log

    Note that in this example the namelist file, cdf/fif_2mass.nl, is set to run only the run_fiducial_image_frame module.

    All this step does is make a fiducial reference table, fif/FIF.tbl, based on all the bcd images which will comprise the mosaic. The log file is not necessary but is useful for debugging.

  3. Run the overlap corrector.
    /path/to/your/mopex/mopex_030106/bin/overlap.pl -n overlap_10.4_ch3.nl -F fif/FIF.tbl > & overlap_10.3_ch1.log

    The main parameters in the namelist file, in this case cdf/overlap_10.4_ch3.nl that you may need to edit are: (my options are shown)

    OUTPUT_DIR = overlap_10.4_ch3
    
    IMAGE_STACK_FILE_NAME = ch3_10.4_bcd.lst
    PMASK_FILE_NAME = cal/chan3_pmask.fits
    DCE_STATUS_MASK_LIST = ch3_10.4_bdmsk.lst
    SIGMALIST_FILE_NAME = ch3_10.4_bunc.lst 
    This produces fits images in the OUTPUT_DIR specified ie overlap_10.4_ch3/Overlap_Corr/ called "correct_SPITZER_I3_4958976_0_0_1_bcd.fits". Copy these overlap-corrected files to your top (eg gflsirac) directory or edit the IMAGE_STACK_FILE_NAME in your mosaicking namelist file (mosaic_10.4_ch3.nl) to point to them.

  4. Run the mosaicker on the ch3 10.4s frames
    /path/to/your/mopex/mopex_030106/bin/mosaic.pl -n mosaic_10.4_ch3.nl -F fif/FIF.tbl > & mosaic_10.4_ch3.log

    Here the namelist cdf/mosaic_10.4_ch3.nl uses an IMAGE_STACK_FILE_NAME called ch3_10.4_bcd_corr.lst. You can make this quickly by typing eg

    cp ch3_10.4_bcd.lst ch3_10.4_bcd_corr.lst 
    and prefixing the entries with "corrected"

    The main parameters in the mosaic namelist file are:
    OUTPUT_DIR = mosaic_10.4_ch3
    
    IMAGE_STACK_FILE_NAME = ch3_10.4_bcd_corr.lst
    PMASK_FILE_NAME = cal/chan1_pmask.fits
    DCE_STATUS_MASK_LIST = ch3_10.4_bdmsk.lst
    SIGMALIST_FILE_NAME = ch3_10.4_bunc.lst 
    The mosaic produced by MOPEX is always entitled mosaic.fits and is created in the OUTPUT_DIR specified ie gflsirac/mosaic_10.4_ch3/Combine. (Also useful is the coverage map, mosaic_cov.fits created in the same directory).

  • Here is the image we just made:

    And the post-bcd version which was created automatically by the pipeline.

    Note e.g. especially improvement in the ch3 overlap. The gradient you see across the image is real. The mosaic is still not great - the Spitzer Science Center is working on improving the overlap corrector and also releasing software to clean up artifacts. (A minor point is that you may notice some distortion between the online mosaicker version and the mosaics we made here - this is because we chose to create precisely square pixels for this example - using the MOSAIC_PIXEL_RATIO parameters inthe namelist cdf/mosaic_10.4_ch3.nl).

    Here are the fits images if you want to grab them and view them with ds9 or any other viewer of your choice.

    mosaic_10.4_ch3.fits (example version )

    bcd_mosaic_10.4_ch3.fits (automatically generated version)

    (5) Be aware of the following advanced products (there may be something useful). These are being supplemented continuously so it is a good idea to check back regularly.

    Return to the Data Analysis Demos main page.