Changeset 15476
- Timestamp:
- Nov 6, 2007, 12:21:51 PM (19 years ago)
- Location:
- trunk/ppMerge/src
- Files:
-
- 2 edited
-
ppMerge.c (modified) (1 diff)
-
ppMergeOptions.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMerge.c
r13873 r15476 35 35 // Construct camera in preparation for reading 36 36 pmConfig *config = ppMergeConfig(argc, argv); 37 if (!config) { 38 psErrorStackPrint(stderr, "Unable to get configuration."); 39 exit(EXIT_FAILURE); 40 } 37 41 38 42 // Set various tasks (define optional operations) 39 43 ppMergeOptions *options = ppMergeOptionsParse(config); 44 if (!options) { 45 psErrorStackPrint(stderr, "Unable to parse options."); 46 exit(EXIT_FAILURE); 47 } 40 48 41 49 // Check the inputs 42 50 ppMergeData *data = ppMergeCheckInputs(options, config); 43 51 if (!data) { 44 psError (PS_ERR_IO, false, "Not enough valid input files.\n");52 psErrorStackPrint(stderr, "Not enough valid input files."); 45 53 exit(EXIT_FAILURE); 46 54 } -
trunk/ppMerge/src/ppMergeOptions.c
r14356 r15476 215 215 options->shutter = true; 216 216 options->mask = false; 217 } else if (strcasecmp(type, "MASK") == 0) { 217 } else if (strcasecmp(type, "MASK") == 0 || 218 strcasecmp(type, "DARKMASK") == 0 || 219 strcasecmp(type, "FLATMASK") == 0) { 218 220 options->zero = false; 219 221 options->scale = false; … … 223 225 options->mask = true; 224 226 } else { 225 psLogMsg(__func__, PS_LOG_WARN, "Unrecognised image type: %s --- assuming BIAS.\n", type); 226 options->zero = false; 227 options->scale = false; 228 options->darktime = false; 229 options->fringe = false; 230 options->shutter = false; 231 options->mask = false; 227 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised image type: %s", type); 228 psFree(options); 229 return NULL; 232 230 } 233 231 } else { 234 psLogMsg(__func__, PS_LOG_WARN, "No calibration type specified; assuming BIAS.\n"); 235 options->zero = false; 236 options->scale = false; 237 options->darktime = false; 238 options->fringe = false; 239 options->shutter = false; 240 options->mask = false; 232 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "No image type specified."); 233 psFree(options); 234 return NULL; 241 235 } 242 236
Note:
See TracChangeset
for help on using the changeset viewer.
