Before Building Montage:
When the tar file is first extracted, the following directories and files are created:
- Text file describing the changes made in each version of Montage.
- Montage user license
- The main Montage Makefile, which configures and builds the toolkit
- Source code for core Montage executables
- Instructions on building Montage and where to go for help
- Location for Montage excutables, once built
- Directory containing information on accessing Montage documentation
- Source code for grid tools
- Source code for libraries
- Source code for extra utilities
The figure below (taken from the Montage Software Specification) shows the core modules delivered with the Montage distribution:
After building Montage, the following executables will be placed in the bin folder:
Core Modules: [source code in the Montage subdirectory]
- Coadd the reprojected images using the same FITS header template and working from the same mImgtbl list.
- Builds a series of outputs (which together make up a tiled output) through multiple executions of the mAdd module.
- Remove a background from a single image (planar has proven to be adequate for the images we have dealt with).
- Run mBackground on all the images in the metadata table.
- Modelling/fitting program which uses the image-to-image difference parameter table to interactively determine a set of corrections to apply to each image to achieve a "best" global fit.
- Changes the datatype of an image (i.e., 64-bit floating point to 16-bit integer)
- Using an image metadata table, determine which images cover a given point, polygon, circle, or box.
- Perform a simple image difference between a single pair of overlapping images. This is meant for use on reprojected images where the pixels already line up exactly.
- Run mDiffmOverlaps.
- Fit a plane (excluding outlier pixels) to an image. Meant for use on the difference images generated above.
- Run mFitplane on all the mOverlaps pairs. Creates a table of image-to-image difference parameters.
- Runs both mDiff and mFitplane on all the mOverlaps pairs. Creates a table of image-to-image difference parameters.
- Performs mFitPlane and mBackground on a set of images.
- Strip the header from an image and write it to a text file.
- Checks the header of an image to make sure all the keyword values are valid.
- Makes a list (with WCS information) of all header files in the named directory.
- Extracts the FITS header information from a set of files and creates an ASCII image metadata table which can be used by several of the other programs.
- From a list of images to be mosaicked together, mMakeHdr generates the FITS header that best describes the output image.
- A general output FITS image is defined and its pixels are then populated from a table of point sources. The source fluxes from the table are distributed based on a source-specific point-spread function.
- Analyze an image metadata table to determine a list of overlapping images.
- Reprojects a single image to the scale defined in a pseudo-FITS header template file (an ASCII file with the output image header lines, but not padded to 80 characters and with newlines at the end of each line). Actually produces a pair of images: the reprojected image and an "area" image consisting of the fraction input pixel sky area that went into each output pixel.
- Fast reprojection of images in tangent-plane projections.
- A simple executive which runs mProject for each image in an image metadata table.
- Replaces the header of the input file with one supplied by the user (presumably a "corrected" version of the input).
- Changes the binning of a FITS image.
- Creates a subimage of a FITS image.
- mSubset generates a table of images that is a subset of the input table, containing only those images that cover the area defined by a given FITS header.
- mTANHdr analyzes a template file and determines if there would be an adequate equivalent distorted TAN projection, within a specified tolerance, and outputs the alternate header.
- This module takes a header template file and creates another which represents one of a regular set of tiles covering the original.
- This module slices an input image into a series of output images (tiles).
Utilities: [source code in the util subdirectory]
- Retrieve a list of images that overlap a position on the sky
- Retrieve a FITS image from a remote archive
- Call mArchiveGet for each image in a table generated by mArchiveList
- From a list of images, determine which provides the best coverage for a location on the sky
- Point-source imaging program
- Mosaicking executive for 2MASS, SDSS and DSS data.
- Converts NaNs in an image to some other value, or converts a range of values into NaNs
- Create a FITS header template from user-supplied parameters
- Create a JPEG image from one or more input FITS images
- Given a FITS header, map a pixel coordinate to a sky location
- Perform a rotation on a FITS image
Grid Tools: [source code in the grid subdirectory]
These modules should be considered prototypes: they have been used extensively but have not been subject to the same rigorous testing to which the core modules have been subjected. We advise users to contact Montage (email@example.com) before employing them to verify limitations in their use and changes in the interfaces.
Brief descriptions of the tools available can be found here.
External Library Notes
Montage uses two external libraries which the user may wish to update periodically with newer versions:
- CFITSIO - The FITS file I/O library (http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html)
- LIBWCS - The World Coordinate System projection library (http://tdc-www.harvard.edu/software/wcstools/)
We have made minor modifications to a few parameters to work with large numbers of files and files greater than 2 GBytes.
CFITSIO Library Configuration Notes:
- The NIOBUF defined variable in fitsio2.h has been set to 250 (rather than the original 40) so that we can have a large number of files open during mAdd runs.
- The first appearance of CFLAGS should be changed to
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"to allow the use of large (>2 Gbyte) files.
- On at least some LINUX platforms, the CFITSIO
library fails due to a confusion over the values
of what should be unsigned integers (they are
taken as negative numbers rather than large positive
numbers in comparison statements).
We have modified the library code in two places so far to work around this:
- In buffers.c:
if ( !err_mode && (rstart >= (fptr->Fptr)->logfilesize) ) /* EOF? */becomes
if ( !err_mode && (rstart >= (unsigned)((fptr->Fptr)->logfilesize)) ) /* EOF? */and line 489:
if (rstart >= (fptr->Fptr)->filesize) /* EOF? */becomes
if (rstart >= (unsigned)((fptr->Fptr)->filesize)) /* EOF? */
- In drvrfile.c line 323:
if (*filesize < 0)becomes
if ((unsigned)(*filesize) < 0)
- In getkey.c line 188:
if (bytepos > endhead ||becomes
if (bytepos > (unsigned) endhead ||
- In fitscore.c line 3798:
else if ((fptr->Fptr)->hdutype != ASCII_TBL && firstelem < 1)becomes
else if ((fptr->Fptr)->hdutype != ASCII_TBL && (unsigned)firstelem < 1)
These seem to be enough for our simple use of the library but are probably not the only location such errors occur.
- In buffers.c:
WCS Library Configuration Note:
The following changes must be made to every new version the WCS library code to facilitate porting:
Under the directory lib/src/wcstools-X.X.X/libwcs:
- The file "COPYING" must be chmod to 664.
- The references to "webread.o" and "matchstar.o" must be removed from the Makefile.
- 'clean' and 'install' options must be added to the Makefile:
clean: rm -f libwcs.a *.o install: cp libwcs.a ../../.. cp *.h ../../../include
- The line
CFLAGS= -g -D_FILE_OFFSET_BITS=64should be added to the to the Makefile to allow the use of large (>2 GByte) files.