Changeset 14359
- Timestamp:
- Jul 20, 2007, 5:00:03 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ppStats/src/ppStatsReadout.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStats/src/ppStatsReadout.c
r14010 r14359 2 2 3 3 psExit ppStatsReadout(psMetadata *cellResults, // Metadata holding the chip results 4 pmReadout *readout,// Cell for which to get statistics5 int nReadout,// readout number6 ppStatsData *data,// The data7 const pmConfig *config // Configuration4 pmReadout *readout, // Cell for which to get statistics 5 int nReadout, // readout number 6 ppStatsData *data, // The data 7 const pmConfig *config // Configuration 8 8 ) 9 9 { … … 14 14 15 15 /*** psphot and psastro put their results on the readout->analysis metadata (PSPHOT.HEADER, 16 PSASTRO.HEADER). we need to pull quantities of interest from those locations. to do17 this, we need to select the appropriate readout. ***/16 PSASTRO.HEADER). we need to pull quantities of interest from those locations. to do 17 this, we need to select the appropriate readout. ***/ 18 18 19 19 // Extract Header and Concept values from the Cell and Readout->analysis level … … 31 31 // Extract Header values 32 32 if (psListLength(data->headers)) { 33 // extract from data->analysis output MD entries34 if (psListLength(data->analysis)) {35 p_ppStatsGetAnalysis (readoutResults, data->headers, readout->analysis, data->analysis);36 }33 // extract from data->analysis output MD entries 34 if (psListLength(data->analysis)) { 35 p_ppStatsGetAnalysis (readoutResults, data->headers, readout->analysis, data->analysis); 36 } 37 37 } 38 38 … … 62 62 psVector *sampleValues = psVectorAlloc(numSamples, PS_TYPE_F32); // Vector of samples 63 63 psVector *sampleMask = NULL; // Corresponding mask 64 bool warnNonFinite = false; // Have we warned about non-finite values? 64 65 if (mask) { 65 66 sampleMask = psVectorAlloc(numSamples, PS_TYPE_U8); … … 70 71 int x = j % image->numCols; 71 72 sampleValues->data.F32[i] = image->data.F32[y][x]; 73 if (!isfinite(sampleValues->data.F32[i])) { 74 if (!warnNonFinite) { 75 psWarning("Non-finite value detected at %d,%d", x, y); 76 warnNonFinite = true; 77 } 78 sampleMask->data.U8[i] = data->maskVal; 79 } 72 80 if (mask) { 73 81 sampleMask->data.U8[i] = mask->data.U8[y][x];
Note:
See TracChangeset
for help on using the changeset viewer.
