Changeset 11178
- Timestamp:
- Jan 18, 2007, 6:57:40 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotReadout.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotReadout.c
r10975 r11178 12 12 char *breakPt = psMetadataLookupStr (NULL, recipe, "BREAK_POINT"); 13 13 14 // XXX does this need to invoke I/O? 15 // XXX move this input the psphotImageLoop level? 14 // generate mask & weight images if they don't already exit 16 15 if (!pmReadoutGenerateMaskWeight (readout, true)) { 17 16 return false; … … 99 98 psphotBlendFit (readout, sources, recipe, psf); 100 99 101 // next steps: 102 // remeasure the sky after objects have been subrtracted 103 // re-find the peaks. 104 // re-run ensemble fit 105 106 // XXX this was an attempt to measure bias due to the weighting. 107 // psphotWeightBias (readout, sources, recipe, psf); 108 109 // replace fitted sources 110 // XXX we need to replace failed objects, not all objects 111 // psphotReplaceUnfit (sources); 112 113 // XXX find remaining peaks after first source subtraction pass 114 // psphotFindPeaks (); 115 116 // replace subtracted sources 100 // replace all sources 117 101 psphotReplaceAll (sources); 118 // psphotSaveImage (NULL, readout->image, "replace.fits");119 102 120 103 // linear PSF fit to remaining peaks 121 104 psphotEnsemblePSF (readout, sources, recipe, psf, TRUE); 105 if (!strcasecmp (breakPt, "PASS1")) { 106 goto finish; 107 } 122 108 123 // XXX test the plotting function 124 // psphotPlotPSFModel (config, view, sources); 109 // replace background in residual image 110 psphotSkyReplace (config, view); 111 112 // re-measure background model (median, smoothed image) 113 psphotImageMedian (config, view); 114 115 // find the peaks in the image 116 psMetadataAddF32 (recipe, PS_LIST_TAIL, "PEAKS_NSIGMA_LIMIT", PS_META_REPLACE, "", 5.0); 117 psArray *newPeaks = psphotFindPeaks (readout, recipe); 118 119 // define new sources based on the new peaks 120 psArray *newSources = psphotSourceStats (readout, recipe, newPeaks); 121 psFree (newPeaks); 122 123 // set source type 124 psphotRoughClass (newSources, recipe); 125 126 // create full input models 127 psphotGuessModels (readout, newSources, recipe, psf); 128 129 // linear PSF fit to remaining peaks 130 psphotEnsemblePSF (readout, newSources, recipe, psf, TRUE); 131 132 // merge the newly selected peaks into the existing list 133 // psphotIncludeNewPeaks (sources, newSources); 134 psFree (newSources); 125 135 126 136 finish: … … 135 145 // calculate source magnitudes 136 146 psphotMagnitudes(sources, recipe, psf, background); 147 148 // replace fitted sources 149 // XXX we need to replace failed objects, not all objects 150 // psphotReplaceUnfit (sources); 137 151 138 152 // replace background in residual image
Note:
See TracChangeset
for help on using the changeset viewer.
