Changeset 41331 for trunk/ppSim/src/ppSimInsertStars.c
- Timestamp:
- Apr 9, 2020, 11:51:42 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/ppSim/src/ppSimInsertStars.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src/ppSimInsertStars.c
r36868 r41331 41 41 } 42 42 43 float skyRate = psMetadataLookupF32(NULL, recipe, "SKY.RATE"); // Sky rate 44 if (isnan(skyRate)) { 45 float zp = psMetadataLookupF32(&mdok, recipe, "ZEROPOINT"); assert (mdok); 46 float scale = psMetadataLookupF32(&mdok, recipe, "PIXEL.SCALE"); assert (mdok); 47 float skyMags = psMetadataLookupF32(&mdok, recipe, "SKY.MAGS"); assert (mdok); 48 skyRate = scale * scale * ppSimMagToFlux (skyMags, zp); 49 } 43 float skyRate = ppSimGetSkyRate (recipe); 50 44 51 45 // Rough noise estimate, appropriate for entire cell (use for source radius?) 52 46 float roughNoise = sqrtf(PS_SQR(readnoise) + (darkRate + skyRate) * expTime); 47 float skyFlux = skyRate*expTime; 53 48 54 49 int x0Chip = psMetadataLookupS32(NULL, chip->concepts, "CHIP.X0"); … … 165 160 fprintf (outfile, "%8.3f %8.3f %10.5f %2d %7.3f %5.3f %5.3f %5.3f %5.3f %5.3f : %f %f\n", star->x, star->y, starFlux, 0, source->psfMag, source->psfMagErr, axes.major, axes.minor, axes.theta, par8, model->params->data.F32[PM_PAR_I0], radius); 166 161 162 // save the approx sky (exact if sky is flat) for external comparisons 163 source->sky = skyFlux; 164 167 165 // add the sources to the source array 168 166 psArrayAdd (sources, 100,source);
Note:
See TracChangeset
for help on using the changeset viewer.
