Changeset 28013 for trunk/psphot/src/psphotReadoutMinimal.c
- Timestamp:
- May 18, 2010, 4:11:53 PM (16 years ago)
- Location:
- trunk/psphot
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/psphotReadoutMinimal.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
-
Property svn:mergeinfo
set to
/branches/eam_branches/psphot.20100506 merged eligible
-
Property svn:mergeinfo
set to
-
trunk/psphot/src/psphotReadoutMinimal.c
r26894 r28013 18 18 19 19 // set the photcode for this image 20 if (!psphotAddPhotcode(config, view )) {20 if (!psphotAddPhotcode(config, view, "PSPHOT.INPUT")) { 21 21 psError(PSPHOT_ERR_CONFIG, false, "trouble defining the photcode"); 22 22 return false; … … 24 24 25 25 // Generate the mask and weight images, including the user-defined analysis region of interest 26 psphotSetMaskAndVariance (config, view );26 psphotSetMaskAndVariance (config, view, "PSPHOT.INPUT"); 27 27 28 28 // load the psf model, if suppled. FWHM_X,FWHM_Y,etc are saved on readout->analysis 29 29 if (!psphotLoadPSF (config, view)) { 30 30 psError (PSPHOT_ERR_CONFIG, false, "missing psf model"); 31 return psphotReadoutCleanup (config, view );31 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT"); 32 32 } 33 33 34 34 // find the detections (by peak and/or footprint) in the image. (final pass) 35 if (!psphotFindDetections(config, view, false)) {35 if (!psphotFindDetections(config, view, "PSPHOT.INPUT", false)) { 36 36 psError (PSPHOT_ERR_UNKNOWN, false, "failure in peak analysis"); 37 return psphotReadoutCleanup (config, view );37 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT"); 38 38 } 39 39 40 40 // construct sources and measure basic stats (saved on detections->newSources) 41 if (!psphotSourceStats (config, view, false)) { // pass 141 if (!psphotSourceStats (config, view, "PSPHOT.INPUT", false)) { // pass 1 42 42 psError(PSPHOT_ERR_UNKNOWN, false, "failure to generate sources"); 43 return psphotReadoutCleanup (config, view );43 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT"); 44 44 } 45 45 46 46 // find blended neighbors of very saturated stars 47 psphotDeblendSatstars (config, view );47 psphotDeblendSatstars (config, view, "PSPHOT.INPUT"); 48 48 49 49 // mark blended peaks PS_SOURCE_BLEND 50 if (!psphotBasicDeblend (config, view )) {50 if (!psphotBasicDeblend (config, view, "PSPHOT.INPUT")) { 51 51 psLogMsg ("psphot", 3, "failed on deblend analysis"); 52 return psphotReadoutCleanup (config, view );52 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT"); 53 53 } 54 54 55 55 // classify sources based on moments, brightness (use supplied psf shape parameters) 56 if (!psphotRoughClass (config, view )) {56 if (!psphotRoughClass (config, view, "PSPHOT.INPUT")) { 57 57 psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image"); 58 return psphotReadoutCleanup (config, view );58 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT"); 59 59 } 60 60 61 61 // construct an initial model for each object 62 psphotGuessModels (config, view );62 psphotGuessModels (config, view, "PSPHOT.INPUT"); 63 63 64 64 // merge the newly selected sources into the existing list 65 psphotMergeSources (config, view );65 psphotMergeSources (config, view, "PSPHOT.INPUT"); 66 66 67 67 // linear PSF fit to source peaks 68 psphotFitSourcesLinear (config, view, false);68 psphotFitSourcesLinear (config, view, "PSPHOT.INPUT", false); 69 69 70 70 // XXX eventually, add the extended source fits here 71 71 # if (0) 72 72 // measure source size for the remaining sources 73 psphotSourceSize (config, view );73 psphotSourceSize (config, view, "PSPHOT.INPUT"); 74 74 75 psphotExtendedSourceAnalysis (config, view );75 psphotExtendedSourceAnalysis (config, view, "PSPHOT.INPUT"); 76 76 77 psphotExtendedSourceFits (config, view );77 psphotExtendedSourceFits (config, view, "PSPHOT.INPUT"); 78 78 # endif 79 79 80 80 // calculate source magnitudes 81 psphotMagnitudes(config, view );81 psphotMagnitudes(config, view, "PSPHOT.INPUT"); 82 82 83 83 // XXX ensure this is measured if the analysis succeeds (even if quality is low) 84 if (!psphotEfficiency(config, view )) {84 if (!psphotEfficiency(config, view, "PSPHOT.INPUT")) { 85 85 psErrorStackPrint(stderr, "Unable to determine detection efficiencies from fake sources"); 86 86 psErrorClear(); … … 88 88 89 89 // drop the references to the image pixels held by each source 90 psphotSourceFreePixels (config, view );90 psphotSourceFreePixels (config, view, "PSPHOT.INPUT"); 91 91 92 92 // create the exported-metadata and free local data 93 return psphotReadoutCleanup (config, view);93 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT"); 94 94 }
Note:
See TracChangeset
for help on using the changeset viewer.
