Changeset 7064 for trunk/ppMerge/src/ppMergeBackground.c
- Timestamp:
- May 3, 2006, 6:12:17 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppMerge/src/ppMergeBackground.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeBackground.c
r7061 r7064 34 34 35 35 // Get the scale and zero for each chip of each input 36 bool ppMergeScaleZero(p pImage **scales, // The scales for each integration/cell37 p pImage **zeros, // The zeroes for each integration/cell36 bool ppMergeScaleZero(psImage **scales, // The scales for each integration/cell 37 psImage **zeros, // The zeroes for each integration/cell 38 38 ppMergeData *data,// The data 39 39 const ppMergeOptions *options, // The options … … 76 76 psFits *inFile = psFitsOpen(filenames->data[i], "r"); // The FITS file to read 77 77 if (!inFile) { 78 ps ErrorPrint(PS_ERR_IO, false, "Unable to open input file %s --- ignored.\n", name);78 psLogMsg(__func__, PS_LOG_WARN, "Unable to open input file %s --- ignored.\n", name); 79 79 status = false; 80 80 continue; 81 81 } 82 82 83 pmFPA *fpa = in->data[i];// The FPA for this input83 pmFPA *fpa = data->in->data[i]; // The FPA for this input 84 84 int cellNum = -1; // Number of the cell 85 85 psArray *chips = fpa->chips; // Array of chips … … 106 106 if (options->exptime) { 107 107 bool mdok = true; // Status of MD lookup 108 exptime->data.F64[i][cellNum] = psMetadataLookup(&mdok, cell->concepts, "CELL.EXPOSURE"); 108 exptime->data.F64[i][cellNum] = psMetadataLookupF32(&mdok, cell->concepts, 109 "CELL.EXPOSURE"); 109 110 if (!mdok || isnan(exptime->data.F64[i][cellNum])) { 110 111 psLogMsg(__func__, PS_LOG_WARN, "CELL.EXPOSURE for file %s chip %d cell %d is not " … … 139 140 if (options->scale) { 140 141 bool mdok = true; // Status of MD lookup 141 gain ->data.F32[cellNum] = psMetadataLookupF32(&mdok, cell->concepts, "CELL.GAIN");142 if (!mdok || isnan(gain ->data.F32[cellNum])) {142 gains->data.F32[cellNum] = psMetadataLookupF32(&mdok, cell->concepts, "CELL.GAIN"); 143 if (!mdok || isnan(gains->data.F32[cellNum])) { 143 144 psLogMsg(__func__, PS_LOG_WARN, "CELL.GAIN for file %s chip %d cell %d is not " 144 145 "set.\n", name, j, k); 145 gain ->data.F32[cellNum] = NAN;146 gains->data.F32[cellNum] = NAN; 146 147 status = false; 147 148 } … … 150 151 // Get the background 151 152 psImageStats(bgStats, image, readout->mask, options->maskVal); 152 background [i][cellNum] = getStat(bgStats, options->background);153 } 154 155 p sCellFreeData(cell);153 background->data.F64[i][cellNum] = getStat(bgStats, options->background); 154 } 155 156 pmCellFreeData(cell); 156 157 } 157 p sChipFreeData(chip);158 } 159 p sFPAFreeData(fpa);158 pmChipFreeData(chip); 159 } 160 pmFPAFreeData(fpa); 160 161 psFitsClose(inFile); 161 162 }
Note:
See TracChangeset
for help on using the changeset viewer.
