Changeset 5862 for trunk/ppMerge/src/ppMergeParseCamera.c
- Timestamp:
- Dec 30, 2005, 6:32:45 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/ppMerge/src/ppMergeParseCamera.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeParseCamera.c
r5860 r5862 38 38 ppFPA *fpa = ppFPA_Alloc (); 39 39 fpa->filename = psStringCopy (globList.gl_pathv[i]); 40 psArrayAdd (input, 100, fpa); 40 41 } 41 psArrayAdd (input, 100, fpa);42 42 } 43 43 … … 56 56 } 57 57 while (fgets (line, 1024, f) != NULL) { 58 nItems = fscanf (f, "%s %lf %lf", filename, &zero, &scale);59 fpa = ppFPA_Alloc ();58 nItems = sscanf (line, "%s %lf %lf", filename, &zero, &scale); 59 ppFPA *fpa = ppFPA_Alloc (); 60 60 switch (nItems) { 61 61 case 0: … … 65 65 fpa->zero = zero; 66 66 fpa->scale = scale; 67 // NOTE: continues to case 1 below 67 fpa->filename = psStringCopy (filename); 68 psArrayAdd (input, 100, fpa); 69 break; 68 70 case 1: 69 71 fpa->filename = psStringCopy (filename); … … 85 87 86 88 // Open the input images, test that they are the same camera 87 psLogMsg(" phase2", PS_LOG_INFO, "Opening input images\n");89 psLogMsg("merge", PS_LOG_INFO, "Opening input images\n"); 88 90 for (int i = 0; i < input->n; i++) { 89 91 90 92 ppFPA *fpa = input->data[i]; 93 94 psLogMsg("merge", PS_LOG_INFO, "Trying %s...\n", fpa->filename); 91 95 92 96 fpa->fits = psFitsOpen(fpa->filename, "r"); // File handle for FITS file … … 130 134 131 135 // data->process acts as a process mask for the full FPA 132 data->process = pmFPAConstruct(config->camera); 136 data->process = ppFPA_Alloc (); 137 data->process->fpa = pmFPAConstruct(config->camera); 133 138 134 139 // see if we have selected a specific chip … … 144 149 // data->mask carries a pixel mask for pixels to be ignored 145 150 // the name and contents of the mask are determined in ppMergeOptions 146 data->mask = pmFPAConstruct(config->camera); 151 data->mask = ppFPA_Alloc (); 152 data->mask->fpa = pmFPAConstruct(config->camera); 153 154 // data->output will store the output file 155 // currently, we keep the complete output file and write it at the end 156 data->output = ppFPA_Alloc (); 157 data->output->fpa = pmFPAConstruct(config->camera); 158 data->output->filename = psMetadataLookupPtr (NULL, config->arguments, "-output"); 159 if (! *data->output->filename) { 160 psAbort ("merge", "output file not specified"); 161 } 147 162 148 163 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
