mSubset

Description:
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.
Syntax:
mSubset [-d level] [-f] [-s statusfile] images.tbl template.hdr subset.tbl

Switches:

-d level
Turns on debugging to the specified level (1-3).
-f
Fast mode - input file must include corners (-c flag in mImgtbl) to utilize this mode.
-s statusfile
Output and errors are sent to statusfile instead of to stdout

Arguments:

images.tbl
ASCII table (generated by mImgtbl) containing metadata for image collection.
template.hdr
FITS header template defining the area of interest.
subset.tbl
Path to output table, which will contain only those FITS images covering the area defined by template.hdr.
Results:
[struct stat="OK", count=nin, nmatches=nout]
where nin is the number of rows found in images.tbl, and nmatches is the number of rows in subset.tbl, which includes only those images that overlap the area defined by template.hdr.

Examples

$ mSubset images.tbl subset.hdr subset.tbl
[struct stat="OK", count=5, nmatches=3]

subset.tbl now contains 3 of the 5 images from images.tbl, excluding the ones that lie outside the area defined by subset.hdr.

Return Codes:

  • [struct stat="OK", count=nin, nmatches=nout]
  • [struct stat="ERROR", msg="Usage: mSubset [-d level] [-f] [-s statusfile] images.tbl template.hdr subset.tbl"]
  • [struct stat="ERROR", msg="Cannot open status file: statusfile"]
  • [struct stat="ERROR", msg="Failed to open output filename"]
  • [struct stat="ERROR", msg="Invalid image metadata file: filename"]
  • [struct stat="ERROR", msg="Not enough information to determine coverages (corners, CDELTs or CD matrix)"]
  • [struct stat="ERROR", msg="Need columns: cntr ctype1 ctype2 nl ns crval1 crval2 crpix1 crpix2 cdelt1 cdelt2 crota2 fname (equinox optional)"] (columns missing from image metadata table)
  • [struct stat="ERROR", msg="Bad WCS for image n"]
  • [struct stat="ERROR", msg="Output wcsinit() failed."]
  • [struct stat="ERROR", msg="Template file not found."]