See Chapter 3 for information about all of the other input files.
The namelist file for each of the Perl processing scripts contains all of the input parameters to be used by MOPEX. Namelists can either be set up in a text file for use on the command line, or set up within the GUI. Namelists can be imported into/exported from the GUI and are interchangeable between the two interfaces. While the underlying code for MOPEX is identical for both the GUI and the command line, some of the parameter names were changed in the GUI to make their function clearer. Links to lists of all of the parameter names in the GUI and on the command line can be found near the bottom of the main MOPEX webpage.
The namelist must be saved in a subdirectory of the working directory called <working_dir>/cdf/. Specifying a full path name to the namelist when calling MOPEX will not over-ride this. This is only true when running MOPEX on the command line - if running MOPEX from the GUI, the namelist can reside in any directory. An example of a namelist can be found in the cdf/ directory of your MOPEX distribution.
The namelist has the following structure:
1. Processing flow control: depending on the options you wish to use when running MOPEX, you will want to run some of the available modules but not others. This first part of the namelist controls the switching on and off of modules in the processing flow by setting "triggers" (keywords) for the modules to 1 or 0. For example:
run_medfilter = 1 indicates "run the MedFilter module"
run_medfilter = 0 indicates "do not run the MedFilter module"
run_mosaic_dual_outlier = 1 indicates "run the Mosaic Dual Outlier module" etc.
If a module trigger word is not included in the namelist, it is set to the default value of 0.
2. Global parameters: a list of input parameters that are common to all modules, e.g. input files, pixel sizes, etc. For example:
The default values differ for different parameters - check the module descriptions for the individual processing flows.
3. Module parameter blocks: for each module, a set of input parameters specific to that module must be given. For example:
&MEDFILTER
Window_X = 45,
Window_Y = 45,
N_Outliers_Per_Window = 500,
&END
Module triggers, settings, names and parameters, both inside and outside the module blocks, can be given in any order. Their order in the namelist will not affect the order in which they are run by MOPEX. Comments in the namelist are preceded by a “#”.
IMPORTANT NOTE: all input variables in the namelists require a space preceding and following the equals sign, i.e. "variable = value". An entry like "variable=value" will not be read and the hard-coded default will be used. You will not be warned that your input value is not being read.
9.4.1 Processing Flow Control
Depending on the pipeline you are intending to run (e.g. Overlap, Mosaic, APEX), you will need to activate different modules in your namelist. For more information on which modules you are likely to need, you should see §2.5: “Which Modules Should I Choose?” and the example instrument-specific namelists in the <mopex_dir>/cdf/ directory.
For example, if you are planning to run the Background Matching (Overlap) pipeline then you may choose to run the Fiducial Image Frame, Mosaic Interpolate and Compute Overlap Correction modules, and then apply the correction to your images. In this case you would include the following lines in your namelist:
run_fiducial_image_frame = 1
run_mosaic_interp = 1
compute_overlap_correction = 1
apply_overlap_correction = 1
The keywords required to run each module are given on the individual module description pages (along with input/output parameters and an in-depth discussion of the purpose of the module) and in the table in 0: MOPEX Module List.
If a module is turned on in the pipeline then a corresponding parameter block must be included in the namelist. For more detailed information on each pipeline and each module, please see the relevant pipeline- or module-specific pages.
9.4.2 Global Parameters Outside the Module Blocks
There are 3 main types of information in the Global Parameters section: Input/Output file and directory names; Fatal Bit Patterns for use with the Spitzer mask files; and more general options that control preferences in how the processing is carried out. The available parameters are sorted by the modules that they apply to, and everything in the module descriptions that is labeled with “In Global Parameters” should go into this section.
9.4.2.1 Input Files and Output Directories
The namelist can be used to specify the input files and output directories for each module, instead of specifying them on the command line when running a pipeline. The namelist also allows you to customize the output directory name for each processing script, and each module within that script. The default output directory for all the scripts is the current working directory. To change this you should add the following line into your namelist:
OUTPUT_DIR = <your choice of output dir>
All modules have a default output directory that is a subdirectory of OUTPUT_DIR. In order to change these you should add lines similar to the one above into your namelist. The specific keyword you need to change the output directory of each module is given on the individual module help pages, along with the default directory name. For example, in order to change the output directory for the MedFilter module, look up the MedFilter Module section (e.g. §5.6.6), scroll down to the COMMAND LINE INPUT, and set the new directory name by adding the keyword into your namelist:
MEDFILTER_DIR = /your/new/medfilter/output/dir
Generally there is no need to change the default subdirectory names.
9.4.2.2 Setting Fatal Bit Patterns for Mask Files
See §8.11 for information on the Fatal Mask Bit Patterns. They are set here in the Global Parameters section of the namelist.
9.4.2.3 Other Global Parameters
The global parameters that can be specified outside the module blocks vary from pipeline to pipeline. Options include e.g. creating different types of mosaics, choosing whether MOPEX should print error messages to the command line, or whether the intermediate steps in the processing should be saved or not. Most of the available options are included in the module descriptions, but there are a few extra options only available on the command line:
verbose:Instructs MOPEX to print the output from each individual module. This is extremely useful for troubleshooting. If MOPEX encounters a problem while verbose is turned off, it may stop without printing an error message.
NICE: Runs MOPEX with the UNIX command "nice 19". If you are not familiar with nice, you can check out the Wikipedia description at http://en.wikipedia.org/wiki/Nice_(Unix).
save_namelist: The namelist used in the current run is always copied to the output directory. By default, the name of the namelist is not changed. By setting save_namelist = 1, the namelist copied to the output directory is given a unique name, which is created by appending the namelist filename to the time of execution. For example, if you ran:
unix% mosaic.pl -n myname.nl
at 12:32:53, then the namelist will be copied to the output directory as 12h32m53s_myname.nl. The default is 0, in which case the file is copied as myname.nl and will be overwritten in subsequent runs that use the same namelist.
9.4.3 Module Parameter Blocks
Each of the modules that is switched on must be accompanied by a parameter block with the input parameters for that particular module. A typical parameter block looks like this:
&MEDFILTER
Window_X = 45,
Window_Y = 45,
N_Outliers_Per_Window = 500,
&END
where the “&MEDFILTER” line tells MOPEX that this is the start of the parameter block for the MedFilter module and “&END” denotes the end of the block. Examples of parameter blocks for each module can be found on the individual module help pages, along with a full list of input parameters.
The important thing to note when editing the module blocks is that each line in a block, even a comment line headed by a “#”, must end in a comma.