Changeset 21017 for trunk/ppStack/src/ppStackMatch.c
- Timestamp:
- Dec 16, 2008, 2:31:05 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackMatch.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackMatch.c
r21002 r21017 16 16 #define FAINT_SOURCE_FRAC 1.0e-4 // Set minimum flux to this fraction of faintest source flux 17 17 18 //#define TESTING // Enable debugging output18 #define TESTING // Enable debugging output 19 19 20 20 #ifdef TESTING … … 310 310 #endif 311 311 312 313 #if 0 314 // Testing the normalisation of the fake image 315 { 316 pmReadout *test = pmReadoutAlloc(NULL); // Test readout 317 psArray *sources = psArrayAlloc(1); // Array of sources 318 pmSource *source = pmSourceAlloc(); // Source 319 sources->data[0] = source; 320 source->peak = pmPeakAlloc(50, 50, 10000, PM_PEAK_LONE); 321 source->psfMag = -13.0; 322 pmReadoutFakeFromSources(test, 100, 100, sources, NULL, NULL, psf, 0.1, 0, false, true); 323 float sum = 0.0; 324 for (int y = 0; y < test->image->numRows; y++) { 325 for (int x = 0; x < test->image->numCols; x++) { 326 sum += test->image->data.F32[y][x]; 327 } 328 } 329 fprintf(stderr, "Photometry: %f --> %f = -13.0 ???\n", sum, -2.5*log10(sum)); 330 331 psFits *fits = psFitsOpen("testphot.fits", "w"); 332 psFitsWriteImage(fits, NULL, test->image, 0, NULL); 333 psFitsClose(fits); 334 exit(0); 335 } 336 #endif 337 312 338 pmReadout *fake = pmReadoutAlloc(NULL); // Fake readout with target PSF 313 339 … … 316 342 317 343 if (!pmReadoutFakeFromSources(fake, readout->image->numCols, readout->image->numRows, 318 stampSources, NULL, NULL, psf, minFlux, 0, false, false)) {344 stampSources, NULL, NULL, psf, minFlux, 0, false, true)) { 319 345 psError(PS_ERR_UNKNOWN, false, "Unable to generate fake image with target PSF."); 320 346 psFree(fake);
Note:
See TracChangeset
for help on using the changeset viewer.
