Changeset 6080 for branches/eam_rel9_p0/psModules/src/astrom/pmFPARead.c
- Timestamp:
- Jan 19, 2006, 11:47:06 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_rel9_p0/psModules/src/astrom/pmFPARead.c
r6077 r6080 1 1 #include <stdio.h> 2 2 #include <strings.h> 3 #include <assert.h> 3 4 #include "pslib.h" 4 5 … … 105 106 { 106 107 psArray *images = hdu->images; // Array of images (each of which is a readout) 107 psArray *masks = hdu->masks; // Array of masks (one for each readout) 108 109 psRegion *trimsec = psMetadataLookupPtr(NULL, cell->concepts, "CELL.TRIMSEC"); 110 psList *biassecs = psMetadataLookupPtr(NULL, cell->concepts, "CELL.BIASSEC"); 111 108 112 // Iterate over each of the image planes 109 113 for (int i = 0; i < images->n; i++) { 110 114 psImage *image = images->data[i]; // The i-th plane 111 psImage *mask = NULL; // The mask112 if (masks) {113 mask = masks->data[i];114 }115 116 115 pmReadout *readout = pmReadoutAlloc(cell); 117 readout->image = image; 118 readout->mask = mask; 119 psFree(readout); 116 117 readout->image = psImageSubset(image, *trimsec); // The image corresponding to the trim region 118 119 // Get the list of overscans 120 psListIterator *iter = psListIteratorAlloc(biassecs, PS_LIST_HEAD, false); // Iterator 121 psRegion *biassec = NULL; // A BIASSEC region from the list 122 while ((biassec = psListGetAndIncrement(iter))) { 123 psImage *overscan = psImageSubset(image, *biassec); 124 psListAdd(readout->bias, PS_LIST_TAIL, overscan); 125 psFree(overscan); 126 } 127 psFree(iter); 128 129 readout->mask = NULL; 130 readout->weight = NULL; 131 132 psFree(readout); // Drop reference 120 133 } 121 134 … … 164 177 pmChip *chip = chips->data[i]; // The chip 165 178 166 // Only read chips marked to " process"167 if (! chip->process ) {179 // Only read chips marked to "read" 180 if (! chip->process || chip->exists) { 168 181 psTrace(__func__, 2, "Ignoring chip %d...\n", i); 169 182 continue; … … 187 200 pmCell *cell = cells->data[j]; // The cell 188 201 189 // Only read cells marked to " process"190 if (! cell->process ) {202 // Only read cells marked to "read" 203 if (! cell->process || cell->exists) { 191 204 psTrace(__func__, 3, "Ignoring chip %d...\n", i); 192 205 continue; … … 400 413 for (int chipNum = 0; chipNum < chips->n; chipNum++) { 401 414 pmChip *chip = chips->data[chipNum]; // The current chip of interest 402 if (chip->process ) {415 if (chip->process && !chip->exists) { 403 416 if (chip->hdu) { 404 417 hdu = chip->hdu; … … 407 420 for (int cellNum = 0; cellNum < cells->n; cellNum++) { 408 421 pmCell *cell = cells->data[cellNum]; // The current cell of interest 409 if (cell->process ) {422 if (cell->process && !cell->exists) { 410 423 if (cell->hdu) { 411 424 hdu = cell->hdu; … … 538 551 for (int chipNum = 0; chipNum < chips->n; chipNum++) { 539 552 pmChip *chip = chips->data[chipNum]; // The current chip of interest 540 if (chip->process ) {553 if (chip->process && !chip->exists) { 541 554 if (chip->hdu) { 542 555 hdu = chip->hdu; … … 545 558 for (int cellNum = 0; cellNum < cells->n; cellNum++) { 546 559 pmCell *cell = cells->data[cellNum]; // The current cell of interest 547 if (cell->process ) {560 if (cell->process && !cell->exists) { 548 561 if (cell->hdu) { 549 562 hdu = cell->hdu;
Note:
See TracChangeset
for help on using the changeset viewer.
