Changeset 7260 for trunk/ppMerge/src/ppMergeCheckInputs.c
- Timestamp:
- Jun 1, 2006, 10:16:15 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppMerge/src/ppMergeCheckInputs.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeCheckInputs.c
r7073 r7260 27 27 psArray *filenames = psMetadataLookupPtr(NULL, config->arguments, "INPUT"); // The input file names 28 28 assert(filenames); 29 if (!data->in) { 30 data->in = psArrayAlloc(filenames->n); 31 data->in->n = filenames->n; 32 } 29 33 int numGood = 0; // Number of good files 30 34 for (int i = 0; i < filenames->n; i++) { … … 33 37 continue; 34 38 } 39 psTrace(__func__, 1, "Checking input file %s....\n", name); 35 40 psFits *inFile = psFitsOpen(filenames->data[i], "r"); // The FITS file to read 36 41 if (!inFile) { … … 42 47 } 43 48 psMetadata *header = psFitsReadHeader(NULL, inFile); // The FITS (primary) header 49 if (psTraceGetLevel(__func__) > 9) { 50 psTrace(__func__, 9, "Primary header:\n"); 51 psMetadataPrint(header, 9); 52 } 44 53 psFitsClose(inFile); 45 54 … … 74 83 // Use the first valid input as the basis for the output --- including the header 75 84 if (!data->out) { 85 psTrace(__func__, 5, "Constructing output using %s as a template.\n", name); 76 86 data->out = pmFPAConstruct(config->camera); 77 87 pmFPAview *view = pmFPAAddSourceFromHeader(data->out, header, options->format); 78 88 psFree(view); 89 #if 0 90 pmFPACopyStructure(data->out, data->in->data[i], 1, 1); 91 #endif 79 92 } 80 93 94 psTrace(__func__, 3, "%s checks out.\n", name); 81 95 numGood++; 82 96 } … … 99 113 } 100 114 data->numCells = numCells; 115 psTrace(__func__, 3, "Output has %d cells.\n", numCells); 101 116 117 psTrace(__func__, 3, "We have %d good inputs.\n", numGood); 102 118 if (numGood > 1) { 103 119 return data;
Note:
See TracChangeset
for help on using the changeset viewer.
