IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 20, 2006, 8:57:16 PM (20 years ago)
Author:
eugene
Message:

modifications to support psphot on pmReadout with full IPP config files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotImageStats.c

    r6056 r6117  
    3939    }
    4040
    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
    4544
    4645    // convert instrumental background to poisson stats
    4746    sky = psStatsAlloc (PS_STAT_SAMPLE_MEAN | PS_STAT_SAMPLE_STDEV);
    4847    sky->sampleMean   = stats->sampleMedian;
    49     sky->sampleStdev  = sqrt(sky->sampleMean/GAIN + PS_SQR(NOISE));
     48    sky->sampleStdev  = sqrt(sky->sampleMean/gain + PS_SQR(noise));
    5049
    5150    psLogMsg ("psphot", 4, "background: %f +/- %f\n", sky->sampleMean, sky->sampleStdev);
Note: See TracChangeset for help on using the changeset viewer.