IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21268


Ignore:
Timestamp:
Feb 2, 2009, 11:57:10 AM (17 years ago)
Author:
giebink
Message:

Doxygen comments added

Location:
branches/eam_branch_20081230/pswarp/src
Files:
1 added
21 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20081230/pswarp/src/pswarp.c

    r20410 r21268  
     1/** @file pswarp.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.13.8.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113# include "pswarp.h"
    214
  • branches/eam_branch_20081230/pswarp/src/pswarp.h

    r20307 r21268  
     1/** @file pswarp.h
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.16.8.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#ifdef HAVE_CONFIG_H
    214#include <config.h>
     
    1426
    1527#include "pswarpErrorCodes.h"
    16 #define PSWARP_RECIPE  "PSWARP" // Name of the recipe to use
    17 #define PSASTRO_RECIPE "PSASTRO" // Name of the recipe to use
     28#define PSWARP_RECIPE  "PSWARP" ///< Name of the recipe to use
     29#define PSASTRO_RECIPE "PSASTRO" ///< Name of the recipe to use
    1830
    19 #define PSWARP_ANALYSIS_VARFACTOR "PSWARP.VARFACTOR" // Name for variance factor in analysis metadata
    20 #define PSWARP_ANALYSIS_GOODPIX   "PSWARP.GOODPIX" // Name for number of good pixels in analysis metadata
     31#define PSWARP_ANALYSIS_VARFACTOR "PSWARP.VARFACTOR" ///< Name for variance factor in analysis metadata
     32#define PSWARP_ANALYSIS_GOODPIX   "PSWARP.GOODPIX" ///< Name for number of good pixels in analysis metadata
    2133
    22 // a single pswarpMap converts coordinates from one image to a second image
    23 // the linear model is only valid over a limited range of pixels
     34/**
     35 * a single pswarpMap converts coordinates from one image to a second image
     36 * the linear model is only valid over a limited range of pixels
     37 */
    2438typedef struct {
    2539    double Xo, Xx, Xy;
     
    2943} pswarpMap;
    3044
    31 // the pswarpMapGrid carries a collection of pswarpMag structures representing the
    32 // local value of the pswarpMap at different locations in the image.
     45/* the pswarpMapGrid carries a collection of pswarpMag structures representing
     46 * the local value of the pswarpMap at different locations in the image.
     47 */
    3348typedef struct {
    3449    pswarpMap ***maps;
    35     int nXpts, nYpts;                   // number of x,y samples in the grid
    36     int nXpix, nYpix;                   // x,y spacing in src image pixels of grid samples
    37     double xMin,  yMin;                 // coordinate of first grid sample
     50    int nXpts, nYpts;                   ///< number of x,y samples in the grid
     51    int nXpix, nYpix;                   ///< x,y spacing in src image pixels of grid samples
     52    double xMin,  yMin;                 ///< coordinate of first grid sample
    3853} pswarpMapGrid;
    3954
    4055typedef struct {
    41     // values which are common to all tiles
     56    /** values which are common to all tilesa */
    4257    pmReadout *input;
    4358    pmReadout *output;
     
    4661    psImage *region;
    4762
    48     // input values for this tile
     63    /** input values for this tile */
    4964    int gridX;
    5065    int gridY;
    5166
    52     // output values for this tile
    53     long goodPixels;                    // Number of good pixels
    54     int xMin, xMax, yMin, yMax;         // Bounds of tile
     67    /** output values for this tile */
     68    long goodPixels;                    //< Number of good pixels
     69    int xMin, xMax, yMin, yMax;         //< Bounds of tile
    5570} pswarpTransformTileArgs;
    5671
     
    91106    );
    92107
    93 // define threads for this program
     108/**
     109 * define threads for this program
     110 */
    94111bool pswarpSetThreads ();
  • branches/eam_branch_20081230/pswarp/src/pswarpArguments.c

    r20347 r21268  
     1/** @file pswarpArguments.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.22.8.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113# include "pswarp.h"
    214# include <glob.h>
     
    2638
    2739    {
    28         int arg;                        // Argument Number
     40        int arg;                        ///< Argument Number
    2941        if ((arg = psArgumentGet(argc, argv, "-psphot-visual"))) {
    3042            psArgumentRemove(arg, &argc, argv);
     
    105117}
    106118
    107 // Parse the recipe and format into the arguments
     119/**
     120 * Parse the recipe and format into the arguments
     121 */
    108122bool pswarpOptions(pmConfig *config)
    109123{
     
    116130
    117131    // Get grid size
    118     bool status;                        // Status of MD lookup
     132    bool status;                        ///< Status of MD lookup
    119133    int nGridX = psMetadataLookupS32(&status, recipe, "GRID.NX");
    120134    if (!status || nGridX <= 0) {
     
    129143
    130144    // Get interpolation mode
    131     const char *name = psMetadataLookupStr (&status, recipe, "INTERPOLATION.MODE"); // Name of interp mode
     145    const char *name = psMetadataLookupStr (&status, recipe, "INTERPOLATION.MODE"); ///< Name of interp mode
    132146    if (!name) {
    133147        name = "BILINEAR";
    134148        psLogMsg("pswarp", 3, "defaulting to %s interpolation", name);
    135149    }
    136     psImageInterpolateMode interpolationMode = psImageInterpolateModeFromString(name); // Mode for interp.
     150    psImageInterpolateMode interpolationMode = psImageInterpolateModeFromString(name); ///< Mode for interp.
    137151    if (interpolationMode == PS_INTERPOLATE_NONE) {
    138152        interpolationMode = PS_INTERPOLATE_BILINEAR;
     
    148162    }
    149163
    150     float poorFrac = psMetadataLookupF32(&status, recipe, "POOR.FRAC"); // Frac of bad flux for a "poor"
     164    float poorFrac = psMetadataLookupF32(&status, recipe, "POOR.FRAC"); ///< Frac of bad flux for a "poor"
    151165    if (!status) {
    152166        poorFrac = 0.0;
     
    154168    }
    155169
    156     float acceptFrac = psMetadataLookupF32(&status, recipe, "ACCEPT.FRAC"); // Min fraction of good pixels
     170    float acceptFrac = psMetadataLookupF32(&status, recipe, "ACCEPT.FRAC"); ///< Min fraction of good pixels
    157171    if (!status) {
    158172        acceptFrac = 0.0;
     
    194208    if (dump_file) {
    195209        const char *skyCamera = psMetadataLookupStr(NULL, config->arguments,
    196                                                     "SKYCELL.CAMERA");  // Name of camera for skycell
     210                                                    "SKYCELL.CAMERA");  ///< Name of camera for skycell
    197211        pmConfigCamerasCull(config, skyCamera);
    198212        pmConfigRecipesCull(config, "PSWARP,PPSTATS,PSPHOT,MASKS");
  • branches/eam_branch_20081230/pswarp/src/pswarpCleanup.c

    r18839 r21268  
     1/** @file pswarpCleanup.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.7.20.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113# include "pswarp.h"
    214
  • branches/eam_branch_20081230/pswarp/src/pswarpDefine.c

    r18712 r21268  
     1/** @file pswarpDefine.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.14.22.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113# include "pswarp.h"
    2 // this function loads the skycell metadata
    314
     15/**
     16 * loads the skycell metadata
     17 */
    418bool pswarpDefine (pmConfig *config) {
    519
     
    4256        view->cell = 0;
    4357        view->readout = 0;
    44         pmCell *source = pmFPAfileThisCell(config->files, view, "PSWARP.SKYCELL"); // Source cell
    45         pmHDU *hdu = pmHDUFromCell(source); // HDU for source
     58        pmCell *source = pmFPAfileThisCell(config->files, view, "PSWARP.SKYCELL"); ///< Source cell
     59        pmHDU *hdu = pmHDUFromCell(source); ///< HDU for source
    4660        if (!hdu || !hdu->header) {
    4761            psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find header for sky cell.");
     
    4963            return false;
    5064        }
    51         int numCols = psMetadataLookupS32(NULL, hdu->header, "NAXIS1"); // Number of columns
    52         int numRows = psMetadataLookupS32(NULL, hdu->header, "NAXIS2"); // Number of rows
     65        int numCols = psMetadataLookupS32(NULL, hdu->header, "NAXIS1"); ///< Number of columns
     66        int numRows = psMetadataLookupS32(NULL, hdu->header, "NAXIS2"); ///< Number of rows
    5367
    54         pmCell *target = pmFPAviewThisCell(view, output->fpa); // Target cell
    55         pmReadout *readout = pmReadoutAlloc(target); // Target readout
     68        pmCell *target = pmFPAviewThisCell(view, output->fpa); ///< Target cell
     69        pmReadout *readout = pmReadoutAlloc(target); ///< Target readout
    5670        readout->image = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    5771        psImageInit(readout->image, NAN);
     
    7286    view->cell = 0;
    7387    view->readout = -1;
    74     pmHDU *phu = pmFPAviewThisPHU(view, skycell->fpa); // Skycell PHU
    75     pmHDU *hdu = pmFPAviewThisHDU(view, skycell->fpa); // Skycell header
     88    pmHDU *phu = pmFPAviewThisPHU(view, skycell->fpa); ///< Skycell PHU
     89    pmHDU *hdu = pmFPAviewThisHDU(view, skycell->fpa); ///< Skycell header
    7690    bool bilevelAstrometry = false;
    7791    if (phu) {
     
    8397
    8498    // We read from the skycell into the output.  i.e., the output receives the desired astrometry.
    85     pmChip *outputChip = pmFPAviewThisChip(view, output->fpa); // Chip in the output
     99    pmChip *outputChip = pmFPAviewThisChip(view, output->fpa); ///< Chip in the output
    86100    if (bilevelAstrometry) {
    87101        if (!pmAstromReadBilevelMosaic(output->fpa, phu->header)) {
     
    104118    }
    105119
    106     const char *name = psMetadataLookupStr(NULL, input->fpa->concepts, "FPA.OBS"); // Name of FPA
     120    const char *name = psMetadataLookupStr(NULL, input->fpa->concepts, "FPA.OBS"); ///< Name of FPA
    107121    view->chip = view->cell = view->readout = -1;
    108122    pmFPAAddSourceFromView(output->fpa, name, view, output->format);
  • branches/eam_branch_20081230/pswarp/src/pswarpDefineSkycell.c

    r21072 r21268  
     1/** @file pswarpDefineSkycell.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.10.6.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113# include "pswarp.h"
    214
    3 // XXX this function is based on pmFPAfileDefineFromArgs
    4 // a skycell consists of only one file
     15/**
     16 * \brief XXX this function is based on pmFPAfileDefineFromArgs
     17 * a skycell consists of only one file
    518
    6 // search for argname on the config->argument list
    7 // construct an FPA based on the files in this list (must represent a single FPA)
    8 // built the association between the FPA elements (CHIP/CELL) and the files
    9 // define the pmFPAfile filename and bind it to this FPA
    10 // save the pmFPAfile on config->files
    11 // return the pmFPAfile (a view to the one saved on config->files)
     19 * search for argname on the config->argument list and construct
     20 * an FPA based on the files in this list (must represent a single FPA)
     21 * built the association between the FPA elements (CHIP/CELL) and the files
     22 * define the pmFPAfile filename and bind it to this FPA
     23 * save the pmFPAfile on config->files
     24 * @return the pmFPAfile (a view to the one saved on config->files)
     25 */
    1226bool pswarpDefineSkycell (pmFPAfile **outFile, pmConfig **outConfig, pmConfig *config, const char *filename, const char *argname)
    1327{
     
    5973    psFitsClose(fits);
    6074
    61     // XXX format needs to be equivalent to SIMPLE
    62     // determine the current format from the header
    63     // determine camera if not specified already
     75    // We need to force the format for the skycell to be equivalent to SIMPLE.  Determine
     76    // the current format from the header; Determine camera if not specified already
    6477    // XXX EAM : this operation should be defined as a pmConfig function (pmConfigCopy?)
    65     skyConfig = pmConfigAlloc(0, NULL);
     78    skyConfig = pmConfigAlloc();
    6679    skyConfig->user = psMemIncrRefCounter(config->user);
    6780    skyConfig->system = psMemIncrRefCounter(config->system);
  • branches/eam_branch_20081230/pswarp/src/pswarpErrorCodes.c.in

    r11282 r21268  
     1/** @file pswarpErrorCodes.c.in
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.2.48.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
     13#include "pslib.h"
     14#include "pswarpErrorCodes.h"
     15
    116/*
    217 * The line
     
    520 * will be replaced by values from errorCodes.dat
    621 */
    7 #include "pslib.h"
    8 #include "pswarpErrorCodes.h"
    9 
    1022void pswarpErrorRegister(void)
    1123{
     
    1426       { PSWARP_ERR_${ErrorCode}, "${ErrorDescription}"},
    1527    };
    16     static int nerror = PSWARP_ERR_NERROR - PSWARP_ERR_BASE; // number of values in enum
     28    static int nerror = PSWARP_ERR_NERROR - PSWARP_ERR_BASE; ///< number of values in enum
    1729
    1830    for (int i = 0; i < nerror; i++) {
  • branches/eam_branch_20081230/pswarp/src/pswarpErrorCodes.h.in

    r10946 r21268  
     1/** @file pswarpErrorCodes.h.in
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.1.48.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#if !defined(PSWARP_ERROR_CODES_H)
    214#define PSWARP_ERROR_CODES_H
  • branches/eam_branch_20081230/pswarp/src/pswarpHeadersLoad.c

    r13109 r21268  
     1/** @file pswarpHeadersLoad.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.2.46.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113# include "pswarp.h"
    214
    3 // XXX this function should load all of the PSWARP.INPUT headers
    4 // it should examine the overlap between each chip in PSWARP.INPUT
    5 // and the output (pswarpMatchRange) and select/de-select the chips
    6 // and/or cell which contribute pixels.
    7 
    8 // pswarpDataLoad should then load the pixel of the needed chips
    9 
    10 // all of the different astrometry analysis modes use the same data load loop
     15/** XXX this function should load all of the PSWARP.INPUT headers
     16 * it should examine the overlap between each chip in PSWARP.INPUT
     17 * and the output (pswarpMatchRange) and select/de-select the chips
     18 * and/or cell which contribute pixels.
     19 *
     20 * pswarpDataLoad should then load the pixel of the needed chips
     21 *
     22 * all of the different astrometry analysis modes use the same data load loop
     23 */
    1124bool pswarpHeadersLoad (pmConfig *config) {
    1225
  • branches/eam_branch_20081230/pswarp/src/pswarpLoop.c

    r21090 r21268  
     1/** @file pswarpLoop.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.32.8.2 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#include "pswarp.h"
    214#include <ppStats.h>
    315
    4 #define WCS_NONLIN_TOL 0.001            // Non-linear tolerance for header WCS
    5 #define PSPHOT_FIND_PSF 0               // Use psphot's findPSF function?
    6 //#define TESTING 1                       // Testing output?
    7 
    8 // Lists of file rules for the detectors and skycells, and an independent list of everything else
    9 // Lists must end with a NULL
    10 static char *detectorFiles[] = { "PSWARP.INPUT", "PSWARP.MASK", "PSWARP.WEIGHT", NULL };
    11 static char *skycellFiles[] = { "PSWARP.OUTPUT", "PSWARP.OUTPUT.MASK", "PSWARP.OUTPUT.WEIGHT", NULL };
    12 static char *photFiles[] = { "PSPHOT.INPUT", "PSPHOT.OUTPUT",
    13 #if PSPHOT_FIND_PSF
    14                              "PSPHOT.INPUT.CMF",
    15 #endif
    16                              "PSPHOT.RESID",
    17                              "PSPHOT.BACKMDL", "PSPHOT.BACKMDL.STDEV", "PSPHOT.BACKGND", "PSPHOT.BACKSUB",
    18                              "PSPHOT.PSF.SAVE", "SOURCE.PLOT.MOMENTS", "SOURCE.PLOT.PSFMODEL",
    19                              "SOURCE.PLOT.APRESID", NULL };
    20 static char *independentFiles[] = { "PSWARP.ASTROM", // Read independently from the input pixels
    21                                     "PSWARP.SKYCELL", // Don't care about the skycell once we have its WCS
    22                                     "PSWARP.OUTPUT.SOURCES", // Save these independently so we can do the PSF
    23                                     NULL };
    24 
    25 // Activate a list of files
    26 static void fileActivation(pmConfig *config, // Configuration
    27                            char **files, // Files to turn on/off
    28                            bool state   // Activation state
     16#define WCS_NONLIN_TOL 0.001            ///< Non-linear tolerance for header WCS
     17#define PSPHOT_FIND_PSF 1               ///< Use psphot's findPSF function?
     18#define TESTING 0                       ///< Testing output?
     19
     20#include "pswarpFileNames.h" ///< Lists of file rules used at different stages
     21
     22/**
     23 * XXX these are generic functions which should be moved to psModules
     24 * Activate a list of files
     25 */
     26static void fileActivation(pmConfig *config, ///< Configuration
     27                           char **files, ///< Files to turn on/off
     28                           bool state   ///< Activation state
    2929    )
    3030{
     
    3535}
    3636
    37 // Run down the FPA hierarchy, checking files
    38 static bool ioChecksBefore(pmConfig *config // Configuration
     37/**
     38 * Run down the FPA hierarchy, checking files
     39 */
     40static bool ioChecksBefore(pmConfig *config ///< Configuration
    3941                           )
    4042{
    41     pmFPAview *view = pmFPAviewAlloc(0); // View for checking
    42     bool status = true;                 // Status of checks
     43    pmFPAview *view = pmFPAviewAlloc(0); ///< View for checking
     44    bool status = true;                 ///< Status of checks
    4345    status &= pmFPAfileIOChecks(config, view, PM_FPA_BEFORE);
    4446    view->chip = 0;
     
    5052}
    5153
    52 // Run up the FPA hierarchy, checking files
    53 static bool ioChecksAfter(pmConfig *config // Configuration
     54/**
     55 * Run up the FPA hierarchy, checking files
     56 */
     57static bool ioChecksAfter(pmConfig *config ///< Configuration
    5458                          )
    5559{
    56     pmFPAview *view = pmFPAviewAlloc(0); // View for checking
     60    pmFPAview *view = pmFPAviewAlloc(0); ///< View for checking
    5761    view->chip = view->cell = 0;
    58     bool status = true;                 // Status of checks
     62    bool status = true;                 ///< Status of checks
    5963    status &= pmFPAfileIOChecks(config, view, PM_FPA_AFTER);
    6064    view->cell = -1;
     
    6771
    6872
    69 // Loop over the inputs, warp them to the output skycell and then write out the output.
     73/**
     74 * Loop over the inputs, warp them to the output skycell and then write out the output.
     75 */
    7076bool pswarpLoop(pmConfig *config)
    7177{
     
    113119    psFree (view);
    114120
    115     bool mdok;                          // Status of MD lookup
    116     const char *statsName = psMetadataLookupStr(&mdok, config->arguments, "STATS"); // Filename for statistics
    117     psMetadata *stats = NULL;           // Container for statistics
    118     FILE *statsFile = NULL;             // File stream for statistics
     121    bool mdok;                          ///< Status of MD lookup
     122    const char *statsName = psMetadataLookupStr(&mdok, config->arguments, "STATS"); ///< Filename for statistics
     123    psMetadata *stats = NULL;           ///< Container for statistics
     124    FILE *statsFile = NULL;             ///< File stream for statistics
    119125    if (mdok && statsName && strlen(statsName) > 0) {
    120126        psString resolved = pmConfigConvertFilename(statsName, config, true, true);
     
    141147
    142148    // Read the input astrometry
     149    // XXX rather than use the activations here, this should just explicitly loop over the desired filerule
    143150    {
    144151        pmFPAfileActivate(config->files, true, "PSWARP.ASTROM");
     
    257264    }
    258265
    259     pmCell *outCell = output->parent;   // Output cell
    260     pmChip *outChip = outCell->parent;  // Output chip
    261     pmFPA *outFPA = outChip->parent;    // Output FP
     266    pmCell *outCell = output->parent;   ///< Output cell
     267    pmChip *outChip = outCell->parent;  ///< Output chip
     268    pmFPA *outFPA = outChip->parent;    ///< Output FP
    262269
    263270    if (!pswarpPixelFraction(output, stats, config)) {
     
    277284        varFactor /= goodPix;
    278285
    279         psMetadataItem *vfItem = psMetadataLookup(outCell->concepts, "CELL.VARFACTOR"); // Item to update
     286        psMetadataItem *vfItem = psMetadataLookup(outCell->concepts, "CELL.VARFACTOR"); ///< Item to update
    280287        psAssert(vfItem && vfItem->type == PS_TYPE_F32, "Concept should be as specified.");
    281288        if (!isfinite(vfItem->data.F32)) {
     
    295302    psFree(cells);
    296303
    297     psRegion *trimsec = psMetadataLookupPtr(NULL, outCell->concepts, "CELL.TRIMSEC"); // Trim section
    298     trimsec->x0 = trimsec->x1 = trimsec->y0 = trimsec->y1 = 0; // All pixels
     304    psRegion *trimsec = psMetadataLookupPtr(NULL, outCell->concepts, "CELL.TRIMSEC"); ///< Trim section
     305    trimsec->x0 = trimsec->x1 = trimsec->y0 = trimsec->y1 = 0; ///< All pixels
    299306
    300307    if (!psMetadataCopy(outFPA->concepts, input->fpa->concepts)) {
     
    305312    }
    306313
    307     pmHDU *hdu = outFPA->hdu;           // HDU for the output warped image
     314    pmHDU *hdu = outFPA->hdu;           ///< HDU for the output warped image
    308315
    309316    // Copy header from target
    310317    {
    311         pmFPAview *skyView = pmFPAviewAlloc(0); // View into skycell
     318        pmFPAview *skyView = pmFPAviewAlloc(0); ///< View into skycell
    312319        skyView->chip = skyView->cell = 0;
    313320        pmCell *cell = pmFPAfileThisCell(config->files, skyView, "PSWARP.SKYCELL"); // Skycell cell
    314321        psFree(skyView);
    315         pmHDU *skyHDU = pmHDUFromCell(cell); // HDU
     322        pmHDU *skyHDU = pmHDUFromCell(cell); ///< HDU
    316323        if (!skyHDU) {
    317324            psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find skycell HDU.");
     
    364371        pmFPACopy(photFile->fpa, outFPA);
    365372
    366         pmFPAview *view = pmFPAviewAlloc(0); // View into skycell
     373        pmFPAview *view = pmFPAviewAlloc(0); ///< View into skycell
    367374        view->chip = view->cell = view->readout = 0;
    368375
     
    372379        // We can adjust the weight directly since this is a deep copy
    373380        pmReadout *photRO = pmFPAviewThisReadout(view, photFile->fpa);
    374         float vf = psMetadataLookupF32(NULL, photRO->parent->concepts, "CELL.VARFACTOR"); // Variance factor
     381        float vf = psMetadataLookupF32(NULL, photRO->parent->concepts, "CELL.VARFACTOR"); ///< Variance factor
    375382        psBinaryOp(photRO->weight, photRO->weight, "*", psScalarAlloc(vf, PS_TYPE_F32));
    376383
     
    386393#endif
    387394
    388 #ifdef TESTING
     395#if (TESTING)
    389396        {
    390             #define PSF_SIZE 20         // Half-size of PSF
    391             #define PSF_FLUX 10000      // Central flux for PSF
     397            #define PSF_SIZE 20         ///< Half-size of PSF
     398            #define PSF_FLUX 10000      ///< Central flux for PSF
    392399            pmChip *photChip = pmFPAviewThisChip(view, photFile->fpa);
    393400            pmPSF *psf = psMetadataLookupPtr(NULL, photChip->analysis, "PSPHOT.PSF");
     
    419426    const char *chipName = psMetadataLookupStr(NULL, output->parent->parent->concepts, "CHIP.NAME");
    420427    const char *cellName = psMetadataLookupStr(NULL, output->parent->concepts, "CELL.NAME");
    421     psString headerName = NULL; // Header name for MD5
     428    psString headerName = NULL; ///< Header name for MD5
    422429    psStringAppend(&headerName, "MD5_%s_%s_%d", chipName, cellName, view->readout);
    423     psVector *md5 = psImageMD5(output->image); // md5 hash
    424     psString md5string = psMD5toString(md5); // String
     430    psVector *md5 = psImageMD5(output->image); ///< md5 hash
     431    psString md5string = psMD5toString(md5); ///< String
    425432    psFree(md5);
    426433    psMetadataAddStr(hdu->header, PS_LIST_TAIL, headerName, PS_META_REPLACE,
  • branches/eam_branch_20081230/pswarp/src/pswarpMapGrid.c

    r18839 r21268  
     1/** @file pswarpMapGrid.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.6.20.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113# include "pswarp.h"
    214
    3 // pswarpMapGridFromImage builds a set (a grid) of locally-linear maps which convert the source
    4 // coordinates (src) to destination coordinates (dest).  we construct a grid with superpixel
    5 // spacing of nXpix, nYpix.  The transformation for each grid cell is valid for the superpixel.
    6 // The grid over-fills the source image so every source image pixel is guaranteed to have a map.
     15/**
     16 * pswarpMapGridFromImage builds a set (a grid) of locally-linear maps which convert the source
     17 * coordinates (src) to destination coordinates (dest).  we construct a grid with superpixel
     18 * spacing of nXpix, nYpix.  The transformation for each grid cell is valid for the superpixel.
     19 * The grid over-fills the source image so every source image pixel is guaranteed to have a map.
     20 */
    721pswarpMapGrid *pswarpMapGridFromImage (pmReadout *dest, pmReadout *src, int nXpix, int nYpix) {
    822
     
    4155}
    4256
    43 // set the grid coordinate (gridX,gridY) for the given source image coordinate (ix,iy)
    44 // XXX return true if the result is on the src image, false otherwise (???)
     57/**
     58 * set the grid coordinate (gridX,gridY) for the given source image coordinate (ix,iy)
     59 * XXX return true if the result is on the src image, false otherwise (???)
     60 */
    4561bool pswarpMapGridSetGrid (pswarpMapGrid *grid, int ix, int iy, int *gridX, int *gridY) {
    4662
     
    5167}
    5268
    53 // given the specified grid coordinate (gridX, gridY), return the min and max coordinates for the tile
     69/**
     70 * given the specified grid coordinate (gridX, gridY), return the min and max coordinates for the tile
     71 */
    5472bool pswarpMapGridCoordRange (pswarpMapGrid *grid, int gridX, int gridY, psPlane *min, psPlane *max) {
    5573
     
    6381}
    6482
    65 // given the specified grid coordinate (gridX), return the x-coordinate for the source image
    66 // corresponding to the next grid cell
     83/**
     84 * given the specified grid coordinate (gridX), return the x-coordinate for the source image
     85 * corresponding to the next grid cell
     86 */
    6787int pswarpMapGridNextGrid_X (pswarpMapGrid *grid, int gridX) {
    6888
     
    7191}
    7292
    73 // given the specified grid coordinate (gridY), return the y-coordinate for the source image
    74 // corresponding to the next grid cell
     93/**
     94 * given the specified grid coordinate (gridY), return the y-coordinate for the source image
     95 * corresponding to the next grid cell
     96 */
    7597int pswarpMapGridNextGrid_Y (pswarpMapGrid *grid, int gridY) {
    7698
     
    79101}
    80102
    81 // measure the max error accumulated in applying one grid point to its neighbors
    82 // XXX double-check this
     103/**
     104 * measure the max error accumulated in applying one grid point to its neighbors
     105 * XXX double-check this
     106 */
    83107double pswarpMapGridMaxError (pswarpMapGrid *grid) {
    84108
     
    102126}
    103127
    104 // given the source coordinate (inX,inY), return the destination coordinate (outX,outY)
     128/**
     129 * given the source coordinate (inX,inY), return the destination coordinate (outX,outY)
     130 */
    105131bool pswarpMapApply (double *outX, double *outY, pswarpMap *map, double inX, double inY) {
    106132
     
    111137}
    112138
    113 // determine the (linear) map for the given pixel (ix,iy) from source image (src) to the destination image (dest)
    114 // pixel is in src coords. input and output pixel coordinates are in the parent frame of the image (Note that the
    115 // astrometric transformations are supplied for the parent image coordinate frame.
     139/**
     140 * determine the (linear) map for the given pixel (ix,iy) from source image (src) to the destination image (dest)
     141 * pixel is in src coords. input and output pixel coordinates are in the parent frame of the image (Note that the
     142 * astrometric transformations are supplied for the parent image coordinate frame.
     143 */
    116144bool pswarpMapSetLocalModel (pswarpMap *map, pmReadout *dest, pmReadout *src, int ix, int iy) {
    117145
     
    139167    // XXX need to include readout->cell->chip offsets
    140168
    141     // V(0,0) position
     169    /** V(0,0) position */
    142170    offset->x = ix;
    143171    offset->y = iy;
     
    149177    psPlaneTransformApply (V00, chipDest->fromFPA, FP);
    150178   
    151     // V(1,0) position
     179    /** V(1,0) position */
    152180    offset->x = ix + 1;
    153181    offset->y = iy;
     
    159187    psPlaneTransformApply (V10, chipDest->fromFPA, FP);
    160188   
    161     // V(0,1) position
     189    /** V(0,1) position */
    162190    offset->x = ix;
    163191    offset->y = iy + 1;
  • branches/eam_branch_20081230/pswarp/src/pswarpMatchRange.c

    r12526 r21268  
     1/** @file pswarpMatchRange.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.4.46.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113# include "pswarp.h"
    214
     
    1325    *maxY = PS_MAX (*maxY, srcPix->y);
    1426
    15 // we are warping from src to dest.  find the max overlapping pixels in the INPUT (src)
    16 // coordinate frame.  NOTE: these are in the parent pixel frame since the astrometric
    17 // transformation refers to the parent frame
     27/** we are warping from src to dest.  find the max overlapping pixels in the INPUT (src)
     28 * coordinate frame.  NOTE: these are in the parent pixel frame since the astrometric
     29 * transformation refers to the parent frame
     30 */
    1831bool pswarpMatchRange (int *minX, int *minY, int *maxX, int *maxY, pmReadout *dest, pmReadout *src) {
    1932
  • branches/eam_branch_20081230/pswarp/src/pswarpParseCamera.c

    r20331 r21268  
     1/** @file pswarpParseCamera.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.22.8.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113# include "pswarp.h"
    214
     
    416{
    517    bool status;
    6     bool mdok;                          // Status of MD lookup
     18    bool mdok;                          ///< Status of MD lookup
    719    pmFPAfile *skycell = NULL;
    820    pmConfig *skyConfig = NULL;
  • branches/eam_branch_20081230/pswarp/src/pswarpPixelFraction.c

    r21090 r21268  
     1/** @file pswarpPixelFraction.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.4.28.2 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#ifdef HAVE_CONFIG_H
    214#include <config.h>
     
    3042    bool status;
    3143
    32     float minFrac = psMetadataLookupF32(NULL, config->arguments, "ACCEPT.FRAC"); // Minimum fraction
     44    float minFrac = psMetadataLookupF32(NULL, config->arguments, "ACCEPT.FRAC"); ///< Minimum fraction
    3345
    3446    // load the recipe
     
    4355    psAssert (status, "MASK.OUTPUT was not defined");
    4456
    45     psImage *image = readout->image;    // Image of interest
    46     psImage *mask = readout->mask;      // Mask image
     57    psImage *image = readout->image;    ///< Image of interest
     58    psImage *mask = readout->mask;      ///< Mask image
    4759
    48     int numCols = image->numCols, numRows = image->numRows; // Size of image
     60    int numCols = image->numCols, numRows = image->numRows; ///< Size of image
    4961    long numPix = numCols * numRows;
    5062
     
    5264    int xMin = INT_MAX, xMax = -INT_MAX, yMin = INT_MAX, yMax = -INT_MAX;
    5365
    54     long numBad = 0;                     // Number of bad pixels
     66    long numBad = 0;                     ///< Number of bad pixels
    5567    for (int y = 0; y < numRows; y++) {
    5668        for (int x = 0; x < numCols; x++) {
     
    7486    }
    7587
    76     float goodFrac = (numPix - numBad) / (float)numPix; // Fraction of good pixels
    77     bool accept = (goodFrac >= minFrac ? true : false); // Accept this readout?
     88    float goodFrac = (numPix - numBad) / (float)numPix; ///< Fraction of good pixels
     89    bool accept = (goodFrac >= minFrac ? true : false); ///< Accept this readout?
    7890
    7991    if (stats) {
  • branches/eam_branch_20081230/pswarp/src/pswarpSetMaskBits.c

    r21090 r21268  
     1/** @file pswarpSetMaskBits.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.2.28.2 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113# include "pswarp.h"
    214
    3 // This function is called by the stand-alone pswarp program to set the mask values in the
    4 // config file.  It sets the named mask values MASK.PSPHOT and MARK.PSPHOT in the PSPHOT
    5 // recipe.  Functions or programs which call psphotReadout as a library function must set these
    6 // named mask values in the PSPHOT recipe on their own.  This function should only be called
    7 // after the first header of the input mask image has been loaded and the named mask bits
    8 // updated in the config metadata.
    9 
     15/** This function is called by the stand-alone pswarp program to set the mask values in the
     16 * config file.  It sets the named mask values MASK.PSPHOT and MARK.PSPHOT in the PSPHOT
     17 * recipe.  Functions or programs which call psphotReadout as a library function must set these
     18 * named mask values in the PSPHOT recipe on their own.  This function should only be called
     19 * after the first header of the input mask image has been loaded and the named mask bits
     20 * updated in the config metadata.
     21 */
    1022bool pswarpSetMaskBits (pmConfig *config) {
    1123
    12     psImageMaskType maskIn = 0x00;                      // mask for the input image
    13     psImageMaskType markIn = 0x00;                      // mark for the input image
    14     psImageMaskType maskOut = 0x00;                     // mask for the output image
     24    psImageMaskType maskIn = 0x00;                      ///< mask for the input image
     25    psImageMaskType markIn = 0x00;                      ///< mark for the input image
     26    psImageMaskType maskOut = 0x00;                     ///< mask for the output image
    1527
    1628    // this function sets the required single-image mask bits
  • branches/eam_branch_20081230/pswarp/src/pswarpSetThreads.c

    r19299 r21268  
     1/** @file pswarpSetThreads.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.4.16.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113# include "pswarp.h"
    214
    3 // each thread runs this function, starting a new job when it finished with an old one
    4 // it is called with a (void *) pointer to its own thread pointer
     15/** each thread runs this function, starting a new job when it finished with an old one
     16 * it is called with a (void *) pointer to its own thread pointer
     17 */
    518bool pswarpThread_pswarpTransformTile(psThreadJob *job)
    619{
  • branches/eam_branch_20081230/pswarp/src/pswarpThreads.c

    r18839 r21268  
     1/** @file pswarpThreads.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.2.20.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113# include "pswarp.h"
    214
     
    3951}
    4052
    41 // create a pool of Nthreads
     53/**
     54 * create a pool of Nthreads
     55 */
    4256bool pswarpThreadsCreate (int nThreads) {
    4357
  • branches/eam_branch_20081230/pswarp/src/pswarpTransformReadout.c

    r21090 r21268  
     1/** @file pswarpTransformReadout.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.13.8.2 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#include "pswarp.h"
    214
    3 // NOTE: in this function, the coordinates are transformed from the OUTPUT to the INPUT
     15/**
     16 * NOTE: in this function, the coordinates are transformed from the OUTPUT to the INPUT
     17 */
    418bool pswarpTransformReadout(pmReadout *output, pmReadout *input, pmConfig *config)
    519{
    620    // XXX this implementation currently ignores the use of the region
    7     psImage *region = NULL;             // Region to transform
     21    psImage *region = NULL;             ///< Region to transform
    822
    923    psTimerStart("warp");
    1024
    1125    // Get warp parameters
    12     bool mdok;                          // Status of MD lookup
    13     int nGridX = psMetadataLookupS32(NULL, config->arguments, "GRID.NX"); // Number of grid points in x
    14     int nGridY = psMetadataLookupS32(NULL, config->arguments, "GRID.NY"); // Number of grid points in y
     26    bool mdok;                          ///< Status of MD lookup
     27    int nGridX = psMetadataLookupS32(NULL, config->arguments, "GRID.NX"); ///< Number of grid points in x
     28    int nGridY = psMetadataLookupS32(NULL, config->arguments, "GRID.NY"); ///< Number of grid points in y
    1529    psImageInterpolateMode interpolationMode = psMetadataLookupS32(NULL, config->arguments,
    16                                                                    "INTERPOLATION.MODE"); // Mode for interp
    17     int numKernels = psMetadataLookupS32(NULL, config->arguments, "INTERPOLATION.NUM"); // Number of kernels
     30                                                                   "INTERPOLATION.MODE"); ///< Mode for interp
     31    int numKernels = psMetadataLookupS32(NULL, config->arguments, "INTERPOLATION.NUM"); ///< Number of kernels
    1832
    1933    // load the recipe
     
    2741    psAssert(mdok, "MASK.INPUT was not defined");
    2842
    29     int nThreads = psMetadataLookupS32(&mdok, config->arguments, "NTHREADS"); // Number of threads
     43    int nThreads = psMetadataLookupS32(&mdok, config->arguments, "NTHREADS"); ///< Number of threads
    3044    if (!mdok) {
    3145        nThreads = 0;
    3246    }
    33     float poorFrac = psMetadataLookupF32(NULL, config->arguments, "POOR.FRAC"); // Flux fraction for "poor"
     47    float poorFrac = psMetadataLookupF32(NULL, config->arguments, "POOR.FRAC"); ///< Flux fraction for "poor"
    3448
    3549    // pswarpMapGridFromImage builds a set of locally-linear maps which convert the
     
    4256
    4357    // Get range of interest
    44     int xOutMin, xOutMax, yOutMin, yOutMax; // Output pixel range
     58    int xOutMin, xOutMax, yOutMin, yOutMax; ///< Output pixel range
    4559    pswarpMatchRange(&xOutMin, &yOutMin, &xOutMax, &yOutMax, input, output);
    4660
     
    5367    }
    5468
    55     int xGridMin = nGridX, xGridMax = 0, yGridMin = nGridY, yGridMax = 0; // Grid range
    56     int xGrid, yGrid;                   // Grid coordinates
     69    int xGridMin = nGridX, xGridMax = 0, yGridMin = nGridY, yGridMax = 0; ///< Grid range
     70    int xGrid, yGrid;                   ///< Grid coordinates
    5771    pswarpMapGridSetGrid(grid, xOutMin, yOutMin, &xGrid, &yGrid);
    5872    CHECK_GRID_RANGE();
     
    121135    psThreadJob *job = NULL;
    122136    int xMin = output->image->numCols, xMax = 0, yMin = output->image->numRows, yMax = 0; // Bounds
    123     int goodPixels = 0;                 // total number of good pixels across all tiles
     137    int goodPixels = 0;                 ///< total number of good pixels across all tiles
    124138    while ((job = psThreadJobGetDone()) != NULL) {
    125139        if (job->args->n < 1) {
  • branches/eam_branch_20081230/pswarp/src/pswarpTransformSources.c

    r21072 r21268  
     1/** @file pswarpTransformSources.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.6.6.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#include "pswarp.h"
    214
    3 #define SOURCE_ARRAY_BUFFER 100         // Size to grow the array of sources at a time
     15#define SOURCE_ARRAY_BUFFER 100         ///< Size to grow the array of sources at a time
    416
    5 // NOTE: in this function, the coordinates are transformed from the OUTPUT to the INPUT
     17/**
     18 * NOTE: in this function, the coordinates are transformed from the OUTPUT to the INPUT
     19 */
    620bool pswarpTransformSources(pmReadout *output, pmReadout *input, pmConfig *config)
    721{
     
    3347    // this does not cost us so much time.
    3448    for (int i = 0; i < inSources->n; i++) {
    35         pmSource *source = inSources->data[i]; // Source of interest
    36         pmModel *model = source->modelPSF; // Model for this source
    37         float xIn, yIn;             // Coordinates of source
     49        pmSource *source = inSources->data[i]; ///< Source of interest
     50        pmModel *model = source->modelPSF; ///< Model for this source
     51        float xIn, yIn;             ///< Coordinates of source
    3852        xIn = model->params->data.F32[PM_PAR_XPOS] - input->image->col0;
    3953        yIn = model->params->data.F32[PM_PAR_YPOS] - input->image->row0;
    4054
    41         int xGrid, yGrid;           // Grid coordinates for local map
     55        int xGrid, yGrid;           ///< Grid coordinates for local map
    4256        if (!pswarpMapGridSetGrid(sourceGrid, xIn + 0.5, yIn + 0.5, &xGrid, &yGrid)) {
    4357            psError(PS_ERR_UNKNOWN, false, "Unable to get grid coordinates for source at %f,%f\n",
     
    5367        }
    5468
    55         pswarpMap *map = sourceGrid->maps[xGrid][yGrid]; // Locally linear transformation
    56         double xOut, yOut;          // Output coordinates
     69        pswarpMap *map = sourceGrid->maps[xGrid][yGrid]; ///< Locally linear transformation
     70        double xOut, yOut;          ///< Output coordinates
    5771        if (!pswarpMapApply(&xOut, &yOut, map, xIn + 0.5, yIn + 0.5)) {
    5872            psError(PS_ERR_UNKNOWN, false, "Unable to transform coordinates for source at %f,%f\n",
     
    7387        // Magnitudes will be off if there's any change in scale, but for our purposes (mainly x,y and
    7488        // relative flux) that's OK.
    75         pmSource *new = pmSourceAlloc(); // New source
     89        pmSource *new = pmSourceAlloc(); ///< New source
    7690        new->peak = pmPeakAlloc(xOut, yOut, source->peak->flux, PM_PEAK_LONE);
    7791        new->peak->flux = source->peak->flux;
  • branches/eam_branch_20081230/pswarp/src/pswarpTransformTile.c

    r21090 r21268  
     1/** @file pswarpTransformTile.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.6.14.2 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#include "pswarp.h"
    214
     
    3648bool pswarpTransformTile(pswarpTransformTileArgs *args)
    3749{
    38     psImage *inImage = args->input->image; // Input image
    39     psImage *outImage = args->output->image; // Output image
     50    psImage *inImage = args->input->image; ///< Input image
     51    psImage *outImage = args->output->image; ///< Output image
    4052
    41     int inNumCols = inImage->numCols, inNumRows = inImage->numRows; // Size of input image
    42     int outNumCols = outImage->numCols, outNumRows = outImage->numRows; // Size of output image
    43     int outCol0 = outImage->col0, outRow0 = outImage->row0; // Offset of output image
     53    int inNumCols = inImage->numCols, inNumRows = inImage->numRows; ///< Size of input image
     54    int outNumCols = outImage->numCols, outNumRows = outImage->numRows; ///< Size of output image
     55    int outCol0 = outImage->col0, outRow0 = outImage->row0; ///< Offset of output image
    4456
    45     psPlane minPt, maxPt;               // Minimum and maximum points for this tile
     57    psPlane minPt, maxPt;               ///< Minimum and maximum points for this tile
    4658    pswarpMapGridCoordRange(args->grid, args->gridX, args->gridY, &minPt, &maxPt);
    4759
     
    5264    psImageMaskType **inMaskData  = (args->input->mask)    ? args->input->mask->data.PS_TYPE_IMAGE_MASK_DATA : NULL;
    5365
    54     pswarpMap *map = args->grid->maps[args->gridX][args->gridY]; // Map for this tile
    55     psImage *region = args->region;     // Region to transform
     66    pswarpMap *map = args->grid->maps[args->gridX][args->gridY]; ///< Map for this tile
     67    psImage *region = args->region;     ///< Region to transform
    5668
    57     // Bounds for iteration
     69    /** Bounds for iteration */
    5870    int xMin = PS_MAX(minPt.x, 0);
    5971    int xMax = PS_MIN(maxPt.x, outNumCols);
     
    6274
    6375    // Iterate over the output image pixels (parent frame)
    64     long goodPixels = 0;                // Number of input pixels landing on the output image
     76    long goodPixels = 0;                ///< Number of input pixels landing on the output image
    6577    for (int y = yMin; y < yMax; y++) {
    6678        for (int x = xMin; x < xMax; x++) {
     
    8193
    8294            // psImagePixelInterpolate determines the value at pixel coordinate (x,y) in child coordinates
    83             double imageValue, varValue; // Value of image and variance map
    84             psImageMaskType maskValue = inMaskData ? inMaskData[(int)yIn][(int)xIn] : 0; // Value of mask
     95            double imageValue, varValue; ///< Value of image and variance map
     96            psImageMaskType maskValue = inMaskData ? inMaskData[(int)yIn][(int)xIn] : 0; ///< Value of mask
    8597            if (!psImageInterpolate(&imageValue, &varValue, &maskValue, xIn, yIn, args->interp)) {
    8698                psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
     
    88100            }
    89101
    90             int xOut = x - outCol0, yOut = y - outRow0; // Position on output image
     102            int xOut = x - outCol0, yOut = y - outRow0; ///< Position on output image
    91103
    92104            if (outImageData) {
  • branches/eam_branch_20081230/pswarp/src/pswarpVersion.c

    r10946 r21268  
     1/** @file pswarpVersion.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.1.48.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-02 21:57:10 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#ifdef HAVE_CONFIG_H
    214#include <config.h>
     
    820#include "pswarp.h"
    921
    10 static const char *cvsTag = "$Name: not supported by cvs2svn $";// CVS tag name
     22static const char *cvsTag = "$Name: not supported by cvs2svn $";///< CVS tag name
    1123
    1224psString pswarpVersion(void)
    1325{
    14     psString version = NULL;            // Version, to return
     26    psString version = NULL;            ///< Version, to return
    1527    psStringAppend(&version, "%s-%s",PACKAGE_NAME,PACKAGE_VERSION);
    1628    return version;
     
    1931psString pswarpVersionLong(void)
    2032{
    21     psString version = pswarpVersion(); // Version, to return
    22     psString tag = psStringStripCVS(cvsTag, "Name"); // CVS tag
     33    psString version = pswarpVersion(); ///< Version, to return
     34    psString tag = psStringStripCVS(cvsTag, "Name"); ///< CVS tag
    2335    psStringAppend(&version, " (cvs tag %s) %s, %s", tag, __DATE__, __TIME__);
    2436    psFree(tag);
Note: See TracChangeset for help on using the changeset viewer.