Changeset 21365 for trunk/ppSim/src/ppSimInsertStars.c
- Timestamp:
- Feb 5, 2009, 4:47:00 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppSim/src/ppSimInsertStars.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src/ppSimInsertStars.c
r20367 r21365 39 39 float skyRate = psMetadataLookupF32(NULL, recipe, "SKY.RATE"); // Sky rate 40 40 if (isnan(skyRate)) { 41 float zp = psMetadataLookupF32(&mdok, recipe, "ZEROPOINT"); assert (mdok);42 float scale = psMetadataLookupF32(&mdok, recipe, "PIXEL.SCALE"); assert (mdok);43 float skyMags = psMetadataLookupF32(&mdok, recipe, "SKY.MAGS"); assert (mdok);41 float zp = psMetadataLookupF32(&mdok, recipe, "ZEROPOINT"); assert (mdok); 42 float scale = psMetadataLookupF32(&mdok, recipe, "PIXEL.SCALE"); assert (mdok); 43 float skyMags = psMetadataLookupF32(&mdok, recipe, "SKY.MAGS"); assert (mdok); 44 44 skyRate = scale * scale * ppSimMagToFlux (skyMags, zp); 45 45 } … … 75 75 FILE *outfile = fopen (outname, "w"); 76 76 77 // add sources to the readout image & weight77 // add sources to the readout image & variance 78 78 psTrace("ppSim", 1, "Inserting %ld stars...\n", stars->n); 79 79 for (long i = 0; i < stars->n; i++) { … … 118 118 psF64 Area = 2.0 * M_PI * axes.major * axes.minor; 119 119 120 // this value is the pure (input) flux, and is saved in the output source cmf files120 // this value is the pure (input) flux, and is saved in the output source cmf files 121 121 source->psfMag = -2.5*log10(star->flux); 122 122 source->errMag = sqrt(Area*PS_SQR(roughNoise) + flux) / flux; … … 132 132 // Blow away the image parts of the source, which makes the memory explode 133 133 RESET(source->pixels); 134 RESET(source-> weight);134 RESET(source->variance); 135 135 RESET(source->maskObj); 136 136 RESET(source->maskView);
Note:
See TracChangeset
for help on using the changeset viewer.
