- Timestamp:
- May 8, 2010, 1:55:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/psphot.20100506/src/psphotStackMatchPSFs.c
r27883 r27884 64 64 bool psphotStackMatchPSFsReadout (pmConfig *config, const pmFPAview *view, psphotStackOptions *options, int index) { 65 65 66 // find the currently selected readout 67 pmFPAfile *fileRaw = pmFPAfileSelectSingle(config->files, "PSPHOT.STACK.INPUT.RAW", index); // File of interest 68 psAssert (fileRaw, "missing file?"); 66 pmFPAfile *fileSrc = psphotStackGetConvolveSource(config, options, index); 67 if (!fileSrc) { 68 psError(PSPHOT_ERR_CONFIG, false, "desired convolution source is missing"); 69 return false; 70 } 69 71 70 pmFPAfile *file Cnv = pmFPAfileSelectSingle(config->files, "PSPHOT.STACK.INPUT.CNV", index); // File of interest71 psAssert (file Cnv, "missingfile?");72 pmFPAfile *fileOut = pmFPAfileSelectSingle(config->files, "PSPHOT.STACK.OUTPUT.IMAGE", index); // File of interest 73 psAssert (fileOut, "missing output file?"); 72 74 73 pmReadout *readout Raw = pmFPAviewThisReadout(view, fileRaw->fpa);74 psAssert (readout Raw, "missing readout?");75 pmReadout *readoutSrc = pmFPAviewThisReadout(view, fileSrc->fpa); 76 psAssert (readoutSrc, "missing readout?"); 75 77 76 pmReadout *readoutCnv = pmFPAviewThisReadout(view, fileCnv->fpa); 77 psAssert (readoutCnv, "missing readout?"); 78 pmReadout *readoutOut = pmFPAviewThisReadout(view, fileOut->fpa); 79 if (readoutOut == NULL) { 80 readoutOut = pmFPAGenerateReadout(config, view, "PSPHOT.STACK.OUTPUT.IMAGE", fileSrc->fpa, NULL, 0); 81 psAssert (readoutOut, "missing readout?"); 82 } 78 83 79 84 // set NAN pixels to 'SAT' 80 85 psImageMaskType maskVal = pmConfigMaskGet("SAT", config); 81 if (!pmReadoutMaskNonfinite(readout Raw, maskVal)) {86 if (!pmReadoutMaskNonfinite(readoutSrc, maskVal)) { 82 87 psError(psErrorCodeLast(), false, "Unable to mask non-finite pixels in readout."); 83 88 return false; … … 86 91 // Image Matching (PSFs or just flux) 87 92 if (options->convolve) { 88 matchKernel(config, readout Cnv, readoutRaw, options, index);89 saveMatchData(readout Cnv, options, index);93 matchKernel(config, readoutOut, readoutSrc, options, index); 94 saveMatchData(readoutOut, options, index); 90 95 // renormKernel(readoutCnv, options, index); 91 96 } else { … … 97 102 } 98 103 99 rescaleData(readout Cnv, config, options, index);104 rescaleData(readoutOut, config, options, index); 100 105 101 dumpImage(readout Cnv, readoutRaw, index, "convolved");106 dumpImage(readoutOut, readoutSrc, index, "convolved"); 102 107 103 108 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
