Changeset 30176
- Timestamp:
- Dec 24, 2010, 3:30:41 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/psphot/src/psphotStackReadout.c
r30142 r30176 13 13 bool psphotStackVisualFilerule(pmConfig *config, const pmFPAview *view, const char *filerule) { 14 14 15 bool status = false; 16 15 17 int num = psphotFileruleCount(config, filerule); 18 19 // select the appropriate recipe information 20 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 16 21 17 22 // loop over the available readouts … … 25 30 psAssert (readout, "missing readout?"); 26 31 27 psphotVisualShowImage (readout); 28 psphotVisualShowResidualImage (readout); 32 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); 33 psAssert (detections, "missing detections?"); 34 35 psArray *sources = detections->allSources; 36 psAssert (sources, "missing sources?"); 37 38 psphotVisualShowResidualImage (readout, true); 39 psphotVisualShowObjectRegions (readout, recipe, sources); 29 40 } 30 41 return true; … … 211 222 psphotMagnitudes(config, view, STACK_SRC); 212 223 213 // copy the detections from SRC to OUT (for radial aperture photometry) 214 if (!psphotSourceChildren (config, view, STACK_OUT, STACK_SRC)) { 224 // create source children for the OUT filerule (for radial aperture photometry) 225 psArray *objectsRadial = psphotSourceChildrenByObject (config, view, STACK_OUT, objects); 226 if (!objectsRadial) { 215 227 psFree(objects); 216 228 psError (PSPHOT_ERR_UNKNOWN, false, "failure in peak analysis"); … … 221 233 for (int nMatchedPSF = 0; smoothAgain; nMatchedPSF++) { 222 234 223 // XXX we probably can drop this if we redefine the pixels in CopySources 224 // psphotRedefinePixels (config, view, STACK_OUT); 225 226 // re-measure the PSF for the smoothed image 235 // re-measure the PSF for the smoothed image (using entries in 'allSources') 227 236 psphotChoosePSF (config, view, STACK_OUT, false); 228 237 … … 234 243 235 244 // measure circular, radial apertures (objects sorted by S/N) 236 psphotRadialAperturesByObject (config, objects , view, STACK_OUT, nMatchedPSF);245 psphotRadialAperturesByObject (config, objectsRadial, view, STACK_OUT, nMatchedPSF); 237 246 238 247 // replace the flux in the image so it is returned to its original state … … 265 274 266 275 psFree (objects); 276 psFree (objectsRadial); 267 277 268 278 // create the exported-metadata and free local data
Note:
See TracChangeset
for help on using the changeset viewer.
