Changeset 21249
- Timestamp:
- Feb 1, 2009, 11:47:31 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotReadoutFindPSF.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotReadoutFindPSF.c
r21177 r21249 3 3 // in this psphotReadout-variant, we are only trying to determine the PSF given an existing set 4 4 // of input source positions to use as initial PSF stars. 5 bool psphotReadoutFindPSF(pmConfig *config, const pmFPAview *view ) {5 bool psphotReadoutFindPSF(pmConfig *config, const pmFPAview *view, psArray *inSources) { 6 6 7 // measure the total elapsed time in psphotReadout. XXX the current threading plan8 // for psphot envisions threading within psphotReadout, not multiple threads calling9 // the same psphotReadout. In the current plan, this dtime is the elapsed time used10 // jointly by the multiple threads, not the total time used by all threads.11 7 psTimerStart ("psphotReadout"); 12 8 … … 28 24 psphotVisualShowImage (readout); 29 25 30 // include externally-supplied sources 31 // XXX this requires sources to be supplied as PSPHOT.INPUT.CMF 32 pmDetections *detections = psphotLoadPSFSources (config, view); 26 // Note that in this implementation, we do NOT model the background and we do not 27 // attempt to detect the sources in the image 28 29 // include externally-supplied sources (supplied as PSPHOT.INPUT.CMF) 30 pmDetections *detections = psphotDetectionsFromSources (config, inSources); 33 31 if (!detections || !detections->peaks) { 34 32 psError(PSPHOT_ERR_ARGUMENTS, true, "Can't find PSF stars"); … … 40 38 if (!sources) return false; 41 39 42 // mark all sources as PSFSTAR 40 // peak flux is wrong : set based on previous image 41 // use the peak measured in the moments analysis: 43 42 for (int i = 0; i < sources->n; i++) { 44 43 pmSource *source = sources->data[i]; 45 source-> type = PM_SOURCE_TYPE_STAR;46 source->mode |= PM_SOURCE_MODE_PSFSTAR;44 source->peak->flux = source->moments->Peak; 45 } 47 46 48 // peak flux is wrong : set based on previous image 49 // use the peak measured in the moments analysis: 50 source->peak->flux = source->moments->Peak; 47 // classify sources based on moments, brightness (psf is not known) 48 if (!psphotRoughClass (readout, sources, recipe, false)) { 49 psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image"); 50 return psphotReadoutCleanup (config, readout, recipe, detections, NULL, sources); 51 51 } 52 52
Note:
See TracChangeset
for help on using the changeset viewer.
