mCoverageCheck Function Call

Function Arguments

/*-***********************************************************************/
/*                                                                       */
/*  mCoverageCheck                                                       */
/*                                                                       */
/*  Montage is a set of general reprojection / coordinate-transform /    */
/*  mosaicking programs.  Any number of input images can be merged into  */
/*  an output FITS file.  The attributes of the input are read from the  */
/*  input files; the attributes of the output are read a combination of  */
/*  the command line and a FITS header template file.                    */
/*                                                                       */
/*  This module, mCoverageCheck, can be used to subset an image          */
/*  metadata table (containing FITS/WCS information or image corners)    */
/*  by determining which records in the table represent images that      */
/*  overlap with a region definition (box or circle on the sky) given    */
/*  on the command line.                                                 */
/*                                                                       */
/*   char  *path           Path to image files (table contains relative  */
/*                         paths)                                        */
/*   char  *infile         Table of image metadata                       */
/*   char  *outfile        Output table of matching records              */
/*                                                                       */
/*   int    mode           There are six "modes" of use, depending on    */
/*                         the region to be checked is defined:          */
/*                         0 (POINTS), a set of convex polygon vertices; */
/*                         1 (BOX), box center and sizes; 2 (CIRCLE),    */
/*                         center and radius of a cone on the sky;       */
/*                         3 (POINT), a single point on the sky;         */
/*                         4 (HEADER), a FITS header template (file);    */
/*                         and 5 (CUTOUT),and 5 (CUTOUT), like box but   */
/*                         uses the full image file WCS and updates the  */
/*                         record to indicate what subset of each image  */
/*                         overlaps the box.                             */
/*                                                                       */
/*   char  *hdrfile        FITS header template file; only used by mode  */
/*                         4 (HEADER) above.                             */
/*                                                                       */
/*   int    narray         Size of the 'array' of real numbers to use.   */
/*   double array[]        Array of real numbers.  The size and use      */
/*                         depend on mode.  For instance for mode        */
/*                         0 (POINTS) the number is twice the number     */
/*                         of vertices in the polygon.                   */
/*                                                                       */
/*   int    debug          Debugging output level                        */
/*                                                                       */
/*************************************************************************/

struct mCoverageCheckReturn *mCoverageCheck(char *path, char *infile, char *outfile, int modein, char *hdrfile, int narray, double *array, int debug)

Return Structure

struct mCoverageCheckReturn
{
   int    status;        // Return status (0: OK, 1:ERROR)
   char   msg [1024];    // Return message (for error return)
   char   json[4096];    // Return parameters as JSON string
   int    count;         // Number of images matching region
};