Changeset 7519
- Timestamp:
- Jun 11, 2006, 11:07:09 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotArguments.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotArguments.c
r7344 r7519 12 12 } 13 13 14 // these other options override the PSPHOT recipe options 14 // load config data from default locations 15 pmConfig *config = pmConfigRead(argc, argv); 16 if (config == NULL) { 17 psError(PSPHOT_ERR_CONFIG, false, "Can't find site configuration"); 18 return NULL; 19 } 20 21 // Storage for other command-line arguments 22 config->arguments = psMetadataAlloc (); 23 24 // save the recipe options separately until we have loaded the recipe (psphotParseDetrend) 15 25 psMetadata *options = psMetadataAlloc (); 26 psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PSPHOT.OPTIONS", PS_DATA_METADATA, "", options); 27 28 // the following options override the PSPHOT recipe options 16 29 17 30 // run the test model (requires X,Y coordinate) … … 96 109 psArgumentRemove (N, argc, argv); 97 110 } 98 99 // load config data from default locations 100 pmConfig *config = pmConfigRead(argc, argv); 101 102 if (config == NULL) { 103 psError(PSPHOT_ERR_CONFIG, false, "pmConfigRead returns NULL"); 104 psFree(options); 105 return NULL; 106 } 107 108 // Storage for other command-line arguments 109 config->arguments = psMetadataAlloc (); 110 111 // save these recipe options until we have loaded the options 112 psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PSPHOT.OPTIONS", PS_DATA_METADATA, "", options); 111 112 // drop the local view on the options (saved on config->arguments) 113 113 psFree (options); 114 115 // chip selection is used to limit chips to be processed116 if ((N = psArgumentGet (*argc, argv, "-chip"))) {117 psArgumentRemove (N, argc, argv);118 psMetadataAddStr (config->arguments, PS_LIST_TAIL, "CHIP_SELECTION", PS_DATA_STRING, "", psStringCopy(argv[N]));119 psArgumentRemove (N, argc, argv);120 }121 114 122 115 // the input file is a required argument; if not found, we will exit … … 125 118 psError(PSPHOT_ERR_ARGUMENTS, false, "pmConfigFileSetsMD failed to parse arguments"); 126 119 return NULL; 120 } 121 122 // chip selection is used to limit chips to be processed 123 if ((N = psArgumentGet (*argc, argv, "-chip"))) { 124 psArgumentRemove (N, argc, argv); 125 psMetadataAddStr (config->arguments, PS_LIST_TAIL, "CHIP_SELECTIONS", PS_DATA_STRING, "", psStringCopy(argv[N])); 126 psArgumentRemove (N, argc, argv); 127 127 } 128 128
Note:
See TracChangeset
for help on using the changeset viewer.
