Changeset 16373
- Timestamp:
- Feb 8, 2008, 10:11:20 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap_branch_080207/ppStack/src/ppStackMatch.c
r15850 r16373 11 11 //#define TESTING 12 12 13 bool ppStackMatch(pmReadout *output, const pmReadout *input, const pmReadout *sourcesRO, 14 const pmPSF *psf, const pmConfig *config) 13 bool ppStackMatch(pmReadout *readout, const pmReadout *sourcesRO, const pmPSF *psf, const pmConfig *config) 15 14 { 16 15 // Look up appropriate values from the ppSub recipe … … 68 67 pmReadout *fake = pmReadoutAlloc(NULL); // Fake readout with target PSF 69 68 70 if (!pmReadoutFakeFromSources(fake, input->image->numCols, input->image->numRows, sources, NULL, NULL,69 if (!pmReadoutFakeFromSources(fake, readout->image->numCols, readout->image->numRows, sources, NULL, NULL, 71 70 psf, powf(10.0, -0.4 * maxMag), 0, false)) { 72 71 psError(PS_ERR_UNKNOWN, false, "Unable to generate fake image with target PSF."); … … 85 84 86 85 // Do the image matching 87 if (!pmSubtractionMatch(output, NULL, input, fake, footprint, regionSize, spacing, threshold, 86 pmReadout *output = pmReadoutAlloc(NULL); // Output readout, for holding results temporarily 87 if (!pmSubtractionMatch(output, NULL, readout, fake, footprint, regionSize, spacing, threshold, 88 88 sources, stampsName, type, size, order, widths, orders, inner, ringsOrder, 89 89 binning, optimum, optWidths, optOrder, optThresh, iter, rej, maskBad, … … 92 92 psFree(fake); 93 93 psFree(optWidths); 94 psFree(output); 94 95 return false; 95 96 } … … 97 98 psFree(optWidths); 98 99 100 // Replace original images with convolved 101 psFree(readout->image); 102 psFree(readout->mask); 103 psFree(readout->weight); 104 readout->image = psMemIncrRefCounter(output->image); 105 readout->mask = psMemIncrRefCounter(output->mask); 106 readout->weight = psMemIncrRefCounter(output->weight); 107 psFree(output); 108 99 109 return true; 100 110 }
Note:
See TracChangeset
for help on using the changeset viewer.
