mProjectQL Function Call

Function Arguments

/*-***********************************************************************/
/*                                                                       */
/*  mProjectQL                                                           */
/*                                                                       */
/*  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, mProject, processes a single input image and            */
/*  projects it onto the output space.  Other Montage modules do this    */
/*  with full flux-conserving accuracy but pay the price in speed.       */
/*  This module produces a quick approximation which is nevertheless     */
/*  adquate even for some science applications.                          */
/*                                                                       */
/*  Each output pixel is project to the input pixel space and its value  */
/*  approximated based on surrounding input pixels via interpolation.    */
/*  Unlike the other modules, no area file is generated since no         */
/*  overlap areas are determined.  When coadding overlapping images      */
/*  later, this will effect the accuracy of edge pixels but this cannot  */
/*  be helped.                                                           */
/*                                                                       */
/*  The input can come from from arbitrarily disparate sources.  It is   */
/*  assumed that the flux scales in the input images match, but this is  */
/*  not required (leading to some interesting combinations).             */
/*                                                                       */
/*   char  *input_file     FITS file to reproject                        */
/*   int    hdu            Optional HDU offset for input file            */
/*   char  *output_file    Reprojected FITS file                         */
/*   char  *template_file  FITS header file used to define the desired   */
/*                         output                                        */
/*                                                                       */
/*   int    interp         Interpolation scheme for value lookup.        */
/*                         Currently NEAREST of LANCZOS.                 */
/*                                                                       */
/*   char  *weight_file    Optional pixel weight FITS file (must match   */
/*                         input)                                        */
/*                                                                       */
/*   double fixedWeight    A weight value used for all pixels            */
/*   double threshold      Pixels with values below this level treated   */
/*                         as blank                                      */
/*                                                                       */
/*   char  *borderstr      Optional string that contains either a border */
/*                         width or comma-separated "x1,y1,x2,y2, ..."   */
/*                         pairs defining a pixel region polygon where   */
/*                         we keep only the data inside.                 */
/*                                                                       */
/*   double fluxScale      Scale factor applied to all pixels            */
/*                                                                       */
/*   int    expand         Expand output image area to include all of    */
/*                         the input pixels                              */
/*                                                                       */
/*   int    fullRegion     Do not "shrink-wrap" output area to non-blank */
/*   int    noAreas        In the interest of speed, generation of area  */
/*                         images is turned off.  This turns it back on. */
/*                         pixels                                        */
/*                                                                       */
/*   int    debug          Debugging output level                        */
/*                                                                       */
/*************************************************************************/

struct mProjectQLReturn *mProjectQL(char *input_file, int hduin, char *ofile, char *template_file, int interp,
                                    char *weight_file, double fixedWeight, double threshold, char *borderstr,
                                    double fluxScale, int expand, int fullRegion, int noAreas, int debugin)

Return Structure

struct mProjectQLReturn
{
   int    status;        // Return status (0: OK, 1:ERROR)
   char   msg [1024];    // Return message (for error return)
   char   json[4096];    // Return parameters as JSON string
   double time;          // Run time (sec)   
};