Changeset 10438
- Timestamp:
- Dec 4, 2006, 11:45:54 AM (20 years ago)
- Location:
- trunk/psastro/src
- Files:
-
- 11 edited
-
psastro.h (modified) (1 diff)
-
psastroArguments.c (modified) (3 diffs)
-
psastroAstromGuess.c (modified) (1 diff)
-
psastroChipAstrom.c (modified) (1 diff)
-
psastroChooseRefstars.c (modified) (1 diff)
-
psastroDataLoad.c (modified) (1 diff)
-
psastroDataSave.c (modified) (1 diff)
-
psastroLoadRefstars.c (modified) (1 diff)
-
psastroMosaicAstrom.c (modified) (1 diff)
-
psastroMosaicHeaders.c (modified) (1 diff)
-
psastroParseCamera.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastro.h
r10292 r10438 11 11 12 12 # include "psastroErrorCodes.h" 13 #define PSASTRO_RECIPE "PSASTRO" // Name of the recipe to use 13 14 14 15 # define psMemCopy(A)(psMemIncrRefCounter((A))) -
trunk/psastro/src/psastroArguments.c
r9627 r10438 15 15 psLogSetFormat ("M"); 16 16 17 // these other options override the PSASTRO recipe options 18 psMetadata *options = psMetadataAlloc (); 17 // load config data from default locations 18 pmConfig *config = pmConfigRead(&argc, argv, PSASTRO_RECIPE); 19 if (config == NULL) { 20 psError(PSASTRO_ERR_CONFIG, false, "Can't read site configuration"); 21 return NULL; 22 } 23 24 // save the following additional recipe values based on command-line options 25 // these options override the PSPHOT recipe values loaded from recipe files 26 psMetadata *options = pmConfigRecipeOptions (config, PSASTRO_RECIPE); 19 27 20 28 // photcode : used in output to supplement header data (argument or recipe?) … … 24 32 psArgumentRemove (N, &argc, argv); 25 33 } 26 27 // load config data from default locations28 pmConfig *config = pmConfigRead(&argc, argv);29 if (config == NULL) {30 psError(PSASTRO_ERR_CONFIG, false, "Can't read site configuration");31 return NULL;32 }33 34 // save these recipe options until we have loaded the options35 psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PSASTRO.OPTIONS", PS_DATA_METADATA, "", options);36 psFree (options);37 34 38 35 // chip selection is used to limit chips to be processed … … 49 46 psArgumentRemove (N, &argc, argv); 50 47 } 48 49 // drop the local view on the options (saved in config->arguments) 50 psFree (options); 51 51 52 52 status = pmConfigFileSetsMD (config->arguments, config, "INPUT", "-file", "-list"); -
trunk/psastro/src/psastroAstromGuess.c
r9641 r10438 28 28 29 29 // select the current recipe 30 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");30 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE); 31 31 if (!recipe) { 32 32 psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!"); -
trunk/psastro/src/psastroChipAstrom.c
r9644 r10438 9 9 10 10 // select the current recipe 11 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");11 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE); 12 12 if (!recipe) { 13 13 psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe"); -
trunk/psastro/src/psastroChooseRefstars.c
r9732 r10438 9 9 10 10 // select the current recipe 11 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");11 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE); 12 12 if (!recipe) { 13 13 psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!\n"); -
trunk/psastro/src/psastroDataLoad.c
r9574 r10438 13 13 14 14 // select the current recipe 15 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");15 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE); 16 16 if (!recipe) { 17 17 psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!\n"); -
trunk/psastro/src/psastroDataSave.c
r9574 r10438 10 10 11 11 // select the current recipe 12 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");12 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE); 13 13 if (!recipe) { 14 14 psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!\n"); -
trunk/psastro/src/psastroLoadRefstars.c
r9732 r10438 13 13 14 14 // select the current recipe 15 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");15 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE); 16 16 17 17 // DVO APIs expect decimal degrees -
trunk/psastro/src/psastroMosaicAstrom.c
r9646 r10438 7 7 8 8 // select the current recipe 9 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");9 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE); 10 10 if (!recipe) { 11 11 psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!\n"); -
trunk/psastro/src/psastroMosaicHeaders.c
r9574 r10438 7 7 8 8 // select the current recipe 9 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");9 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE); 10 10 if (!recipe) { 11 11 psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!\n"); -
trunk/psastro/src/psastroParseCamera.c
r9574 r10438 13 13 14 14 // select recipe options supplied on command line 15 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, "PSASTRO"); 16 psMetadata *options = psMetadataLookupPtr (&status, config->arguments, "PSASTRO.OPTIONS"); 17 psMetadataCopy (recipe, options); 15 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSASTRO_RECIPE); 18 16 19 17 // set default recipe values here
Note:
See TracChangeset
for help on using the changeset viewer.
