IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 17, 2008, 12:29:17 PM (18 years ago)
Author:
Paul Price
Message:

API change for pmFPARead(), etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStats/src/ppStatsChip.c

    r18137 r18168  
    22
    33psExit ppStatsChip(psMetadata *fpaResults, // Metadata holding the fpa results
    4                    pmChip *chip,     // Chip for which to get statistics
    5                    psFits *fits,     // FITS file handle
    6                    pmFPAview *view,  // View for analysis
    7                    ppStatsData *data,// The data
    8                    const pmConfig *config // Configuration
     4                   pmChip *chip,     // Chip for which to get statistics
     5                   psFits *fits,     // FITS file handle
     6                   pmFPAview *view,  // View for analysis
     7                   ppStatsData *data,// The data
     8                  pmConfig *config // Configuration
    99    )
    1010{
     
    2222    }
    2323    if (!chip->file_exists && !chip->data_exists) {
    24         return PS_EXIT_SUCCESS;
     24        return PS_EXIT_SUCCESS;
    2525    }
    2626
     
    3636    // Extract Header values
    3737    if (psListLength(data->headers)) {
    38         // extract from existing headers
    39         if (chip->hdu) {
    40             if (fits && !pmChipReadHeader(chip, fits, config->database)) {
    41                 psError (PS_ERR_IO, false, "trouble reading chip header\n");
    42                 psFree(chipResults);
    43                 return PS_EXIT_DATA_ERROR;
    44             }
    45             pmHDU *hdu = chip->hdu;     // HDU for headers
    46             p_ppStatsGetMetadata(chipResults, hdu->header, data->headers);
    47         }
    48         // extract from data->analysis output MD entries
    49         if (psListLength(data->analysis)) {
    50             p_ppStatsGetAnalysis (chipResults, data->headers, chip->analysis, data->analysis);
    51         }
     38        // extract from existing headers
     39        if (chip->hdu) {
     40            if (fits && !pmChipReadHeader(chip, fits, config)) {
     41                psError (PS_ERR_IO, false, "trouble reading chip header\n");
     42                psFree(chipResults);
     43                return PS_EXIT_DATA_ERROR;
     44            }
     45            pmHDU *hdu = chip->hdu;     // HDU for headers
     46            p_ppStatsGetMetadata(chipResults, hdu->header, data->headers);
     47        }
     48        // extract from data->analysis output MD entries
     49        if (psListLength(data->analysis)) {
     50            p_ppStatsGetAnalysis (chipResults, data->headers, chip->analysis, data->analysis);
     51        }
    5252    }
    5353
    5454    // Extract Concept values
    5555    if (psListLength(data->concepts) > 0) {
    56         if (fits && chip->hdu && !pmChipReadHeader(chip, fits, config->database)) {
     56        if (fits && chip->hdu && !pmChipReadHeader(chip, fits, config)) {
    5757            psError (PS_ERR_IO, false, "trouble reading chip header\n");
    5858            psFree(chipResults);
    5959            return PS_EXIT_DATA_ERROR;
    6060        }
    61         pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_ALL, false, false, config->database);
     61        pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_ALL, false, false, config);
    6262        p_ppStatsGetMetadata(chipResults, chip->concepts, data->concepts);
    6363    }
     
    7373    // Iterate over cells (if view->cell is set, skip all others)
    7474    for (int i = 0; i < cells->n; i++) {
    75         if ((view->cell >= 0) && (i != view->cell)) continue;
     75        if ((view->cell >= 0) && (i != view->cell)) continue;
    7676        pmCell *cell = cells->data[i];  // Cell of interest
    7777        psExit result = ppStatsCell(chipResults, cell, fits, view, data, config);
Note: See TracChangeset for help on using the changeset viewer.