Changeset 21010 for trunk/ppSub/src/ppSubReadout.c
- Timestamp:
- Dec 15, 2008, 4:38:23 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppSub/src/ppSubReadout.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/ppSubReadout.c
r20993 r21010 456 456 outRO->data_exists = outCell->data_exists = outCell->parent->data_exists = true; 457 457 458 // Copy astrometry over 459 // It should get into the output images and photometry 460 pmFPA *refFPA = refRO->parent->parent->parent; // Reference FPA 461 pmHDU *refHDU = refFPA->hdu; // Reference HDU 462 if (!outHDU || !refHDU) { 463 psWarning("Unable to find HDU at FPA level to copy astrometry."); 464 } else if (!pmAstromReadWCS(outFPA, outCell->parent, refHDU->header, 1.0)) { 465 psWarning("Unable to read WCS astrometry from reference FPA."); 466 psErrorClear(); 467 } else if (!pmAstromWriteWCS(outHDU->header, outFPA, outCell->parent, WCS_TOLERANCE)) { 468 psWarning("Unable to write WCS astrometry to output FPA."); 469 psErrorClear(); 470 } 471 458 472 #if 0 459 473 pmReadoutMaskApply(outRO, maskBad); … … 538 552 // The PSF should already be stored for the readout 539 553 pmFPAfile *photFile = psMetadataLookupPtr(NULL, config->files, "PSPHOT.INPUT"); 540 pmFPACopy(photFile->fpa, out RO->parent->parent->parent);554 pmFPACopy(photFile->fpa, outFPA); 541 555 542 556 pmReadout *psfRO = pmFPAfileThisReadout(config->files, view, "PSPHOT.PSF.LOAD"); … … 663 677 } 664 678 665 // Copy astrometry over 666 pmFPA *refFPA = refRO->parent->parent->parent; // Reference FPA 667 pmHDU *refHDU = refFPA->hdu; // Reference HDU 668 if (!outHDU || !refHDU) { 669 psWarning("Unable to find HDU at FPA level to copy astrometry."); 670 } else { 671 if (!pmAstromReadWCS(outFPA, outCell->parent, refHDU->header, 1.0)) { 672 psWarning("Unable to read WCS astrometry from reference FPA."); 673 psErrorClear(); 674 } else if (!pmAstromWriteWCS(outHDU->header, outFPA, outCell->parent, WCS_TOLERANCE)) { 675 psWarning("Unable to write WCS astrometry to output FPA."); 676 psErrorClear(); 677 } 679 if (!pmAstromWriteWCS(outHDU->header, outFPA, outCell->parent, WCS_TOLERANCE)) { 680 psWarning("Unable to write WCS astrometry to output FPA."); 681 psErrorClear(); 678 682 } 679 683
Note:
See TracChangeset
for help on using the changeset viewer.
