Changeset 18365 for trunk/ppMerge/src/ppMergeCamera.c
- Timestamp:
- Jun 29, 2008, 2:55:44 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppMerge/src/ppMergeCamera.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeCamera.c
r17929 r18365 30 30 return false; 31 31 } 32 33 // Chip selection: turn on only the chips specified. 34 bool status; 35 char *chipLine = psMetadataLookupStr(&status, config->arguments, "CHIP_SELECTIONS"); 36 psArray *chips = psStringSplitArray (chipLine, ",", false); 37 if (chips->n > 0) { 38 pmFPASelectChip (fpa, -1, true); // deselect all chips 39 for (int i = 0; i < chips->n; i++) { 40 int chipNum = atoi(chips->data[i]); 41 if (! pmFPASelectChip(fpa, chipNum, false)) { 42 psError(PS_ERR_IO, false, "Chip number %d doesn't exist in camera.\n", chipNum); 43 psFree (chips); 44 return false; 45 } 46 } 47 } 48 psFree (chips); 49 50 // Cell selection: turn on only the cells specified. Note that this affects the same cell 51 // for all chips 52 char *cellLine = psMetadataLookupStr(&status, config->arguments, "CELL_SELECTIONS"); 53 psArray *cells = psStringSplitArray (cellLine, ",", false); 54 if (cells->n > 0) { 55 for (int i = 0; i < fpa->chips->n; i++) { 56 pmChip *chip = fpa->chips->data[i]; 57 pmChipSelectCell (chip, -1, true); // deselect all cells 58 for (int j = 0; j < cells->n; j++) { 59 int cellNum = atoi(cells->data[j]); 60 if (! pmChipSelectCell(chip, cellNum, false)) { 61 psError(PS_ERR_IO, false, "Cell number %d doesn't exist in camera.\n", cellNum); 62 psFree (cells); 63 return false; 64 } 65 } 66 } 67 } 68 psFree (cells); 32 69 33 70 pmFPAfile *output = pmFPAfileDefineOutput(config, fpa, name); … … 229 266 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // HDU for cell 230 267 if (!hdu || hdu->blankPHU) { 231 psFree(cell->concepts);232 cell->concepts = NULL;233 268 cell->data_exists = false; 234 269 cell->file_exists = false; 235 270 culled++; 271 if (cell->concepts) { 272 psFree(cell->concepts); 273 cell->concepts = NULL; 274 } 236 275 } 237 276 } 238 277 if (culled == cells->n) { 239 psFree(chip->concepts);240 chip->concepts = NULL;241 278 chip->data_exists = false; 242 279 chip->file_exists = false; 280 if (chip->concepts) { 281 psFree(chip->concepts); 282 chip->concepts = NULL; 283 } 243 284 } 244 285 }
Note:
See TracChangeset
for help on using the changeset viewer.
