Changeset 34135
- Timestamp:
- Jul 10, 2012, 3:42:50 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotStackReadout.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotStackReadout.c
r33958 r34135 1 1 # include "psphotInternal.h" 2 3 static bool psphotStackLoadWCS(pmConfig *config, const pmFPAview *view, const char *filerule); 2 4 3 5 // we have 3 possible real filesets: … … 67 69 char *STACK_SRC = useRaw ? STACK_RAW : STACK_CNV; 68 70 char *STACK_DET = STACK_RAW; 71 72 // load WCS 73 if (!psphotStackLoadWCS(config, view, STACK_SRC)) { 74 psError (PSPHOT_ERR_CONFIG, false, "trouble loading WCS for %s", STACK_SRC); 75 return false; 76 } 69 77 70 78 // set the photcode for each image … … 344 352 } 345 353 } 346 psphotRadialApertures (config, view, STACK_CNV, 0); // XXX entry 0 == unmatched?354 psphotRadialApertures (config, view, STACK_CNV, 0); // entry 0 == unmatched 347 355 psMemDump("extmeas"); 348 356 357 // mark any inputs that we want to skip the matched apertures for 358 psphotStackSetInputsToSkip(config, view, STACK_OUT, true); 359 349 360 int nRadialEntries = psphotStackMatchPSFsEntries(config, view, STACK_OUT); 350 351 361 for (int entry = 1; entry < nRadialEntries; entry++) { 352 362 // NOTE: entry 0 is the unmatched image set … … 362 372 363 373 // measure circular, radial apertures (objects sorted by S/N) 364 // entry 0 == unmatched? pass entry + 1?365 374 psphotRadialApertures (config, view, STACK_OUT, entry); 366 375 … … 373 382 } 374 383 } 384 psphotStackSetInputsToSkip(config, view, STACK_OUT, false); 375 385 376 386 // measure aperture photometry corrections … … 413 423 // create the exported-metadata and free local data 414 424 return psphotReadoutCleanup (config, view, STACK_SRC); 425 } 426 427 static bool psphotStackLoadWCS(pmConfig *config, const pmFPAview *view, const char *filerule) { 428 429 int num = psphotFileruleCount(config, filerule); 430 431 for (int i=0; i<num; i++) { 432 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filerule, i); // File of interest 433 psAssert (file, "missing file?"); 434 435 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 436 psAssert (readout, "missing readout?"); 437 438 pmHDU *hdu = pmHDUFromReadout(readout); 439 psAssert (hdu, "input missing hdu?"); 440 441 if (!pmAstromReadWCS(file->fpa, readout->parent->parent, hdu->header, 1.0)) { 442 psError (PSPHOT_ERR_UNKNOWN, false, "failed to read WCS from header for input %d", i); 443 return false; 444 } 445 } 446 return true; 415 447 } 416 448
Note:
See TracChangeset
for help on using the changeset viewer.
