Changeset 25491
- Timestamp:
- Sep 22, 2009, 5:44:48 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmPSFEnvelope.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmPSFEnvelope.c
r25490 r25491 34 34 35 35 // #define TESTING // Enable test output 36 // #define PEAK_NORM // Normalise peaks? 36 37 #define PEAK_FLUX 1.0e4 // Peak flux for each source 37 38 #define SKY_VALUE 0.0e0 // Sky value for fake image … … 170 171 float y = source->peak->yf + yOffset->data.S32[j]; // y coordinate of source 171 172 173 #ifdef PEAK_NORM 172 174 // Perhaps I'm being paranoid, but specify a range to check 173 175 int uMax = PS_MIN(x + radius, numCols - 1), uMin = PS_MAX(x - radius, 0); … … 182 184 } 183 185 } 184 185 186 if (!isfinite(flux) || flux < 0) { 186 187 continue; 187 188 } 188 189 float norm = PEAK_FLUX / flux; // Normalisation for source 190 #endif 189 191 psRegion region = psRegionSet(x - radius, x + radius, y - radius, y + radius); // PSF region 190 192 psImage *subImage = psImageSubset(fakeRO->image, region); // Subimage of fake PSF 191 193 psImage *subEnv = psImageSubset(envelope, region); // Subimage of envelope 194 #ifdef PEAK_NORM 192 195 psBinaryOp(subImage, subImage, "*", psScalarAlloc(norm, PS_TYPE_F32)); 196 #endif 193 197 psBinaryOp(subEnv, subEnv, "MAX", subImage); 194 198 psFree(subImage);
Note:
See TracChangeset
for help on using the changeset viewer.
