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/ppMergeCamera.c

    r18967 r21244  
     1/** @file ppMergeCamera.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup ppMerge
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.8 $ $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 // Define an output file, with its own FPA
    4 bool outputFile(pmConfig *config,       // Configuration
    5                 const char *name,       // Name of output file
    6                 pmFPAfileType type,     // Type of file
    7                 const char *description, // Description of file
    8                 psMetadata *format,     // Camera format
    9                 pmFPAview *view         // View for PHU
     15/**
     16 * Define an output file, with its own FPA
     17 */
     18bool outputFile(pmConfig *config,       ///< Configuration
     19                const char *name,       ///< Name of output file
     20                pmFPAfileType type,     ///< Type of file
     21                const char *description, ///< Description of file
     22                psMetadata *format,     ///< Camera format
     23                pmFPAview *view         ///< View for PHU
    1024    )
    1125{
     
    1529
    1630    // Output image
    17     pmFPA *fpa = pmFPAConstruct(config->camera, config->cameraName); // FPA to contain the output
     31    pmFPA *fpa = pmFPAConstruct(config->camera, config->cameraName); ///< FPA to contain the output
    1832    if (!fpa) {
    1933        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to construct an FPA from camera configuration.");
     
    8498    bool haveWeights = false;           // Do we have weight maps?
    8599
    86     ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); // Type of frame
    87     psMetadata *inputs = psMetadataLookupMetadata(NULL, config->arguments, "INPUTS"); // The inputs info
    88     psMetadataIterator *iter = psMetadataIteratorAlloc(inputs, PS_LIST_HEAD, NULL); // Iterator
    89     psMetadataItem *item;               // Item from iteration
    90     int numFiles = 0;                   // Number of files
     100    ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); ///< Type of frame
     101    psMetadata *inputs = psMetadataLookupMetadata(NULL, config->arguments, "INPUTS"); ///< The inputs info
     102    psMetadataIterator *iter = psMetadataIteratorAlloc(inputs, PS_LIST_HEAD, NULL); ///< Iterator
     103    psMetadataItem *item;               ///< Item from iteration
     104    int numFiles = 0;                   ///< Number of files
    91105    while ((item = psMetadataGetAndIncrement(iter))) {
    92106        if (item->type != PS_DATA_METADATA) {
     
    97111        }
    98112
    99         psMetadata *input = item->data.md; // The input metadata of interest
    100 
    101         psString image = psMetadataLookupStr(NULL, input, "IMAGE"); // Name of image
     113        psMetadata *input = item->data.md; ///< The input metadata of interest
     114
     115        psString image = psMetadataLookupStr(NULL, input, "IMAGE"); ///< Name of image
    102116        if (!image || strlen(image) == 0) {
    103117            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Component %s lacks IMAGE of type STR", item->name);
     
    107121
    108122        bool mdok;
    109         psString mask = psMetadataLookupStr(&mdok, input, "MASK"); // Name of mask
    110         psString weight = psMetadataLookupStr(&mdok, input, "WEIGHT"); // Name of weight map
     123        psString mask = psMetadataLookupStr(&mdok, input, "MASK"); ///< Name of mask
     124        psString weight = psMetadataLookupStr(&mdok, input, "WEIGHT"); ///< Name of weight map
    111125
    112126        // Add the image file
    113         psArray *imageFiles = psArrayAlloc(1); // Array of filenames for this FPA
     127        psArray *imageFiles = psArrayAlloc(1); ///< Array of filenames for this FPA
    114128        imageFiles->data[0] = psMemIncrRefCounter(image);
    115129        psMetadataAddArray(config->arguments, PS_LIST_TAIL, "IMAGE.FILENAMES", PS_META_REPLACE,
     
    130144        // Optionally add the mask file
    131145        if (mask && strlen(mask) > 0) {
    132             psArray *maskFiles = psArrayAlloc(1); // Array of filenames for this FPA
     146            psArray *maskFiles = psArrayAlloc(1); ///< Array of filenames for this FPA
    133147            maskFiles->data[0] = psMemIncrRefCounter(mask);
    134148            psMetadataAddArray(config->arguments, PS_LIST_TAIL, "MASK.FILENAMES", PS_META_REPLACE,
     
    153167        if (weight && strlen(weight) > 0) {
    154168            haveWeights = true;
    155             psArray *weightFiles = psArrayAlloc(1); // Array of filenames for this FPA
     169            psArray *weightFiles = psArrayAlloc(1); ///< Array of filenames for this FPA
    156170            weightFiles->data[0] = psMemIncrRefCounter(weight);
    157171            psMetadataAddArray(config->arguments, PS_LIST_TAIL, "WEIGHT.FILENAMES", PS_META_REPLACE,
     
    219233}
    220234
    221     psMetadata *format = NULL;          // Camera format
    222     pmFPAview *phuView = NULL;          // View to PHU
     235    psMetadata *format = NULL;          ///< Camera format
     236    pmFPAview *phuView = NULL;          ///< View to PHU
    223237    for (int i = 0; i < numFiles; i++) {
    224         pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); // File of interest
    225         pmFPA *fpa = input->fpa;        // FPA of interest
     238        pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); ///< File of interest
     239        pmFPA *fpa = input->fpa;        ///< FPA of interest
    226240        CHECK_LEVEL(fpa->hdu, -1, -1);
    227         psArray *chips = fpa->chips;    // Array of chips
     241        psArray *chips = fpa->chips;    ///< Array of chips
    228242        for (int j = 0; j < chips->n; j++) {
    229             pmChip *chip = chips->data[j]; // Chip of interest
     243            pmChip *chip = chips->data[j]; ///< Chip of interest
    230244            CHECK_LEVEL(chip->hdu, j, -1);
    231             psArray *cells = chip->cells;   // Array of cells
     245            psArray *cells = chip->cells;   ///< Array of cells
    232246            for (int k = 0; k < cells->n; k++) {
    233                 pmCell *cell = cells->data[k]; // Cell of interest
     247                pmCell *cell = cells->data[k]; ///< Cell of interest
    234248                CHECK_LEVEL(cell->hdu, j, k);
    235249            }
     
    245259    // Otherwise the abundance of metadata in the concepts (esp. for GPC) can overload the memory
    246260    for (int i = 0; i < numFiles; i++) {
    247         pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); // File of interest
    248         pmFPA *fpa = input->fpa;        // FPA of interest
    249         psArray *chips = fpa->chips; // Array of chips in output
     261        pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); ///< File of interest
     262        pmFPA *fpa = input->fpa;        ///< FPA of interest
     263        psArray *chips = fpa->chips; ///< Array of chips in output
    250264        for (int i = 0; i < chips->n; i++) {
    251             pmChip *chip = chips->data[i]; // Chip of interest
    252             psArray *cells = chip->cells; // Array of cells
    253             int culled = 0;             // Number of culled cells
     265            pmChip *chip = chips->data[i]; ///< Chip of interest
     266            psArray *cells = chip->cells; ///< Array of cells
     267            int culled = 0;             ///< Number of culled cells
    254268            for (int j = 0; j < cells->n; j++) {
    255269                pmCell *cell = cells->data[j];
    256                 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // HDU for cell
     270                pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); ///< HDU for cell
    257271                if (!hdu || hdu->blankPHU) {
    258272                    cell->data_exists = false;
     
    278292    // Count the cells
    279293    {
    280         int numCells = 0;               // Number of cells
    281         pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", 0); // Representative file
    282         pmFPA *fpa = input->fpa;        // FPA for file
    283         psArray *chips = fpa->chips; // Array of chips
     294        int numCells = 0;               ///< Number of cells
     295        pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", 0); ///< Representative file
     296        pmFPA *fpa = input->fpa;        ///< FPA for file
     297        psArray *chips = fpa->chips; ///< Array of chips
    284298        for (int i = 0; i < chips->n; i++) {
    285             pmChip *chip = chips->data[i]; // Chip of interest
    286             psArray *cells = chip->cells; // Array of cells
     299            pmChip *chip = chips->data[i]; ///< Chip of interest
     300            psArray *cells = chip->cells; ///< Array of cells
    287301            for (int j = 0; j < cells->n; j++) {
    288                 pmCell *cell = cells->data[j]; // Cell of interest
    289                 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // HDU that would have data
     302                pmCell *cell = cells->data[j]; ///< Cell of interest
     303                pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); ///< HDU that would have data
    290304                if (hdu && !hdu->blankPHU) {
    291305                    numCells++;
     
    298312    }
    299313
    300     psString outName = ppMergeOutputFile(config); // Name of output file
    301 
    302     pmFPAfileType fileType = PM_FPA_FILE_NONE; // Type of output file
     314    psString outName = ppMergeOutputFile(config); ///< Name of output file
     315
     316    pmFPAfileType fileType = PM_FPA_FILE_NONE; ///< Type of output file
    303317    switch (type) {
    304318      case PPMERGE_TYPE_BIAS:
Note: See TracChangeset for help on using the changeset viewer.