Changeset 6117 for trunk/psphot/src/psphotImageStats.c
- Timestamp:
- Jan 20, 2006, 8:57:16 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotImageStats.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotImageStats.c
r6056 r6117 39 39 } 40 40 41 // we store these values in mean,stdev 42 bool status = false; 43 float NOISE = psMetadataLookupF32 (&status, config, "RDNOISE"); 44 float GAIN = psMetadataLookupF32 (&status, config, "GAIN"); 41 pmCell *cell = readout->parent; // cell containing this readout; 42 float gain = psMetadataLookupF32(NULL, cell->concepts, "CELL.GAIN"); // Cell gain 43 float noise = psMetadataLookupF32(NULL, cell->concepts, "CELL.READNOISE"); // Cell read noise 45 44 46 45 // convert instrumental background to poisson stats 47 46 sky = psStatsAlloc (PS_STAT_SAMPLE_MEAN | PS_STAT_SAMPLE_STDEV); 48 47 sky->sampleMean = stats->sampleMedian; 49 sky->sampleStdev = sqrt(sky->sampleMean/ GAIN + PS_SQR(NOISE));48 sky->sampleStdev = sqrt(sky->sampleMean/gain + PS_SQR(noise)); 50 49 51 50 psLogMsg ("psphot", 4, "background: %f +/- %f\n", sky->sampleMean, sky->sampleStdev);
Note:
See TracChangeset
for help on using the changeset viewer.
