Changeset 41396 for trunk/pswarp/src/pswarpLoop.c
- Timestamp:
- Aug 10, 2020, 3:39:50 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpLoop.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpLoop.c
r40354 r41396 123 123 } 124 124 125 // Determine the reference catalog used 126 if ((!refcat)&&(astromRO)) { 127 if ((astromRO->parent->parent->hdu->header)&&(output->fpa->analysis)) { 128 psMetadataItem *refItem = psMetadataLookup(astromRO->parent->parent->hdu->header, "PSREFCAT"); 129 if (refItem) { 130 refcat = psMetadataLookupStr(NULL, astromRO->parent->parent->hdu->header, "PSREFCAT"); 131 psMetadataAddStr(output->fpa->analysis, PS_LIST_TAIL, "REFERENCE_CATALOG", PS_META_REPLACE, 132 "Reference catalog used for calibration.", refcat); 125 // Determine the reference catalog used for the astrometry 126 if (!refcat && astromRO) { 127 128 // find the HDU for this readout 129 pmHDU *hdu = pmHDUFromReadout (astromRO); 130 if (! hdu) { 131 psWarning ("unable to find HDU for astrometry source, cannot save PSREFCAT"); 132 } 133 if (!output->fpa->analysis) { 134 psWarning ("analysis metadata not defined for output, cannot save PSREFCAT"); 133 135 } 134 } 136 137 psMetadataItem *refItem = psMetadataLookup(hdu->header, "PSREFCAT"); 138 if (!refItem) { 139 psWarning ("PSREFCAT not found in astrometry HDU, cannot save PSREFCAT"); 140 } 141 142 if (refItem && hdu && output->fpa->analysis) { 143 refcat = psMetadataLookupStr(NULL, hdu->header, "PSREFCAT"); 144 psMetadataAddStr(output->fpa->analysis, PS_LIST_TAIL, "REFERENCE_CATALOG", PS_META_REPLACE, 145 "Reference catalog used for calibration.", refcat); 146 } 135 147 } 136 137 148 } 138 149
Note:
See TracChangeset
for help on using the changeset viewer.
