Changeset 7002
- Timestamp:
- Apr 28, 2006, 5:02:32 PM (20 years ago)
- Location:
- trunk/ppMerge/src
- Files:
-
- 2 edited
-
ppMergeCheckInputs.c (modified) (1 diff)
-
ppMergeConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeCheckInputs.c
r7000 r7002 15 15 for (int i = 0; i < filenames->n; i++) { 16 16 psString name = filenames->data[i]; // The name of the file 17 if (!name || strlen(name) == 0) { 18 continue; 19 } 17 20 psFits *inFile = psFitsOpen(filenames->data[i], "r"); // The FITS file to read 18 21 if (!inFile) { -
trunk/ppMerge/src/ppMergeConfig.c
r6998 r7002 40 40 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-onoff", 0, "Number of on/off pairs", 0); 41 41 42 // We require an input file set 43 bool status = pmConfigFileSetsMD(config->arguments, argc, argv, "INPUT", "-files", "-list"); 44 if (!status) { 45 usage(argv[0]); 46 } 47 48 // Parse other arguments 42 // Parse the arguments 49 43 if (! psArgumentParse(config->arguments, argc, argv) || *argc != 2) { 50 44 usage(argv[0]); 51 45 } 52 46 53 // Add the input and output images (which remain on the command-line)to the arguments list47 // Add the output image to the arguments list 54 48 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "Name of the output image", argv[1]); 55 49 56 // The input images are required. The first one defines the camera. 57 status = false; 58 pmFPAfileFromArgs(&status, config, "PPMERGE.INPUT", "INPUT"); 59 if (!status) { 60 usage(argv[0]); 50 // Everything remaining must be input files 51 if (*argc - 2 <= 1) { 52 psError(PS_ERR_IO, true, "No files to combine.\n"); 53 exit(EXIT_FAILURE); 61 54 } 62 55 psArray *files = psArrayAlloc(*argc - 2); 56 for (int i = 2; i < *argc; i++) { 57 files->data[i] = psStringCopy(argv[i]); 58 } 59 psMetadataAddPtr(config->arguments, PS_LIST_TAIL, "INPUT", PS_DATA_ARRAY, 60 "Array of inputs images", files); 63 61 64 62 #if 0
Note:
See TracChangeset
for help on using the changeset viewer.
