Changeset 18168 for trunk/ppStats/src/ppStatsChip.c
- Timestamp:
- Jun 17, 2008, 12:29:17 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppStats/src/ppStatsChip.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStats/src/ppStatsChip.c
r18137 r18168 2 2 3 3 psExit ppStatsChip(psMetadata *fpaResults, // Metadata holding the fpa results 4 pmChip *chip, // Chip for which to get statistics5 psFits *fits, // FITS file handle6 pmFPAview *view, // View for analysis7 ppStatsData *data,// The data8 constpmConfig *config // Configuration4 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 9 9 ) 10 10 { … … 22 22 } 23 23 if (!chip->file_exists && !chip->data_exists) { 24 return PS_EXIT_SUCCESS;24 return PS_EXIT_SUCCESS; 25 25 } 26 26 … … 36 36 // Extract Header values 37 37 if (psListLength(data->headers)) { 38 // extract from existing headers39 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 headers46 p_ppStatsGetMetadata(chipResults, hdu->header, data->headers);47 }48 // extract from data->analysis output MD entries49 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 } 52 52 } 53 53 54 54 // Extract Concept values 55 55 if (psListLength(data->concepts) > 0) { 56 if (fits && chip->hdu && !pmChipReadHeader(chip, fits, config ->database)) {56 if (fits && chip->hdu && !pmChipReadHeader(chip, fits, config)) { 57 57 psError (PS_ERR_IO, false, "trouble reading chip header\n"); 58 58 psFree(chipResults); 59 59 return PS_EXIT_DATA_ERROR; 60 60 } 61 pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_ALL, false, false, config ->database);61 pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_ALL, false, false, config); 62 62 p_ppStatsGetMetadata(chipResults, chip->concepts, data->concepts); 63 63 } … … 73 73 // Iterate over cells (if view->cell is set, skip all others) 74 74 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; 76 76 pmCell *cell = cells->data[i]; // Cell of interest 77 77 psExit result = ppStatsCell(chipResults, cell, fits, view, data, config);
Note:
See TracChangeset
for help on using the changeset viewer.
