Spitzer Documentation & Tools
MOPEX User's Guide

Chapter 5. Mosaicking  (mosaic.pl)

 

The Mosaic pipeline performs interpolation and co-addition of FITS images. In Spitzer terms, the software takes the individual Basic Calibrated Data (BCD) frames and combines them to create a mosaic of the observed region. There is a choice of interpolation and co-addition schemes, and the package also carries out the user's choice of outlier rejection to remove cosmic rays and bad pixels. Three main files are output by the package: a mosaic of the input BCDs, a coverage map showing how many of the input frames were rejected, and an uncertainty mosaic showing the uncertainties in each output pixel.

5.1            Basic Input Requirements

In order to carry out a basic mosaicking, MOPEX will expect some or all of the following files as input. See Chapter 3 on MOPEX Input for more information on the format of these files.

 

  • A text file containing a list of input data images (e.g. Spitzer BCD frames; required)
  • A text file containing a list of input uncertainty images (optional)
  • A text file containing a list of input status mask images (optional)
  • A mask image flagging permanently damaged pixels in the detector (PMask; optional)
  • A "namelist" file specifying the parameters to be used for mosaicking (Command-Line MOPEX only; required)

5.2            Running Mosaic

To load a standalone Mosaic pipeline (i.e. without appending to an existing Overlap pipeline), either start from a MOPEX template namelist (File > New Mosaic Pipeline), load an existing Mosaic namelist file (File > Read Name List) or load an empty flow and insert a Mosaic pipeline from there (File > New Empty MOPEX Pipeline, then go to Insert Mosaic at the top of the flow window and choose Empty Pipeline). If you choose the last option, MOPEX will load an empty Mosaic flow to which you can add and subtract modules, and modify the input parameters.

 

To append a Mosaic pipeline to the end of an existing Overlap pipeline so that you can use the background-corrected images as input, click on the Insert Mosaic rectangular button at the top of the Overlap window. This will pull up a dialogue box giving you three options. Choose From File to load a previously-created namelist from file, From Template to start from one of the inbuilt Mosaic templates, and Empty Pipeline to open an empty Mosaic flow that you can build up by hand. If you have previously added and deleted a Mosaic pipeline from a particular flow, the last option will instead read Re-add Pipeline.

 

For information on how to run Mosaic on the command line, see Chapter 9.

5.3            Mosaicking a Portion of the Total FIF

If you have a list of images covering a large area of the sky, but only wish to make a mosaic covering a small portion, you can use the Mosaic Geometry module. This module can take a user-supplied FIF, along with the full lists of input images, and create lists of only those images that fall within the FIF area. To create a modified FIF and run Mosaic Geometry:

 

  1. Create the Fiducial Image Frame based on the full input list of images. To do this, run Mosaic with only the Fiducial Image Frame activated in the namelist. This will create the FIF.tbl file that specifies the spatial boundaries of all of your input frames.

 

  1. Open FIF.tbl in a text editor, and modify it to cover only the spatial area that you wish to mosaic. For example, the initial FIF.tbl format is as follows:

\char comment = Output from fiducial_image_frame, version 1.4

\char Date-Time = Mar 12, 2012, 09:21:44

\real CRVAL1 = 329.129598

\real CRVAL2 = 64.662007

\real CRPIX1 = 264.50

\real CRPIX2 = 382.50

\real CROTA2 = -71.01896

\real CDELT1 = -3.39817E-04

\real CDELT2 =  -3.39801E-04

\int  NAXIS1 = 528

\int  NAXIS2 = 764

\int  EQUINOX = 2000

\char PROJTYPE = TAN

\char COORDINATE_SYSTEM = J2000

\char CTYPE1 = RA---TAN

\char CTYPE2 = DEC—TAN

\real EXTENT_X = 0.179423

\real EXTENT_Y = 0.259608

 

These are standard FITS header keywords for the most part. Â  The EXTENT_X and EXTENT_Y keywords are sizes (in degrees) of the nominal mosaic frame if the default pixel scale is used.

They do not necessarily reflect the size of final mosaic as the pixel size sent to Mosaic Interpolate can be different.  They can be ignored.

 

This file can be edited to produce a sub-mosaic at the center with a size of 100 by 100 default pixels and orientation of -45.0 deg E of N by changing the following lines:

\real CROTA2 = -45.0

\real CRPIX1 = 50.5

\real CRPIX2 = 50.5

\int  NAXIS1 = 100

\int  NAXIS2 = 100

 

  1. Re-run Mosaic but this time with the following settings:

 

·         In the Initial Settings, specify the name of the new FIF file as input;

·         Remove the Fiducial Image Frame module from the pipeline to prevent it overwriting the new FIF;

·         Include the Mosaic Geometry module in the pipeline;

 

The Mosaic Geometry module will create new lists of the input data, uncertainty and mask files that cross the modified FIF, and will pass those lists on to the subsequent modules in the Mosaic flow.  The new lists are saved as geom_*.txt.  (Insertion of Mosaic Geometry is not required to make a mosaic, but creates the lists and shortens subsequent tasks to the shorter list.)

 

Mosaicking to an alternate FIF from, for example, another dataset, just requires step 3 above.

 

5.4            Creating a Mosaic of a Moving Object

This functionality is limited to Spitzer data. Some Spitzer observations are designed for moving targets, such as comets or asteroids. Moving target coordinates are written in the input image header with the keywords RA_REF and DEC_REF. The keywords are written in the headers of all input images, regardless of whether the moving object is present in the frame.

 

MOPEX can create a mosaic in the rest frame of the moving object by setting the Moving Object Mosaic value in the Mosaic Settings module. On the command line, you should set the parameter MOVING_OBJECT_MOSAIC in the General Settings section. The value specifies the frame number that you wish to select as the stationary sky position. All other frames are then shifted relative to this initial stationary frame. i.e., if Moving Object Mosaic = 5 then MOPEX will use the pointing and target position in the 5th frame as the stationary reference frame, CRVAL1stat, CRVAL2stat, RA_REFstat and DEC_REFstat. The pointing and target information for the ith image, CRVAL1i, CRVAL2i, RA_REFi and DEC_REFi is therefore redefined as follows:

 

CRVAL1i ⇒ CRVAL1i+(RA_REFstat - RA_REFi)

 

CRVAL2i ⇒ CRVAL2i+(DEC_REFstat - DEC_REFi)

Equation 5.1

 

Setting Moving Object Mosaic to 0 is the same as omitting a value entirely, and will create a standard mosaic. Assigning any other value is the only action that the user needs to take to create the moving object mosaic. Be aware that outlier detection in this mode will reject not only cosmic ray hits and bad pixels, but real sources as well. This is because the real sources become transient in the rest frame of the moving object.