Introduction for new users

This page gives you a step-by-step walk-through on how to run MOPEX for one set of the sample data available from the SSC. We assume no prior knowledge of Spitzer software, and only minimal knowledge of UNIX. Please follow these instructions for downloading and installing MOPEX, and downloading the sample data file.

MOPEX will be installed in /your/installation/path/mopex and the mopex directory will have the following subdirectories:

Directory Contents
bin All of the perl scripts that make up MOPEX. The main reduction scripts (overlap, mosaic, apex and apex_1frame) can be accessed via the GUI as well as run on the command line, but there are many useful auxiliary scripts included here that can only be run on the command line for now. See the full list of MOPEX scripts for further information.
cal Calibration files for use with MOPEX, including pmasks and Point-Response Function images for IRAC and MIPS.
cdf Example namelists (parameter files) for running MOPEX on the command line. The overlap, mosaic, apex and apex_1frame namelists are alredy included in the GUI as pre-installed templates.
examples Driver scripts for running example reductions with the sample data (available from the MOPEX download page).
readme README files for the example namelists and some of the MOPEX modules


Examining the sample data set

Once you have downloaded the sample data tar file (see above), you should create a working directory for the data. This directory does not have to be in the same place as the MOPEX installation, e.g.:

prompt> mkdir /home/user/data/mopex_example

Copy the sample data tar file into the new directory and un-tar it:

prompt> cp mopex16_sample_data.tar.gz /home/user/data/mopex_example/
prompt> cd /home/user/data/mopex_example/
prompt> tar xvfz mopex16_sample_data.tar.gz


The file will be expanded in the directory data/ with two subdirectories IRAC/ and MIPS70. For the purposes of this example we will use the IRAC data with AOR key 5504256 (channel 3 imaging of NGC5194). The data are in the directory
data/IRAC/5504256/ch3/.
You will see that there are 3 different files for each individual exposure. The actual observation data files are called *bcd.fits. The related *bunc.fits is an uncertainty file, and *bdmsk.fits is a mask file flagging the bad pixels in the array for that particular data frame. You will also see three text files: ImageList.txt, SigmaList.txt and MaskList.txt. These are the lists of the included files with the relative paths from the data directory. The relative path is important. If you are running the command-line version of MOPEX, you must either list the files with their absolute path names, or run MOPEX from the directory where the relative path originates, i.e. if the path in the file is data/IRAC/5504256/ch3/*.fits then you must run MOPEX from the directory containing the subdirectory data/



Data reduction with MOPEX

You should see the IRAC Data Reduction page and the IRAC Data Handbook for full instructions on how to reduce your IRAC data, but we will assume that the data frames have been cleaned up using Sean Carey's code for artefact mitigation and we are ready to combine the BCD frames using MOPEX.

The reduction directions diverge here, according to whether you are planning to use the MOPEX GUI or the MOPEX command-line. We encourage all new users to start with the GUI since it is more user-friendly and has an extensive help function, so we assume for now that you are using the GUI.

  1. Start the MOPEX GUI by launching the executable file e.g. for Solaris and Linux, type:

    prompt> /your/installation/path/mopex/mopex

    For Windows and Mac users, you can double-click on the MOPEX icon, or Mac users can start MOPEX from the command line by typing:

    prompt>/your/installation/path/mopex/mopex.app/Contents/MacOS/JavaApplicationStub

    If MOPEX fails to start with a message about VM, then see the list of known MOPEX bugs for a solution.

  2. MOPEX will very likely attempt to auto-update immediately. Click "Quit now and install" to update the software to the latest version.

  3. When you start MOPEX, you are presented with an empty screen. We will be running a Mosaic pipeline to mosaic together the individual BCDs into a single image. For now we will use one of the template parameter files (namelists) that are provided with the GUI.

  4. Load the template namelist for mosaicking Channel 3 IRAC BCDs by clicking on File > New Mosaic Pipeline... and selecting "Mosaic, IRAC ch3" from the pop-up menu. The pipeline with the suggested modules will be loaded into the MOPEX window. Modules can be removed from the pipeline by clicking the cross in the top-right corner of the individual modules, and added by clicking on the module name in the pop-up window "Add to Mosaic". Since we are using the template, we will leave the pipeline as-is.

  5. Next, we must tell the GUI where the input files can be found. In the Initial Setup module, click the "Add" button under Image Stack File. Select the file ImageList.txt from your data directory. Under Output Directory, specify where you would like the output to be directed, e.g. /home/user/data/mopex_example/data/IRAC/5504256/ch3/Reduced/Mosaic.

    Under Optional Input and Mask Files, you should add the SigmaList.txt file and the MaskList.txt to the Sigma List File and DCE Status Mask List inputs respectively. Finally, the last file you need to include is the permanently damaged pixel mask (pmask) file. This can be found in the MOPEX calibration file directory: /your/installation/directory/mopex/cal/. You need to select the pmask file relevant to the IRAC channel and the observation date. The date can be found in the header under the keyword "DATE_OBS", and in this case is 2004-05-18. The corresponding pmask file for this date is june04_pmasks/chan1_jun04_pmask.fits. For now we will ignore the RMask and FIF file settings.

    The final section in the Initial Setup is the General Options where you can set the pixel size of the output mosaic. The default is set up to give an output mosaic with pixel size 1.22" x 1.22".

  6. Each module has a list of settings that were set by the template namelist. For more information on these settings, you can click on the question mark to pull up the help function. We will leave all of the settings as-is for now.

  7. The pipeline is now set up, so you can either run the whole flow by clicking on the green arrow in the top left corner of the GUI, or run each module individually by clicking on the icon containing the arrow in the top left of each module setup box.

  8. You can see the final output mosaic by clicking on "View" next to "Mosaic Image File" in the Mosaic Combiner module. In the same way, you can visualise the uncertainty, standard deviation and coverage, as well as overlay the BCD and coverage files on the final mosaicked image. The files are automatically stored in the output directory, in the subdirectory Combine-mosaic.

  9. When you take a look at the output mosaic, you may find that the final image looks a little "patchy". This is a result of BCDs with uneven backgrounds being combined together. To correct this, we include an Overlap pipeline, which can be run before Mosaic to match the backgrounds of the BCDs before combining them together. The applied correction is additive (similar to a bias subtraction), and does not affect the final photometry. To run the overlap corrrection, simply load the template namelist from File > New Overlap Pipeline, and select the BCDs as the input files, as you did for Mosaic. You can then run the Overlap pipeline in exactly the same way as the Mosaic flow. Once you have run Overlap, you should re-run Mosaic, using the overlap-corrected BCDs as the input. The Sigma and Mask files will be the same as before.

  10. You can perform photometry on the final mosaic by using either APEX or your favourite package.


SPITZER HOME || SPITZER SCIENCE || INSTRUMENTS || SCIENCE USER SUPPORT || SEARCH

help@spitzer.caltech.edu

This file was last modified on Tue Sep 4 14:59:30 PDT 2007.

California Institute of Technology Jet Propulsion Laboratory NASA