Changeset 11230
- Timestamp:
- Jan 21, 2007, 3:13:53 PM (19 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 4 edited
-
psphot.h (modified) (1 diff)
-
psphotMergeSources.c (modified) (1 diff)
-
psphotParseCamera.c (modified) (1 diff)
-
psphotReadout.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphot.h
r11201 r11230 98 98 bool psphotFitSummary (); 99 99 bool psphotMergeSources (psArray *oldSources, psArray *newSources); 100 101 bool psphotSaveExtSources (pmReadout *readout); 102 bool psphotLoadExtSources (pmReadout *readout, psArray *sources); 100 bool psphotLoadExtSources (pmConfig *config, pmFPAview *view, psArray *sources); -
trunk/psphot/src/psphotMergeSources.c
r11201 r11230 11 11 } 12 12 13 // XXX this is something of a hack: external sources are loaded with the same functions used to14 // read and write the sources. These use the readout->analysis entry PSPHOT.SOURCES. at the15 // beginning of psphotReadout, we need to rename any such entry for later use by16 // psphotLoadExtSources below17 18 bool psphotSaveExtSources (pmReadout *readout) {19 20 psArray *sources = psMetadataLookupPtr (NULL, readout->analysis, "PSPHOT.SOURCES");21 if (!sources) return true;22 23 psLogMsg ("psphot", 3, "%ld external sources loaded, saved for later use", sources->n);24 psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.EXTSRC", PS_DATA_ARRAY, "external sources", sources);25 26 psMetadataRemoveKey (readout->analysis, "PSPHOT.SOURCES");27 28 return true;29 }30 31 13 // merge the externally supplied sources with the existing sources. mark them as having 32 14 // mode PM_SOURCE_MODE_EXTERNAL 33 bool psphotLoadExtSources (pm Readout *readout, psArray *sources) {15 bool psphotLoadExtSources (pmConfig *config, pmFPAview *view, psArray *sources) { 34 16 35 psArray *extSources = psMetadataLookupPtr (NULL, readout->analysis, "PSPHOT.EXTSRC"); 36 if (!extSources) return true; 17 // find the currently selected readout 18 pmReadout *readout = pmFPAfileThisReadout (config->files, view, "INPUT.SRC"); 19 if (!readout) { 20 psLogMsg ("psphot", 3, "no external sources supplied"); 21 return true; 22 } 23 24 psArray *extSources = psMetadataLookupPtr (NULL, readout->analysis, "PSPHOT.SOURCES"); 25 if (!extSources) { 26 psLogMsg ("psphot", 3, "no external sources for this readout"); 27 return true; 28 } 37 29 38 30 for (int i = 0; i < extSources->n; i++) { -
trunk/psphot/src/psphotParseCamera.c
r11201 r11230 23 23 // optionally load the PSF Model and/or fixed stars 24 24 pmFPAfileBindFromArgs (NULL, input, config, "INPUT.PSF", "PSF"); 25 pmFPAfile *srcInput = pmFPAfile BindFromArgs (NULL, input, config, "INPUT.SRC", "SRC");25 pmFPAfile *srcInput = pmFPAfileDefineFromArgs (NULL, config, "INPUT.SRC", "SRC"); 26 26 if (!srcInput) { 27 27 fprintf (stderr, "!"); -
trunk/psphot/src/psphotReadout.c
r11201 r11230 8 8 // find the currently selected readout 9 9 pmReadout *readout = pmFPAfileThisReadout (config->files, view, "PSPHOT.INPUT"); 10 psphotSaveExtSources (readout);11 10 12 11 // optional break-point for processing … … 81 80 82 81 // include externally-supplied sources 83 psphotLoadExtSources ( readout, sources);82 psphotLoadExtSources (config, view, sources); 84 83 85 84 // construct an initial model for each object
Note:
See TracChangeset
for help on using the changeset viewer.
