mAddExec

Description:
Builds a series of outputs (which together make up a tiled output) through multiple executions of the mAdd modules.
Syntax:
mAddExec [-p imgdir] [-n(o-areas)] [-a mean|median] [-e(xact-size)] [-d level] [-s statusfile] [-x TilesSizeAxis0] [-y TileSizeAxis1] [-o OverlapAxis0] [-q OverlapAxis1] images.tbl template.hdr tiledir out.fits

Switches:

-p imgdir
Specifies path to directory containing reprojected images. If the -p switch is not included, mAdd will look for the input images in the current working directory.
-n
Co-addition ignores weighting by pixel areas and performs coaddition based only on pixel postions. Will not output an area image for the output image.
-a type
Select type of averaging to be done on accumulated pixel values (either mean or median).
-e
Enables exact size mode. The output image will match the header template exactly, instead of shrinking the output to fit the data.
-d level
Turns on debugging to the specified level (1-3).
-s statusfile
mAdd output and errors will be written to statusfile instead of stdout.

Arguments:

images.tbl
ASCII table (generated by mImgtbl) containing metadata for all images to be coadded.
template.hdr
FITS header template to be used in generation of output FITS
tiledir
Directory to contain output tile images and header templates
out.fits
Prefix for output tile images
Results:
If successful, mAddExec creates a set of FITS tiles covering the area described in template.hdr, as well as matching "tiled" header files for each output tile.

Examples:

The following example runs mAddExec on this set of images, generating a set of tiles conforming to the size and overlap specified on the command line:

$ mAddExec -p proj -x 1000 -y 1000 images.tbl template.hdr tiles tile.fits
[struct stat="OK", mTileHdr_count=4, mTileHdr_failed=0, mTileHdr_warning=0, mAdd_count=4, mAdd_failed=0, mAdd_warning=0, time=8]
$ ls tiles
tile_0_0.hdr
tile_0_0.fits
tile_0_0_area.fits
tile_0_1.hdr
tile_0_1.fits
tile_0_1_area.fits
tile_1_0.hdr
tile_1_0.fits
tile_1_0_area.fits
tile_1_1.hdr
tile_1_1.fits
tile_1_1_area.fits

Return Codes:

  • [struct stat = "OK", time=time]
  • [struct stat="ERROR", msg="Usage: mAddExec [-p imgdir] [-n(o-areas)] [-a mean|median] [-e(xact-size)] [-d level] [-s statusfile] [-x TilesSizeAxis0] [-y TileSizeAxis1] [-o OverlapAxis0] [-q OverlapAxis1] images.tbl template.hdr out.fits
  • [struct stat="ERROR", msg="MPI initialization failed"]
  • [struct stat="ERROR", msg="Invalid argument for -x flag"]
  • [struct stat="ERROR", msg="Invalid argument for -y flag"]
  • [struct stat="ERROR", msg="Invalid argument for -o flag"]
  • [struct stat="ERROR", msg="Invalid argument for -q flag"]
  • [struct stat="ERROR", msg="Invalid argument for -a flag"]
  • [struct stat="ERROR", msg="Cannot open status file: statusfile"]
  • [struct stat="ERROR", msg="command line option was not integer"](Number of pixels must be positive integer)
  • [struct stat="ERROR", msg="option cannot be negative"](Number of pixels must be positive integer)
  • [struct stat="ERROR", msg="Invalid image metadata file: filename"]
  • [struct stat="ERROR", msg="Need columns: cntr,fname, crpix1, crpix2, cdelt1, cdelt2, naxis1, naxis2, crval1, crval2 in image list"](missing columns in image metadata table)
  • [struct stat="ERROR", msg="Memory allocation failed"]
  • [struct stat="ERROR", msg="Too many open files"]
  • [struct stat="ERROR", msg="Input wcsinit() failed."]
  • [struct stat="ERROR", msg="Failed to allocate enough memory for output arrays"]
  • [struct stat="ERROR", msg="Bad WCS in header template."]
  • [struct stat="ERROR", msg="Template file not found."]
  • [struct stat="ERROR", status=stat, msg="FITS library error"]
  • [struct stat="ERROR", msg="general error message"]