Changeset 10437
- Timestamp:
- Dec 4, 2006, 11:45:37 AM (19 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 5 edited
-
psphot.h (modified) (1 diff)
-
psphotArguments.c (modified) (3 diffs)
-
psphotImageMedian.c (modified) (1 diff)
-
psphotParseCamera.c (modified) (1 diff)
-
psphotReadout.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphot.h
r10425 r10437 10 10 11 11 # include "psphotErrorCodes.h" 12 #define PSPHOT_RECIPE "PSPHOT" // Name of the recipe to use 12 13 13 14 // top-level psphot functions -
trunk/psphot/src/psphotArguments.c
r10427 r10437 13 13 14 14 // load config data from default locations 15 pmConfig *config = pmConfigRead(&argc, argv, "PSPHOT");15 pmConfig *config = pmConfigRead(&argc, argv, PSPHOT_RECIPE); 16 16 if (config == NULL) { 17 17 psError(PSPHOT_ERR_CONFIG, false, "Can't read site configuration"); … … 21 21 // save the following additional recipe values based on command-line options 22 22 // these options override the PSPHOT recipe values loaded from recipe files 23 24 // if the recipe is already defined in config->arguments, supplement 25 // save the recipe options onto config->arguments:RECIPES 26 psMetadata *recipes = psMetadataLookupMetadata(NULL, config->arguments, "RECIPES"); 27 if (!recipes) { 28 recipes = psMetadataAlloc (); 29 psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "RECIPES", PS_DATA_METADATA, "", recipes); 30 } else { 31 psMemIncrRefCounter (recipes); // so we can free options below if not allocated here 32 } 33 // look for the recipe defined in recipes 34 psMetadata *options = psMetadataLookupMetadata(NULL, recipes, "PSPHOT"); 35 if (!options) { 36 options = psMetadataAlloc (); 37 psMetadataAddPtr (recipes, PS_LIST_TAIL, "PSPHOT", PS_DATA_METADATA, "", options); 38 } else { 39 psMemIncrRefCounter (options); // so we can free options below if not allocated here 40 } 23 psMetadata *options = pmConfigRecipeOptions (config, PSPHOT_RECIPE); 41 24 42 25 // run the test model (requires X,Y coordinate) … … 100 83 // drop the local view on the options (saved in config->arguments) 101 84 psFree (options); 102 psFree (recipes);103 85 104 86 // the input file is a required argument; if not found, we will exit -
trunk/psphot/src/psphotImageMedian.c
r10399 r10437 19 19 20 20 // select the appropriate recipe information 21 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, "PSPHOT");21 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 22 22 23 23 // user supplied seed, if available -
trunk/psphot/src/psphotParseCamera.c
r10427 r10437 14 14 15 15 // select recipe options supplied on command line 16 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, "PSPHOT");16 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 17 17 18 18 // set default recipe values here -
trunk/psphot/src/psphotReadout.c
r10393 r10437 4 4 5 5 // select the current recipe 6 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, "PSPHOT");6 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSPHOT_RECIPE); 7 7 8 8 // find the currently selected readout
Note:
See TracChangeset
for help on using the changeset viewer.
