mDiff Function Call

Function Arguments

/*-***********************************************************************/
/*                                                                       */
/*  mDiff                                                                */
/*                                                                       */
/*  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, mDiff, is used as part of a background                  */
/*  correction mechanism.  Pairwise, images that overlap are differenced */
/*  and the difference images fit with a surface (usually a plane).      */
/*  These planes are analyzed, and a correction determined for each      */
/*  input image (by mBgModel).                                           */
/*                                                                       */
/*   char  *input_file1    First input file for differencing             */
/*   char  *input_file2    Second input file for differencing. Files     */
/*                         have to already have the same projection      */
/*                                                                       */
/*   char  *output_file    Output difference image                       */
/*                                                                       */
/*   char  *template_file  FITS header file used to define the desired   */
/*                         output region                                 */
/*                                                                       */
/*   int    noAreas        Do not look for or create area images as part */
/*                         of the differencing                           */
/*                                                                       */
/*   double factor         Optional scale factor to apply to the second  */
/*                         image before subtracting                      */
/*                                                                       */
/*   int    debug          Debugging output level                        */
/*                                                                       */
/*                                                                       */
/*************************************************************************/

struct mDiffReturn *mDiff(char *input_file1, char *input_file2, char *ofile, char *template_file, 
                          int noAreasin, double fact, int debugin)

Return Structure

struct mDiffReturn
{
   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)   
};