Changeset 29936 for trunk/psphot/src/psphotReadoutKnownSources.c
- Timestamp:
- Dec 5, 2010, 9:42:25 PM (16 years ago)
- Location:
- trunk/psphot
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/psphotReadoutKnownSources.c (modified) (5 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/psphotReadoutKnownSources.c
r28013 r29936 3 3 // in this psphotReadout-variant, we are only measuring the photometry for known sources, using 4 4 // a PSF generated for this observation from those sources 5 bool psphotReadoutKnownSources(pmConfig *config, const pmFPAview *view, psArray *inSources) {5 bool psphotReadoutKnownSources(pmConfig *config, const pmFPAview *view, const char *filerule, psArray *inSources) { 6 6 7 7 psTimerStart ("psphotReadout"); 8 8 9 9 // set the photcode for this image 10 if (!psphotAddPhotcode(config, view, "PSPHOT.INPUT")) {10 if (!psphotAddPhotcode(config, view, filerule)) { 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, "PSPHOT.INPUT");16 psphotSetMaskAndVariance (config, view, filerule); 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, "PSPHOT.INPUT", inSources)) {22 if (!psphotDetectionsFromSources (config, view, filerule, inSources)) { 23 23 psError(PSPHOT_ERR_ARGUMENTS, true, "Can't find PSF stars"); 24 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");24 return psphotReadoutCleanup (config, view, filerule); 25 25 } 26 26 27 27 // construct sources and measure basic stats 28 if (!psphotSourceStats (config, view, "PSPHOT.INPUT", true)) {28 if (!psphotSourceStats (config, view, filerule, 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, "PSPHOT.INPUT")) {34 if (!psphotRepairLoadedSources(config, view, filerule)) { 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, "PSPHOT.INPUT")) {40 if (!psphotRoughClass (config, view, filerule)) { 41 41 psError (PSPHOT_ERR_UNKNOWN, false, "failed to determine rough source class"); 42 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");42 return psphotReadoutCleanup (config, view, filerule); 43 43 } 44 44 45 if (!psphotChoosePSF (config, view, "PSPHOT.INPUT")) {45 if (!psphotChoosePSF (config, view, filerule)) { 46 46 psError(PSPHOT_ERR_PSF, false, "Failed to construct a psf model"); 47 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");47 return psphotReadoutCleanup (config, view, filerule); 48 48 } 49 49 50 50 // construct an initial model for each object 51 psphotGuessModels (config, view, "PSPHOT.INPUT");51 psphotGuessModels (config, view, filerule); 52 52 53 53 // merge the newly selected sources into the existing list 54 54 // NOTE: merge OLD and NEW 55 psphotMergeSources (config, view, "PSPHOT.INPUT");55 psphotMergeSources (config, view, filerule); 56 56 57 57 // linear PSF fit to source peaks 58 psphotFitSourcesLinear (config, view, "PSPHOT.INPUT", false);58 psphotFitSourcesLinear (config, view, filerule, false); 59 59 60 60 // measure aperture photometry corrections 61 if (!psphotApResid (config, view, "PSPHOT.INPUT")) {61 if (!psphotApResid (config, view, filerule)) { 62 62 psLogMsg ("psphot", 3, "failed on psphotApResid"); 63 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");63 return psphotReadoutCleanup (config, view, filerule); 64 64 } 65 65 66 66 // calculate source magnitudes 67 psphotMagnitudes(config, view, "PSPHOT.INPUT");67 psphotMagnitudes(config, view, filerule); 68 68 69 69 // drop the references to the image pixels held by each source 70 psphotSourceFreePixels (config, view, "PSPHOT.INPUT");70 psphotSourceFreePixels (config, view, filerule); 71 71 72 72 // create the exported-metadata and free local data 73 return psphotReadoutCleanup (config, view, "PSPHOT.INPUT");73 return psphotReadoutCleanup (config, view, filerule); 74 74 }
Note:
See TracChangeset
for help on using the changeset viewer.
