- Timestamp:
- May 10, 2010, 5:24:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/psphot.20100506/src/psphotReadoutKnownSources.c
r26894 r27909 8 8 9 9 // set the photcode for this image 10 if (!psphotAddPhotcode(config, view )) {10 if (!psphotAddPhotcode(config, view, "PSPHOT.INPUT")) { 11 11 psError(PSPHOT_ERR_CONFIG, false, "trouble defining the photcode"); 12 12 return false; … … 14 14 15 15 // Generate the mask and weight images, including the user-defined analysis region of interest 16 psphotSetMaskAndVariance (config, view );16 psphotSetMaskAndVariance (config, view, "PSPHOT.INPUT"); 17 17 18 18 // Note that in this implementation, we do NOT model the background and we do not … … 20 20 21 21 // include externally-supplied sources (supplied as PSPHOT.INPUT.CMF) 22 if (!psphotDetectionsFromSources (config, view, inSources)) {22 if (!psphotDetectionsFromSources (config, view, "PSPHOT.INPUT", inSources)) { 23 23 psError(PSPHOT_ERR_ARGUMENTS, true, "Can't find PSF stars"); 24 return psphotReadoutCleanup (config, view);24 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT"); 25 25 } 26 26 27 27 // construct sources and measure basic stats 28 if (!psphotSourceStats (config, view, true)) {28 if (!psphotSourceStats (config, view, "PSPHOT.INPUT", true)) { 29 29 psError(PSPHOT_ERR_UNKNOWN, false, "failure to generate sources"); 30 30 return false; … … 32 32 33 33 // peak flux is wrong : use the peak measured in the moments analysis: 34 if (!psphotRepairLoadedSources(config, view )) {34 if (!psphotRepairLoadedSources(config, view, "PSPHOT.INPUT")) { 35 35 psError(PSPHOT_ERR_UNKNOWN, false, "failure to repair sources"); 36 36 return false; … … 38 38 39 39 // classify sources based on moments, brightness (psf is not known) 40 if (!psphotRoughClass (config, view )) {40 if (!psphotRoughClass (config, view, "PSPHOT.INPUT")) { 41 41 psError (PSPHOT_ERR_UNKNOWN, false, "failed to determine rough source class"); 42 return psphotReadoutCleanup (config, view);42 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT"); 43 43 } 44 44 45 if (!psphotChoosePSF (config, view )) {45 if (!psphotChoosePSF (config, view, "PSPHOT.INPUT")) { 46 46 psError(PSPHOT_ERR_PSF, false, "Failed to construct a psf model"); 47 return psphotReadoutCleanup (config, view);47 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT"); 48 48 } 49 49 50 50 // construct an initial model for each object 51 psphotGuessModels (config, view );51 psphotGuessModels (config, view, "PSPHOT.INPUT"); 52 52 53 53 // merge the newly selected sources into the existing list 54 54 // NOTE: merge OLD and NEW 55 psphotMergeSources (config, view );55 psphotMergeSources (config, view, "PSPHOT.INPUT"); 56 56 57 57 // linear PSF fit to source peaks 58 psphotFitSourcesLinear (config, view, false);58 psphotFitSourcesLinear (config, view, "PSPHOT.INPUT", false); 59 59 60 60 // measure aperture photometry corrections 61 if (!psphotApResid (config, view )) {61 if (!psphotApResid (config, view, "PSPHOT.INPUT")) { 62 62 psLogMsg ("psphot", 3, "failed on psphotApResid"); 63 return psphotReadoutCleanup (config, view);63 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT"); 64 64 } 65 65 66 66 // calculate source magnitudes 67 psphotMagnitudes(config, view );67 psphotMagnitudes(config, view, "PSPHOT.INPUT"); 68 68 69 69 // drop the references to the image pixels held by each source 70 psphotSourceFreePixels (config, view );70 psphotSourceFreePixels (config, view, "PSPHOT.INPUT"); 71 71 72 72 // create the exported-metadata and free local data 73 return psphotReadoutCleanup (config, view);73 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT"); 74 74 }
Note:
See TracChangeset
for help on using the changeset viewer.
