IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 5, 2009, 10:44:04 AM (17 years ago)
Author:
eugene
Message:

merging Doxygen comments by Bill G from eam_branch_20081230

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpLoop.c

    r21256 r21323  
     1/** @file pswarpLoop.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup pswarp
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-05 20:44:04 $
     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 1               // Use psphot's findPSF function?
    6 #define TESTING 0                       // Testing output?
    7 
    8 // Lists of file rules used at different stages
    9 #include "pswarpFileNames.h"
    10 
    11 // XXX these are generic functions which should be moved to psModules
    12 // Activate a list of files
    13 static void fileActivation(pmConfig *config, // Configuration
    14                            char **files, // Files to turn on/off
    15                            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
    1629    )
    1730{
     
    2235}
    2336
    24 // Run down the FPA hierarchy, checking files
    25 static bool ioChecksBefore(pmConfig *config // Configuration
     37/**
     38 * Run down the FPA hierarchy, checking files
     39 */
     40static bool ioChecksBefore(pmConfig *config ///< Configuration
    2641                           )
    2742{
    28     pmFPAview *view = pmFPAviewAlloc(0); // View for checking
    29     bool status = true;                 // Status of checks
     43    pmFPAview *view = pmFPAviewAlloc(0); ///< View for checking
     44    bool status = true;                 ///< Status of checks
    3045    status &= pmFPAfileIOChecks(config, view, PM_FPA_BEFORE);
    3146    view->chip = 0;
     
    3752}
    3853
    39 // Run up the FPA hierarchy, checking files
    40 static bool ioChecksAfter(pmConfig *config // Configuration
     54/**
     55 * Run up the FPA hierarchy, checking files
     56 */
     57static bool ioChecksAfter(pmConfig *config ///< Configuration
    4158                          )
    4259{
    43     pmFPAview *view = pmFPAviewAlloc(0); // View for checking
     60    pmFPAview *view = pmFPAviewAlloc(0); ///< View for checking
    4461    view->chip = view->cell = 0;
    45     bool status = true;                 // Status of checks
     62    bool status = true;                 ///< Status of checks
    4663    status &= pmFPAfileIOChecks(config, view, PM_FPA_AFTER);
    4764    view->cell = -1;
     
    5471
    5572
    56 // 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 */
    5776bool pswarpLoop(pmConfig *config)
    5877{
     
    100119    psFree (view);
    101120
    102     bool mdok;                          // Status of MD lookup
    103     const char *statsName = psMetadataLookupStr(&mdok, config->arguments, "STATS"); // Filename for statistics
    104     psMetadata *stats = NULL;           // Container for statistics
    105     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
    106125    if (mdok && statsName && strlen(statsName) > 0) {
    107126        psString resolved = pmConfigConvertFilename(statsName, config, true, true);
     
    245264    }
    246265
    247     pmCell *outCell = output->parent;   // Output cell
    248     pmChip *outChip = outCell->parent;  // Output chip
    249     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
    250269
    251270    if (!pswarpPixelFraction(output, stats, config)) {
     
    265284        varFactor /= goodPix;
    266285
    267         psMetadataItem *vfItem = psMetadataLookup(outCell->concepts, "CELL.VARFACTOR"); // Item to update
     286        psMetadataItem *vfItem = psMetadataLookup(outCell->concepts, "CELL.VARFACTOR"); ///< Item to update
    268287        psAssert(vfItem && vfItem->type == PS_TYPE_F32, "Concept should be as specified.");
    269288        if (!isfinite(vfItem->data.F32)) {
     
    283302    psFree(cells);
    284303
    285     psRegion *trimsec = psMetadataLookupPtr(NULL, outCell->concepts, "CELL.TRIMSEC"); // Trim section
    286     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
    287306
    288307    if (!psMetadataCopy(outFPA->concepts, input->fpa->concepts)) {
     
    293312    }
    294313
    295     pmHDU *hdu = outFPA->hdu;           // HDU for the output warped image
     314    pmHDU *hdu = outFPA->hdu;           ///< HDU for the output warped image
    296315
    297316    // Copy header from target
    298317    {
    299         pmFPAview *skyView = pmFPAviewAlloc(0); // View into skycell
     318        pmFPAview *skyView = pmFPAviewAlloc(0); ///< View into skycell
    300319        skyView->chip = skyView->cell = 0;
    301320        pmCell *cell = pmFPAfileThisCell(config->files, skyView, "PSWARP.SKYCELL"); // Skycell cell
    302321        psFree(skyView);
    303         pmHDU *skyHDU = pmHDUFromCell(cell); // HDU
     322        pmHDU *skyHDU = pmHDUFromCell(cell); ///< HDU
    304323        if (!skyHDU) {
    305324            psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find skycell HDU.");
     
    333352        pmFPACopy(photFile->fpa, outFPA);
    334353
    335         pmFPAview *view = pmFPAviewAlloc(0); // View into skycell
     354        pmFPAview *view = pmFPAviewAlloc(0); ///< View into skycell
    336355        view->chip = view->cell = view->readout = 0;
    337356
     
    340359        // We can adjust the weight directly since this is a deep copy
    341360        pmReadout *photRO = pmFPAviewThisReadout(view, photFile->fpa);
    342         float vf = psMetadataLookupF32(NULL, photRO->parent->concepts, "CELL.VARFACTOR"); // Variance factor
     361        float vf = psMetadataLookupF32(NULL, photRO->parent->concepts, "CELL.VARFACTOR"); ///< Variance factor
    343362        psBinaryOp(photRO->weight, photRO->weight, "*", psScalarAlloc(vf, PS_TYPE_F32));
    344363
     
    359378#if (TESTING)
    360379        {
    361             #define PSF_SIZE 20         // Half-size of PSF
    362             #define PSF_FLUX 10000      // Central flux for PSF
     380            #define PSF_SIZE 20         ///< Half-size of PSF
     381            #define PSF_FLUX 10000      ///< Central flux for PSF
    363382            pmChip *photChip = pmFPAviewThisChip(view, photFile->fpa);
    364383            pmPSF *psf = psMetadataLookupPtr(NULL, photChip->analysis, "PSPHOT.PSF");
     
    390409    const char *chipName = psMetadataLookupStr(NULL, output->parent->parent->concepts, "CHIP.NAME");
    391410    const char *cellName = psMetadataLookupStr(NULL, output->parent->concepts, "CELL.NAME");
    392     psString headerName = NULL; // Header name for MD5
     411    psString headerName = NULL; ///< Header name for MD5
    393412    psStringAppend(&headerName, "MD5_%s_%s_%d", chipName, cellName, view->readout);
    394     psVector *md5 = psImageMD5(output->image); // md5 hash
    395     psString md5string = psMD5toString(md5); // String
     413    psVector *md5 = psImageMD5(output->image); ///< md5 hash
     414    psString md5string = psMD5toString(md5); ///< String
    396415    psFree(md5);
    397416    psMetadataAddStr(hdu->header, PS_LIST_TAIL, headerName, PS_META_REPLACE,
Note: See TracChangeset for help on using the changeset viewer.