Changeset 32996 for trunk/psphot/src
- Timestamp:
- Dec 22, 2011, 9:00:06 AM (14 years ago)
- Location:
- trunk/psphot
- Files:
-
- 16 edited
-
. (modified) (1 prop)
-
src (modified) (1 prop)
-
src/psphotFitSourcesLinear.c (modified) (1 diff)
-
src/psphotForcedReadout.c (modified) (1 diff)
-
src/psphotGuessModels.c (modified) (2 diffs)
-
src/psphotKronIterate.c (modified) (2 diffs)
-
src/psphotRadialProfileWings.c (modified) (4 diffs)
-
src/psphotReadout.c (modified) (5 diffs)
-
src/psphotReadoutFindPSF.c (modified) (2 diffs)
-
src/psphotReadoutForcedKnownSources.c (modified) (1 diff)
-
src/psphotReadoutKnownSources.c (modified) (1 diff)
-
src/psphotReadoutMinimal.c (modified) (1 diff)
-
src/psphotSourceMatch.c (modified) (1 diff)
-
src/psphotStackImageLoop.c (modified) (1 prop)
-
src/psphotStackMatchPSFsNext.c (modified) (1 diff)
-
src/psphotStackReadout.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20111122/psphot (added) merged: 32850,32924
- Property svn:mergeinfo changed
-
trunk/psphot/src
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20111122/psphot/src (added) merged: 32850,32924
- Property svn:mergeinfo changed
-
trunk/psphot/src/psphotFitSourcesLinear.c
r32695 r32996 216 216 psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "built fitSources: %f sec (%ld objects)\n", psTimerMark ("psphot.linear"), sources->n); 217 217 218 // fprintf (stderr, "****** Nsat : %d ********\n", Nsat);219 220 218 if (fitSources->n == 0) { 221 219 psFree(fitSources); -
trunk/psphot/src/psphotForcedReadout.c
r29936 r32996 55 55 psphotLoadExtSources (config, view, filerule); 56 56 57 // construct an initial model for each object, set the radius to fitRadius, set circular fit mask 57 // Construct an initial model for each object, set the radius to fitRadius, set circular 58 // fit mask. NOTE: only applied to sources without guess models 58 59 psphotGuessModels (config, view, filerule); 59 60 -
trunk/psphot/src/psphotGuessModels.c
r32633 r32996 46 46 psAssert (detections, "missing detections?"); 47 47 48 psArray *sources = detections-> newSources;48 psArray *sources = detections->allSources; 49 49 psAssert (sources, "missing sources?"); 50 50 … … 160 160 pmSource *source = sources->data[i]; 161 161 162 // do not redo sources already guessed 163 if (source->tmpFlags & PM_SOURCE_TMPF_MODEL_GUESS) continue; 164 162 165 // this is used to mark sources for which the model is measured. We check later that 163 166 // all are used. -
trunk/psphot/src/psphotKronIterate.c
r32776 r32996 111 111 112 112 pmSource *source = sources->data[i]; 113 if (!source->peak) continue; // XXX how can we have a peak-less source?114 115 // allocate space for moments116 if (!source->moments) continue;117 113 118 114 // set a window function for each source based on the moments 115 // (this skips really bad sources (no peak, no moments, DEFECT) 119 116 psphotKronWindowSetSource (source, kronWindow, false, true); 120 117 } … … 401 398 402 399 if (!source) return false; 400 if (!source->peak) return false; // XXX how can we have a peak-less source? 403 401 if (!source->moments) return false; 402 if (source->type == PM_SOURCE_TYPE_DEFECT) return false; 403 if (source->type == PM_SOURCE_TYPE_SATURATED) return false; 404 404 psAssert(kronWindow, "need a window"); 405 405 -
trunk/psphot/src/psphotRadialProfileWings.c
r32776 r32996 80 80 } 81 81 82 MIN_RADIUS = 0.25*psMetadataLookupF32 (&status, readout->analysis, "PSF_MOMENTS_RADIUS");82 MIN_RADIUS = psMetadataLookupF32 (&status, readout->analysis, "PSF_MOMENTS_RADIUS"); 83 83 if (!status) { 84 MIN_RADIUS = 0.25*psMetadataLookupF32 (&status, recipe, "PSF_MOMENTS_RADIUS");84 MIN_RADIUS = psMetadataLookupF32 (&status, recipe, "PSF_MOMENTS_RADIUS"); 85 85 } 86 86 … … 209 209 # define TEST_Y 3096 210 210 211 float InterpolateValues (float X0, float Y0, float X1, float Y1, float X); 212 211 213 // XXX use integer radius values? the rings assume integer values, right? or do they? 212 214 bool psphotRadialProfileWingsSource (pmSource *source, pmReadout *readout, psImageMaskType maskVal) { … … 226 228 227 229 // radii will be MIN_RADIUS to MAX_RADIUS in NN log steps: 228 float NSTEP = 10.0;230 float NSTEP = 25.0; 229 231 float MIN_DR = 2; 230 232 float NSIGMA = 1.0; … … 288 290 // fprintf (stderr, "%f %f : %f : %f %f : %f\n", source->peak->xf, source->peak->yf, radius, meanFlux, meanFluxError, slope); 289 291 290 if (!limit) { 291 limit |= (meanFlux - NSIGMA * meanFluxError < THRESHOLD); // dropped to sky level 292 limit |= isfinite(slope) && (fabs(slope) < 3.0); // SB no longer changing. 293 limitRadius = meanRadius; 292 if (!limit && (meanFlux - NSIGMA * meanFluxError < THRESHOLD)) { 293 // dropped to sky level 294 limit = true; 295 // linearly interpolate to the radius at which we hit the sky 296 if (isfinite(lastFlux)) { 297 limitRadius = InterpolateValues(lastFlux, lastRadius, meanFlux, meanRadius, 0.0); 298 } else { 299 limitRadius = meanRadius; 300 } 301 limitFlux = meanFlux; 302 limitSlope = slope; 303 } 304 if (!limit && isfinite(slope) && (fabs(slope) < 3.0)) { 305 // SB no longer changing. 306 limit = true; 307 // linearly interpolate to the radius at which we hit the sky, using the last flux and the limiting slope 308 if (isfinite(lastFlux)) { 309 limitRadius = lastRadius + lastFlux / 3.0; 310 } else { 311 limitRadius = meanRadius; 312 } 294 313 limitFlux = meanFlux; 295 314 limitSlope = slope; -
trunk/psphot/src/psphotReadout.c
r32695 r32996 127 127 // psphotLoadExtSources (config, view, filerule); // pass 1 128 128 129 // construct an initial model for each object, set the radius to fitRadius, set circular130 // fit mask (detections->newSources)131 psphotGuessModels (config, view, filerule); // pass 1132 133 129 // merge the newly selected sources into the existing list 134 130 // NOTE: merge OLD and NEW 135 131 psphotMergeSources (config, view, filerule); 132 133 // Construct an initial model for each object, set the radius to fitRadius, set circular 134 // fit mask. NOTE: only applied to sources without guess models 135 psphotGuessModels (config, view, filerule); // pass 1 136 136 137 137 // linear PSF fit to source peaks, subtract the models from the image (in PSF mask) … … 193 193 } 194 194 195 // create full input models, set the radius to fitRadius, set circular fit mask196 // NOTE: apply only to detections->newSources197 psphotGuessModels (config, view, filerule); // pass 2 (detections->newSources)198 199 195 // replace all sources so fit below applies to all at once 200 196 // NOTE: apply only to OLD sources (which have been subtracted) … … 205 201 // XXX check on free of sources... 206 202 psphotMergeSources (config, view, filerule); // (detections->newSources + detections->allSources -> detections->allSources) 203 204 // Construct an initial model for each object, set the radius to fitRadius, set circular 205 // fit mask. NOTE: only applied to sources without guess models 206 psphotGuessModels (config, view, filerule); // pass 1 207 207 208 208 // NOTE: apply to ALL sources … … 234 234 } 235 235 236 // create full input models, set the radius to fitRadius, set circular fit mask237 // NOTE: apply only to detections->newSources238 psphotGuessModels (config, view, filerule); // pass 2 (detections->newSources)239 240 236 // replace all sources so fit below applies to all at once 241 237 // NOTE: apply only to OLD sources (which have been subtracted) … … 247 243 psphotMergeSources (config, view, filerule); // (detections->newSources + detections->allSources -> detections->allSources) 248 244 245 // Construct an initial model for each object, set the radius to fitRadius, set circular 246 // fit mask. NOTE: only applied to sources without guess models 247 psphotGuessModels (config, view, filerule); // pass 1 248 249 249 // NOTE: apply to ALL sources 250 250 psphotFitSourcesLinear (config, view, filerule, true); // pass 3 (detections->allSources) -
trunk/psphot/src/psphotReadoutFindPSF.c
r30624 r32996 54 54 } 55 55 56 // merge the newly selected sources into the existing list 57 // NOTE: merge OLD and NEW 58 psphotMergeSources (config, view, filerule); 59 56 60 # if 0 57 61 // XXX if we want to determine the aperture residual correction here, we either … … 61 65 psphotGuessModels (config, view, filerule); 62 66 # endif 63 64 // merge the newly selected sources into the existing list65 // NOTE: merge OLD and NEW66 psphotMergeSources (config, view, filerule);67 67 68 68 # if 0 -
trunk/psphot/src/psphotReadoutForcedKnownSources.c
r29936 r32996 36 36 } 37 37 38 // construct an initial model for each object39 psphotGuessModels (config, view, filerule);40 41 38 // merge the newly selected sources into the existing list 42 39 // NOTE: merge OLD and NEW 43 40 psphotMergeSources (config, view, filerule); 41 42 // Construct an initial model for each object, set the radius to fitRadius, set circular 43 // fit mask. NOTE: only applied to sources without guess models 44 psphotGuessModels (config, view, filerule); 44 45 45 46 // linear PSF fit to source peaks -
trunk/psphot/src/psphotReadoutKnownSources.c
r30624 r32996 48 48 } 49 49 50 // construct an initial model for each object51 psphotGuessModels (config, view, filerule);52 53 50 // merge the newly selected sources into the existing list 54 51 // NOTE: merge OLD and NEW 55 52 psphotMergeSources (config, view, filerule); 53 54 // Construct an initial model for each object, set the radius to fitRadius, set circular 55 // fit mask. NOTE: only applied to sources without guess models 56 psphotGuessModels (config, view, filerule); 56 57 57 58 // linear PSF fit to source peaks -
trunk/psphot/src/psphotReadoutMinimal.c
r29936 r32996 59 59 } 60 60 61 // construct an initial model for each object62 psphotGuessModels (config, view, filerule);63 64 61 // merge the newly selected sources into the existing list 65 62 psphotMergeSources (config, view, filerule); 63 64 // Construct an initial model for each object, set the radius to fitRadius, set circular 65 // fit mask. NOTE: only applied to sources without guess models 66 psphotGuessModels (config, view, filerule); 66 67 67 68 // linear PSF fit to source peaks -
trunk/psphot/src/psphotSourceMatch.c
r32666 r32996 261 261 source->imageID = index; 262 262 source->mode2 |= PM_SOURCE_MODE2_MATCHED; // source is generated based on another image 263 source->type = PM_SOURCE_TYPE_STAR; // until we know more, assume a PSF fit 263 264 264 265 // add the peak -
trunk/psphot/src/psphotStackImageLoop.c
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20111122/psphot/src/psphotStackImageLoop.c (added) merged: 32850
- Property svn:mergeinfo changed
-
trunk/psphot/src/psphotStackMatchPSFsNext.c
r32348 r32996 51 51 52 52 bool status = false; 53 54 psTimerStart ("psphot.smooth"); 53 55 54 56 // find the currently selected readout -
trunk/psphot/src/psphotStackReadout.c
r32695 r32996 160 160 } 161 161 162 // construct an initial model for each object, set the radius to fitRadius, set circular fit mask163 psphotGuessModels (config, view, STACK_SRC);164 165 162 // merge the newly selected sources into the existing list 166 163 // NOTE: merge OLD and NEW 167 164 psphotMergeSources (config, view, STACK_SRC); 165 166 // Construct an initial model for each object, set the radius to fitRadius, set circular 167 // fit mask. NOTE: only applied to sources without guess models 168 psphotGuessModels (config, view, STACK_SRC); 168 169 169 170 // linear PSF fit to source peaks, subtract the models from the image (in PSF mask) … … 248 249 } 249 250 250 // create full input models, set the radius to fitRadius, set circular fit mask251 // NOTE: apply only to detections->newSources252 psphotGuessModels (config, view, STACK_SRC); // pass 2 (detections->newSources)253 254 251 // replace all sources so fit below applies to all at once 255 252 // NOTE: apply only to OLD sources (which have been subtracted) … … 260 257 // XXX check on free of sources... 261 258 psphotMergeSources (config, view, STACK_SRC); // (detections->newSources + detections->allSources -> detections->allSources) 259 260 // Construct an initial model for each object, set the radius to fitRadius, set circular 261 // fit mask. NOTE: only applied to sources without guess models 262 psphotGuessModels (config, view, STACK_SRC); 262 263 } 263 264 … … 269 270 objects = psphotMatchSources (config, view, STACK_SRC); 270 271 psMemDump("matchsources"); 272 273 // Construct an initial model for each object, set the radius to fitRadius, set circular 274 // fit mask. NOTE: only applied to sources without guess models 275 psphotGuessModels (config, view, STACK_SRC); 271 276 272 277 psphotStackObjectsUnifyPosition (objects);
Note:
See TracChangeset
for help on using the changeset viewer.
