Changeset 34057
- Timestamp:
- Jun 23, 2012, 6:56:57 AM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120601/ppSim/src
- Files:
-
- 2 edited
-
ppSimInsertGalaxies.c (modified) (2 diffs)
-
ppSimInsertStars.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120601/ppSim/src/ppSimInsertGalaxies.c
r34054 r34057 2 2 static char *defaultModel = "PS_MODEL_SERSIC"; 3 3 4 // this is used to measure the inserted flux as a difference of 2 large numbers : must use 5 // 'double' or we get floating point errors and trends on a scale of ~0.005 mags at > -10 mags 6 // instrumental 4 7 double imageSum (psImage *image) { 5 8 double sum = 0.0; … … 165 168 166 169 // insert the source flux in the image 167 floatsum1 = imageSum(source->pixels);170 double sum1 = imageSum(source->pixels); 168 171 pmSourceAddWithOffset (source, PM_MODEL_OP_FULL, 0xff, dX, dY); 169 floatsum2 = imageSum(source->pixels);172 double sum2 = imageSum(source->pixels); 170 173 float flux = sum2 - sum1; 171 174 -
branches/eam_branches/ipp-20120601/ppSim/src/ppSimInsertStars.c
r34054 r34057 6 6 PTR = NULL; 7 7 8 floatimageSum (psImage *image);8 double imageSum (psImage *image); 9 9 10 10 bool ppSimInsertStars (pmReadout *readout, psImage *expCorr, psArray *stars, pmConfig *config) { … … 111 111 112 112 // XXX test: 113 flux = star->flux * expCorr->data.F32[0][0];113 // flux = star->flux * expCorr->data.F32[0][0]; 114 114 115 115 // instantiate a model for the PSF at this location, set desired flux … … 145 145 readout->image->data.F32[(int)(yCell)][(int)(xCell)] += flux; 146 146 } else { 147 // insert the source flux in the image 147 // insert the source flux in the image and measure inserted flux 148 // this is a difference of 2 large numbers : must use 'double' or we get floating 149 // point errors and trends on a scale of ~0.005 mags at > -10 mags instrumental 148 150 double sum1 = imageSum(source->pixels); 149 151 pmSourceAddWithOffset (source, PM_MODEL_OP_FULL, 0xff, dX, dY);
Note:
See TracChangeset
for help on using the changeset viewer.
