Changeset 29936 for trunk/psphot/src/psphotReadoutMinimal.c
- Timestamp:
- Dec 5, 2010, 9:42:25 PM (16 years ago)
- Location:
- trunk/psphot
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/psphotReadoutMinimal.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20101103/psphot (added) merged: 29660,29824-29825,29904,29914,29918,29920
- Property svn:mergeinfo changed
-
trunk/psphot/src/psphotReadoutMinimal.c
r28013 r29936 7 7 // NOTE: ppSub needs to perform extended source analysis for comets and trails. 8 8 9 bool psphotReadoutMinimal(pmConfig *config, const pmFPAview *view ) {9 bool psphotReadoutMinimal(pmConfig *config, const pmFPAview *view, const char *filerule) { 10 10 11 11 // measure the total elapsed time in psphotReadout. XXX the current threading plan … … 18 18 19 19 // set the photcode for this image 20 if (!psphotAddPhotcode(config, view, "PSPHOT.INPUT")) {20 if (!psphotAddPhotcode(config, view, filerule)) { 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, "PSPHOT.INPUT");26 psphotSetMaskAndVariance (config, view, filerule); 27 27 28 28 // load the psf model, if suppled. FWHM_X,FWHM_Y,etc are saved on readout->analysis 29 if (!psphotLoadPSF (config, view )) {29 if (!psphotLoadPSF (config, view, filerule)) { 30 30 psError (PSPHOT_ERR_CONFIG, false, "missing psf model"); 31 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");31 return psphotReadoutCleanup (config, view, filerule); 32 32 } 33 33 34 34 // find the detections (by peak and/or footprint) in the image. (final pass) 35 if (!psphotFindDetections(config, view, "PSPHOT.INPUT", false)) {35 if (!psphotFindDetections(config, view, filerule, false)) { 36 36 psError (PSPHOT_ERR_UNKNOWN, false, "failure in peak analysis"); 37 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");37 return psphotReadoutCleanup (config, view, filerule); 38 38 } 39 39 40 40 // construct sources and measure basic stats (saved on detections->newSources) 41 if (!psphotSourceStats (config, view, "PSPHOT.INPUT", false)) { // pass 141 if (!psphotSourceStats (config, view, filerule, false)) { // pass 1 42 42 psError(PSPHOT_ERR_UNKNOWN, false, "failure to generate sources"); 43 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");43 return psphotReadoutCleanup (config, view, filerule); 44 44 } 45 45 46 46 // find blended neighbors of very saturated stars 47 psphotDeblendSatstars (config, view, "PSPHOT.INPUT");47 psphotDeblendSatstars (config, view, filerule); 48 48 49 49 // mark blended peaks PS_SOURCE_BLEND 50 if (!psphotBasicDeblend (config, view, "PSPHOT.INPUT")) {50 if (!psphotBasicDeblend (config, view, filerule)) { 51 51 psLogMsg ("psphot", 3, "failed on deblend analysis"); 52 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");52 return psphotReadoutCleanup (config, view, filerule); 53 53 } 54 54 55 55 // classify sources based on moments, brightness (use supplied psf shape parameters) 56 if (!psphotRoughClass (config, view, "PSPHOT.INPUT")) {56 if (!psphotRoughClass (config, view, filerule)) { 57 57 psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image"); 58 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");58 return psphotReadoutCleanup (config, view, filerule); 59 59 } 60 60 61 61 // construct an initial model for each object 62 psphotGuessModels (config, view, "PSPHOT.INPUT");62 psphotGuessModels (config, view, filerule); 63 63 64 64 // merge the newly selected sources into the existing list 65 psphotMergeSources (config, view, "PSPHOT.INPUT");65 psphotMergeSources (config, view, filerule); 66 66 67 67 // linear PSF fit to source peaks 68 psphotFitSourcesLinear (config, view, "PSPHOT.INPUT", false);68 psphotFitSourcesLinear (config, view, filerule, 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, "PSPHOT.INPUT");73 psphotSourceSize (config, view, filerule); 74 74 75 psphotExtendedSourceAnalysis (config, view, "PSPHOT.INPUT");75 psphotExtendedSourceAnalysis (config, view, filerule); 76 76 77 psphotExtendedSourceFits (config, view, "PSPHOT.INPUT");77 psphotExtendedSourceFits (config, view, filerule); 78 78 # endif 79 79 80 80 // calculate source magnitudes 81 psphotMagnitudes(config, view, "PSPHOT.INPUT");81 psphotMagnitudes(config, view, filerule); 82 82 83 83 // XXX ensure this is measured if the analysis succeeds (even if quality is low) 84 if (!psphotEfficiency(config, view, "PSPHOT.INPUT")) {84 if (!psphotEfficiency(config, view, filerule)) { 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, "PSPHOT.INPUT");90 psphotSourceFreePixels (config, view, filerule); 91 91 92 92 // create the exported-metadata and free local data 93 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");93 return psphotReadoutCleanup (config, view, filerule); 94 94 }
Note:
See TracChangeset
for help on using the changeset viewer.
