Changeset 34083 for trunk/ppSim/src/ppSimInsertGalaxies.c
- Timestamp:
- Jun 26, 2012, 11:25:02 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/ppSim/src/ppSimInsertGalaxies.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src/ppSimInsertGalaxies.c
r32350 r34083 2 2 static char *defaultModel = "PS_MODEL_SERSIC"; 3 3 4 float imageSum (psImage *image) { 5 float sum = 0.0; 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 7 double imageSum (psImage *image) { 8 double sum = 0.0; 6 9 for (int iy = 0; iy < image->numRows; iy++) { 7 10 for (int ix = 0; ix < image->numCols; ix++) { … … 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
Note:
See TracChangeset
for help on using the changeset viewer.
