DOKK / manpages / debian 11 / montage / mProjectCube.1.en
MPROJECTCUBE(1) Montage MPROJECTCUBE(1)

mProjectCube - Reproject a single cube to a user specified scale and coordinate system

mProjectCube [-z factor] [-d level] [-s statusfile] [-h hdu] [-x scale] [-w weightfile] [-W fixed-weight] [-t threshold] [-X] [-e(nergy-mode)] [-f] in.fits out.fits hdr.template

mProjectCube reprojects a single cube to the scale defined in a FITS header template file (read more about header templates here). The program produces a pair of files: the reprojected cube and an "area" image consisting of the fraction input pixel sky area that went into each output pixel. The "drizzle" algorithm is implemented. The algorithm proceeds by mapping pixel corners (as adjusted by drizzle, if called) from the input pixel space to the output pixel space, calculating overlap area with each output pixel, and accumulating an appropriate fraction of the input flux into the output cube pixels. In addition, the appropriate fraction of the input pixel area is accumulated into the area image pixels. Projection of points from input pixel space to output pixel space is calculated in two steps: first map from input pixel space to sky coordinates; second map from sky coordinates to output pixel space.

One situation that has happened often enough to warrant special note: It is possible to define a FITS header with the reference location off the image. In particular, people often reference cylindrical projections (e.g., CAR, CEA) to location (0.,0.) (e.g., the Galactic center). This is not wrong in itself but does lead to extremely large pixel offsets (e.g., in the hundreds of thousands). Related to this, if you extract a header from an image with large offsets of this type, it is unlikely that you can simply change projection types without also adjusting the reference location/offsets. Most likely, you will end up witr the reprojected data all being off-scale.

Processing is done utilizing the drizzle algorithm. factor is a floating point number; recommended drizzle factors are from 0.5 to 1.
Causes additional debugging information to be printed to stdout. Valid levels are 1-5 (for higher debugging levels, it is recommended to redirect the output to a file).
Output and errors are written to statusfile instead of being written to stdout.
Use the specified FITS extension (default is to use the first HDU with image data)
Apply a correction factor of scale to each pixel.
Path to a weight map to be used when reading values from the input image.
Use constant weight value for the whole image.
Pixels with weights below threshold will be treated as blank.
Makes the output region (originally defined in the header template) big enough to include all of the input images.
Process the data as total energy rather than the default energy density (scale values by relative pixel areas).
Output the full region requested even if there is a border of NULL values (default is to shrinkwrap to just the pixels with values).

Input FITS file to be reprojected.
Path of output FITS file to be created.
FITS header template to be used in generation of output image

Two files are created as output: the reprojected FITS file (out.fits), and an "area" image (out_area.fits) which records the amount of coverage (in output pixel space) provided by the input images.

[struct stat="OK", time=seconds]
Drizzle factor string (string) cannot be interpreted as a real number
Weight threshold string (string) cannot be interpreted as a real number
Flux scale string (string) cannot be interpreted as a real number
Cannot open status file: statusfile
HDU value (hdu) must be a non-negative integer
No overlap
Not enough memory for output data image array
Not enough memory for output area image array
Output wcsinit() failed.
Input wcsinit() failed.
FITS library error
All pixels are blank
Template file not found
Image file in.fits missing or invalid FITS
Weight file weightfile missing or invalid FITS

$ mProjectCube rawdir/real_orig.fits projdir/base_unity.fits templates/galactic_orig.txt
[struct stat="OK", time=143]

The drizzle algorithm has been implemented but has not been tested in this release.

If a header template contains carriage returns (i.e., created/modified on a Windows machine), the cfitsio library will be unable to read it properly, resulting in the error: [struct stat="ERROR", status=207, msg="illegal character in keyword"]

It is best for the background correction algorithms if the area described in the header template completely encloses all of the input images in their entirety. If parts of input images are "chopped off" by the header template, the background correction will be affected. We recommend you use an expanded header for the reprojection and background modeling steps, returning to the originally desired header size for the final coaddition. The default background matching assumes that there are no non-linear background variations in the individual images (and therefore in the overlap differences). If there is any uncertainty in this regard, it is safer to turn on the "level only" background matching (the "-l" flag in mBgModel.

2001-2015 California Institute of Technology, Pasadena, California

If your research uses Montage, please include the following acknowledgement: "This research made use of Montage. It is funded by the National Science Foundation under Grant Number ACI-1440620, and was previously funded by the National Aeronautics and Space Administration's Earth Science Technology Office, Computation Technologies Project, under Cooperative Agreement Number NCC5-626 between NASA and the California Institute of Technology."

The Montage distribution includes an adaptation of the MOPEX algorithm developed at the Spitzer Science Center.

Dec 2016 Montage 5