Changeset 13772
- Timestamp:
- Jun 12, 2007, 5:23:00 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPARead.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPARead.c
r13768 r13772 144 144 145 145 psRegion toRead = *fullImage; // full image region 146 146 147 147 int dX = 0; 148 148 int dY = 0; … … 153 153 toRead.y0 = PS_MAX (toRead.y0, min); 154 154 toRead.y1 = PS_MIN (toRead.y1, max); 155 nRead = toRead.y1 - toRead.y0;156 if (min < fullImage->y0) {157 dY = toRead.y0;158 }159 nX = toRead.x1 - toRead.x0;160 nY = nScans;155 nRead = toRead.y1 - toRead.y0; 156 if (min < fullImage->y0) { 157 dY = toRead.y0; 158 } 159 nX = toRead.x1 - toRead.x0; 160 nY = nScans; 161 161 } else { 162 162 toRead.x0 = PS_MAX (toRead.x0, min); 163 163 toRead.x1 = PS_MIN (toRead.x1, max); 164 nRead = toRead.x1 - toRead.x0;165 if (min < fullImage->x0) {166 dX = toRead.x0;167 }168 nX = nScans;169 nY = toRead.y1 - toRead.y0;164 nRead = toRead.x1 - toRead.x0; 165 if (min < fullImage->x0) { 166 dX = toRead.x0; 167 } 168 nX = nScans; 169 nY = toRead.y1 - toRead.y0; 170 170 } 171 171 … … 339 339 if (success) { 340 340 if (!pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_HEADER, true, true, NULL)) { 341 psError(PS_ERR_IO, false, "Failed to read concepts for FPA.\n");341 psError(PS_ERR_IO, false, "Failed to read concepts for chip.\n"); 342 342 return false; 343 343 } … … 405 405 pmHDU *hdu = pmHDUFromCell(cell); // The HDU 406 406 if (!hdu || hdu->blankPHU) { 407 // XXX is this an error condition?408 *status = true;407 // XXX is this an error condition? 408 *status = true; 409 409 return false; 410 410 } … … 453 453 if (naxis == 0) { 454 454 // No pixels to read, as for a PHU. 455 *status = true;455 *status = true; 456 456 return false; 457 457 } … … 471 471 if (z >= naxis3) { 472 472 // Nothing to see here. Move along. 473 *status = true;473 *status = true; 474 474 return false; 475 475 } … … 503 503 } 504 504 505 int offset; // start of the segment506 int upper; // end of the segment507 int lastScan; // last possible scan505 int offset; // start of the segment 506 int upper; // end of the segment 507 int lastScan; // last possible scan 508 508 509 509 // Calculate the segment offset and upper limit, adjust readout->row0,col0 510 510 if (readdir == 1) { 511 // Reading rows512 offset = (readout->image) ? readout->row0 + numScans : 0; // extend to next section or start at beginning?513 offset = (numScans == 0) ? trimsec->x0 : offset; // full array ? read full trimsec : read section514 readout->row0 = offset;515 readout->col0 = trimsec->x0;516 lastScan = trimsec->y1;511 // Reading rows 512 offset = (readout->image) ? readout->row0 + numScans : 0; // extend to next section or start at beginning? 513 offset = (numScans == 0) ? trimsec->x0 : offset; // full array ? read full trimsec : read section 514 readout->row0 = offset; 515 readout->col0 = trimsec->x0; 516 lastScan = trimsec->y1; 517 517 } else { 518 // Reading cols519 offset = (readout->image) ? readout->col0 + numScans : 0;520 offset = (numScans == 0) ? trimsec->y0 : offset; // full array ? read full trimsec : read section521 readout->col0 = offset;522 readout->row0 = trimsec->y0;523 lastScan = trimsec->x1;518 // Reading cols 519 offset = (readout->image) ? readout->col0 + numScans : 0; 520 offset = (numScans == 0) ? trimsec->y0 : offset; // full array ? read full trimsec : read section 521 readout->col0 = offset; 522 readout->row0 = trimsec->y0; 523 lastScan = trimsec->x1; 524 524 } 525 525 upper = offset + numScans; … … 537 537 // We've read everything there is 538 538 psTrace("psModules.camera", 7, "Read everything.\n"); 539 *status = true;539 *status = true; 540 540 return false; 541 541 }
Note:
See TracChangeset
for help on using the changeset viewer.
