Return to Post-BCD pages
 
Manual Contents
 
Getting Started
 
Input Files
 
Background Matching (overlap.pl)
 
Mosaicking (mosaic.pl)
 
Point Source Extraction (apex*.pl)
 
Basic Concepts
 
Appendix 1: Full List of MOPEX Scripts
 
Appendix 2: Fatal Bit Patterns
 
Appendix 3: Full Lit of MOPEX Modules

Getting Started and Running MOPEX

For information on how to get started with the GUI, please refer to the GUI help system. For instructions on how to start the GUI, please see the MOPEX Download page. All information on this page refers to the command-line version of MOPEX.

We assume that you have downloaded MOPEX and installed it as per the instructions on the download page.


Setting up MOPEX to run on the command line

After completing the installation instructions, the MOPEX environment variables must be set up as follows:

  1. Edit the file mopex-script-env.csh (found in the MOPEX installation directory) to set the installation path MOPEX_INSTALLATION to the current directory (pwd) e.g. if MOPEX is in /home/joe/mopex, then you should set the following in mopex-script-env.csh:
    setenv MOPEX_INSTALLATION /home/joe/mopex

  2. Ensure that PERL_PATH is set to your perl installation path

  3. Running cshell (not bash), source mopex-script-env.csh:
    prompt> source mopex-script-env.csh

  4. MOPEX can now be run from the command line using the syntax described at the bottom of this page.


Getting your data

All Spitzer data are downloaded from the SSC archive using the archive software Leopard. You will be given a choice of data products to download. MOPEX expects the Basic Calibrated Data (BCD) products as input, but the Post-BCD (PBCD) products are useful for quick-look images/spectra. Users are warned not to use Post-BCD products for science. Once you have downloaded your data, unpack the zip files into a data directory of your choice - we will call this <data_dir>.


Setting up the MOPEX directory structure

Once MOPEX has been set up for the command line, you need to create the expected directory structure. We will call the directory containing your data <data_dir>, the directory containing the mopex software <mopex_dir>, and the directory from which you are planning to run MOPEX <working_dir>. Your <working_dir> does not have to be the same as <mopex_dir>.

In order to run MOPEX, the software expects 4 basic input types:

  1. your input FITS images (e.g. Spitzer BCDs)
  2. ASCII text files listing the input images
  3. a file listing the parameters you want to use to reduce your data (the "namelist")
  4. any required calibration files (e.g. pmasks, sample PRFs etc).

In order to run MOPEX, your FITS images should be in <data_dir>, your lists containing the input images can be stored anywhere (default is in <working_dir> but can be changed by specifying the full path) and your namelist must be in a subdirectory called <working_dir>/cdf/. The calibration files must be in the subdirectory <working_dir>/cal/. Once this directory structure has been set up, you are ready to run MOPEX. Please see the pages on MOPEX Input for details on how to set up the input files.



Running MOPEX

Once your directory structure is set up and you have created your input files and stored them in the correct place, you are ready to run MOPEX from <working_dir>. MOPEX is run on the command line by calling a set of Perl wrapper scripts (stored in <mopex_dir>/bin) to perform the basic reduction tasks (e.g. background matching, mosaicking of the input images, point source extraction). Each of these wrapper scripts runs a series of individual "modules" in sequence to read in the data, carry out the reduction and write the output. Depending on how you wish to process your data, some of these individual modules need to be turned on or off within the processing flow. The choice of modules, along with various other options, is controlled from within an ASCII parameter file called the "namelist".

MOPEX comes with example template namelists in the directory <mopex_dir>/cdf/ (also available from the main MOPEX webpage). For a full list of reduction scripts available from the command line, please see Appendix 1: Full list of MOPEX Scripts.

As an example of how to run MOPEX, a typical reduction involves background-matching your input images, mosaicking them together, and then carrying out point source extraction on the resultant mosaic. These three steps require three scripts: overlap.pl, mosaic.pl and apex_1frame.pl. The syntax for running MOPEX is as follows:

prompt> script.pl <option flag> <specification>

where the option flags can be used to specify input and output files, and must be matched with a specification. The option flags that can be used vary from script to script, and are all listed on the introduction pages for the different pipelines (Background Matching (Overlap), Mosaicking and Point Source Extraction).

Not all of the input and output options have to be specified on the command line - most can be specified from within the namelist. The only option that cannot is the name of the namelist itself. The simplest possible (and recommended) way to run MOPEX would therefore be to specify all of the options in the namelist. This option would look something like:

prompt> mosaic.pl -n mosaic_namelist.nl



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

help@spitzer.caltech.edu

This file was last modified on Tue Jun 10 17:37:43 PDT 2008.

California Institute of Technology Jet Propulsion Laboratory NASA