Changeset 31154 for trunk/psphot/src/psphotForcedImageLoop.c
- Timestamp:
- Apr 4, 2011, 1:12:39 PM (15 years ago)
- Location:
- trunk/psphot
- Files:
-
- 2 edited
-
. (modified) (2 props)
-
src/psphotForcedImageLoop.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
- Property svn:ignore
-
old new 19 19 psphot-config 20 20 Doxyfile 21 a.out.dSYM
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
trunk/psphot/src/psphotForcedImageLoop.c
r29936 r31154 1 1 # include "psphotStandAlone.h" 2 2 3 # define ESCAPE(MESSAGE) { \4 psError(PSPHOT_ERR_DATA, false, MESSAGE);\5 psFree (view);\6 return false;\7 }3 # define ESCAPE(MESSAGE) { \ 4 psError(PSPHOT_ERR_DATA, false, MESSAGE); \ 5 psFree (view); \ 6 return false; \ 7 } 8 8 9 9 bool psphotForcedImageLoop (pmConfig *config) { … … 31 31 if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE ("failed input for fpa in psphot."); 32 32 33 // select the appropriate recipe information 34 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 35 psAssert (recipe, "missing recipe?"); 36 37 psImageMaskType maskTest = psMetadataLookupImageMask(&status, recipe, "MASK.PSPHOT"); 38 33 39 // for psphot, we force data to be read at the chip level 34 40 while ((chip = pmFPAviewNextChip (view, load->fpa, 1)) != NULL) { … … 45 51 // mosaic the cells of a chip into a single contiguous (trimmed) chip 46 52 if (!psphotMosaicChip(config, view, "PSPHOT.INPUT", "PSPHOT.LOAD")) ESCAPE ("Unable to mosaic chip."); 53 54 // Read WCS if easy. 55 // XXX Since we're mosaicking cells, we ignore the case where the WCS is defined for a cell. 56 { 57 pmChip *inChip = pmFPAviewThisChip(view, input->fpa); // Mosaicked chip 58 pmHDU *hduLow = pmHDUGetLowest(input->fpa, inChip, NULL); 59 if (hduLow && !pmAstromReadWCS(input->fpa, inChip, hduLow->header, 1.0)) { 60 psWarning("Unable to read WCS astrometry from header."); 61 psErrorClear(); 62 pmHDU *hduHigh = pmHDUGetHighest(input->fpa, inChip, NULL); 63 if (hduHigh && hduHigh != hduLow && 64 !pmAstromReadWCS(input->fpa, chip, hduHigh->header, 1.0)) { 65 psWarning("Unable to read WCS astrometry from primary header."); 66 psErrorClear(); 67 } 68 } 69 } 47 70 48 71 // try to load other supporting data (PSF, SRC, etc). … … 76 99 if (readout->mask) { 77 100 psImageMaskType maskSat = pmConfigMaskGet("SAT", config); // Mask value for saturated pixels 78 if (!pmReadoutMaskNonfinite(readout, maskSat)) {101 if (!pmReadoutMaskInvalid(readout, maskTest, maskSat)) { 79 102 psError(psErrorCodeLast(), false, "Unable to mask non-finite pixels."); 80 103 psFree(view); … … 91 114 } 92 115 116 // drop all versions of the internal files 93 117 status = true; 94 118 status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL");
Note:
See TracChangeset
for help on using the changeset viewer.
