mShrinkCube Function Call

Function Arguments

/*-***********************************************************************/
/*                                                                       */
/*  mCubeShrink                                                          */
/*                                                                       */
/*  This module, is a utility program for making smaller versions of a   */
/*  FITS file by averaging NxN blocks of pixels spatially and M values   */
/*  in the third and fourth cube dimensions.  N can be fractional but    */
/*  M must be an integer.                                                */
/*                                                                       */
/*   char  *infile         Input FITS file                               */
/*   int    hdu            Optional HDU offset for input file            */
/*   char  *output_file    Shrunken output FITS file                     */
/*                                                                       */
/*   double shrinkFactor   Scale factor for spatial shrinking.  Can be   */
/*                         any positive real number                      */
/*                                                                       */
/*   int    mfactor        Positive integer scale factor for shrinking   */
/*                         the third cube dimension                      */
/*                                                                       */
/*   int    fixedSize      Alternate mode: shrink so the output fits     */
/*                         in this many pixels                           */
/*                                                                       */
/*   int    debug          Debugging output level                        */
/*                                                                       */
/*************************************************************************/

struct mShrinkCubeReturn *mShrinkCube(char *input_file, int hduin, char *output_file, double shrinkFactor, 
                                int mfactor, int fixedSize, int debug)

Return Structure

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