IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 1, 2009, 11:43:05 AM (17 years ago)
Author:
eugene
Message:

merging Doxygen templates added by Bill G

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeScaleZero.c

    r21183 r21244  
     1/** @file ppMergeScaleZero.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup ppMerge
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-01 21:43:05 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#include "ppMerge.h"
    214
    3 // Get the scale and zero for each chip of each input
     15/**
     16 * Get the scale and zero for each chip of each input
     17 */
    418bool ppMergeScaleZero(pmConfig *config)
    519{
    620    assert(config);
    721
    8     ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); // Type of frame
    9     int numInputs = psMetadataLookupS32(NULL, config->arguments, "INPUTS.NUM"); // Number of inputs
    10     int numCells = psMetadataLookupS32(NULL, config->arguments, "INPUTS.CELLS"); // Number of cells
    11     psStatsOptions meanStat = psMetadataLookupS32(NULL, config->arguments, "MEAN"); // Statistic for mean
    12     psStatsOptions stdevStat = psMetadataLookupS32(NULL, config->arguments, "STDEV"); // Statistic for stdev
    13     int shutterSize = psMetadataLookupS32(NULL, config->arguments, "SHUTTER.SIZE"); // Size of shutter region
    14 
    15     psVector *gains = NULL;             // Gains for each cell
    16     psArray *shutters = NULL;           // Shutter data for each cell
    17     psStats *stats = NULL;              // Statistics for background
    18     psImage *background = NULL;         // Background measurements per cell per file
     22    ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); ///< Type of frame
     23    int numInputs = psMetadataLookupS32(NULL, config->arguments, "INPUTS.NUM"); ///< Number of inputs
     24    int numCells = psMetadataLookupS32(NULL, config->arguments, "INPUTS.CELLS"); ///< Number of cells
     25    psStatsOptions meanStat = psMetadataLookupS32(NULL, config->arguments, "MEAN"); ///< Statistic for mean
     26    psStatsOptions stdevStat = psMetadataLookupS32(NULL, config->arguments, "STDEV"); ///< Statistic for stdev
     27    int shutterSize = psMetadataLookupS32(NULL, config->arguments, "SHUTTER.SIZE"); ///< Size of shutter region
     28
     29    psVector *gains = NULL;             ///< Gains for each cell
     30    psArray *shutters = NULL;           ///< Shutter data for each cell
     31    psStats *stats = NULL;              ///< Statistics for background
     32    psImage *background = NULL;         ///< Background measurements per cell per file
    1933
    2034    switch (type) {
     
    3751        break;
    3852    }
    39     psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0); // Random number generator
    40     pmFPAview *view = NULL;             // View into FPA
     53    psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0); ///< Random number generator
     54    pmFPAview *view = NULL;             ///< View into FPA
    4155
    4256    for (int i = 0; i < numInputs; i++) {
    4357        pmFPAfileActivate(config->files, false, NULL);
    44         psArray *files = ppMergeFileActivateSingle(config, PPMERGE_FILES_INPUT, true, i); // Activated files
    45         pmFPAfile *input = files->data[0]; // Representative file; should be the image (not mask or weight)
    46         pmFPA *fpa = input->fpa;        // FPA of interest
    47         view = pmFPAviewAlloc(0);       // View to component of interest
    48         int cellNum = 0;                // Index for cell
     58        psArray *files = ppMergeFileActivateSingle(config, PPMERGE_FILES_INPUT, true, i); ///< Activated files
     59        pmFPAfile *input = files->data[0]; ///< Representative file; should be the image (not mask or weight)
     60        pmFPA *fpa = input->fpa;        ///< FPA of interest
     61        view = pmFPAviewAlloc(0);       ///< View to component of interest
     62        int cellNum = 0;                ///< Index for cell
    4963        if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
    5064            goto ERROR;
    5165        }
    52         pmChip *chip;                   // Chip of interest
     66        pmChip *chip;                   ///< Chip of interest
    5367        while ((chip = pmFPAviewNextChip(view, fpa, 1))) {
    5468            if (!chip->file_exists) {
     
    5973            }
    6074
    61             pmCell *cell;               // Cell of interest
     75            pmCell *cell;               ///< Cell of interest
    6276            while ((cell = pmFPAviewNextCell(view, fpa, 1))) {
    6377                if (!cell->file_exists) {
     
    7892                    goto ERROR;
    7993                }
    80                 pmReadout *readout = cell->readouts->data[0]; // Readout of interest
    81 
    82                 psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
     94                pmReadout *readout = cell->readouts->data[0]; ///< Readout of interest
     95
     96                psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); ///< Value to mask
     97                psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config);
    8398
    8499                switch (type) {
     
    86101                  case PPMERGE_TYPE_FRINGE: {
    87102                      // Extract the gain
    88                       float gain = psMetadataLookupF32(NULL, cell->concepts, "CELL.GAIN"); // Cell gain
     103                      float gain = psMetadataLookupF32(NULL, cell->concepts, "CELL.GAIN"); ///< Cell gain
    89104                      if (!isfinite(gain)) {
    90105                        // psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     
    110125                  }
    111126                  case PPMERGE_TYPE_SHUTTER: {
    112                       pmShutterCorrectionData *shutter = shutters->data[cellNum]; // Shutter correction data
     127                      pmShutterCorrectionData *shutter = shutters->data[cellNum]; ///< Shutter correction data
    113128                      if (!shutter) {
    114129                          shutter = pmShutterCorrectionDataAlloc(readout->image->numCols,
     
    174189              }
    175190          }
    176           psVector *fluxes = NULL;        // Solution to fluxes
     191          psVector *fluxes = NULL;        ///< Solution to fluxes
    177192          if (!pmFlatNormalize(&fluxes, &gains, background)) {
    178193              psError(PS_ERR_UNKNOWN, false, "Normalisation failed to converge --- continuing anyway.");
Note: See TracChangeset for help on using the changeset viewer.