Changeset 7888
- Timestamp:
- Jul 12, 2006, 4:22:29 PM (20 years ago)
- Location:
- trunk/ppFringe/src
- Files:
-
- 3 edited
-
ppFringeData.c (modified) (3 diffs)
-
ppFringeData.h (modified) (2 diffs)
-
ppFringeSetup.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppFringe/src/ppFringeData.c
r7839 r7888 18 18 data->outFile = NULL; 19 19 } 20 if (data->templateFile) {21 psFitsClose(data->templateFile);22 data->templateFile = NULL;23 }24 20 return; 25 21 } … … 33 29 data->inName = NULL; 34 30 data->outName = NULL; 35 data->templateName = NULL;36 31 data->numPoints = 0; 37 32 data->xWidth = 0; … … 43 38 data->inFile = NULL; 44 39 data->outFile = NULL; 45 data->templateFile = NULL;46 40 data->inFPA = NULL; 47 41 -
trunk/ppFringe/src/ppFringeData.h
r7826 r7888 9 9 const char *inName; // Input FITS image file 10 10 const char *outName; // Output FITS table file 11 const char *templateName; // Name of template output file12 11 int numPoints; // Number of fringe points 13 12 int xWidth, yWidth; // Width of fringe points in x and y … … 17 16 psFits *inFile; // Input file handle 18 17 psFits *outFile; // Output file handle 19 psFits *templateFile; // Template file handle20 18 pmFPA *inFPA; // Input FPA 21 19 } ppFringeData; -
trunk/ppFringe/src/ppFringeSetup.c
r7837 r7888 24 24 { 25 25 // Setup and parse command-line arguments 26 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-template", 0, "Template output", NULL);27 26 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-detid", 0, "Detrend identifier", NULL); 28 27 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-classid", 0, "Class identifier", NULL); … … 40 39 data->inName = config->argv[1]; 41 40 data->outName = config->argv[2]; 42 data->templateName = psMetadataLookupStr(NULL, config->arguments, "-template");43 41 44 42 // Open the input file, determine the camera … … 69 67 goto die; 70 68 } 69 psFree(view); 71 70 72 71 // Now we have a camera format, we can read the recipe … … 96 95 READ_RECIPE_ITEM("MASKVAL", recipe, data->maskVal, U8); 97 96 98 // Open the output and templatefile99 data->outFile = psFitsOpen(data->outName, " w");97 // Open the output file 98 data->outFile = psFitsOpen(data->outName, "a+"); 100 99 if (!data->outFile) { 101 100 psError(PS_ERR_IO, false, "Unable to open output file %s\n", data->outName); 102 101 goto die; 103 }104 105 if (data->templateName && strlen(data->templateName) > 0) {106 data->templateFile = psFitsOpen(data->templateName, "r");107 if (!data->templateFile) {108 psError(PS_ERR_IO, false, "Unable to open template file %s\n", data->templateName);109 goto die;110 }111 102 } 112 103
Note:
See TracChangeset
for help on using the changeset viewer.
