Changeset 9599 for trunk/psModules/src/camera/pmFPARead.c
- Timestamp:
- Oct 16, 2006, 5:00:30 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPARead.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPARead.c
r9584 r9599 16 16 17 17 #include "pmFPARead.h" 18 19 #define MAX(x,y) ((x) > (y) ? (x) : (y))20 #define MIN(x,y) ((x) < (y) ? (x) : (y))21 18 22 19 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// … … 45 42 return false; 46 43 } 47 psRegion region = psRegionSet( MAX(trimsec->x0 - readout->col0, 0), // x048 MIN(trimsec->x1 - readout->col0, image->numCols), // x149 MAX(trimsec->y0 - readout->row0, 0), // y050 MIN(trimsec->y1 - readout->row0, image->numRows) // y144 psRegion region = psRegionSet(PS_MAX(trimsec->x0 - readout->col0, 0), // x0 45 PS_MIN(trimsec->x1 - readout->col0, image->numCols), // x1 46 PS_MAX(trimsec->y0 - readout->row0, 0), // y0 47 PS_MIN(trimsec->y1 - readout->row0, image->numRows) // y1 51 48 ); 52 49 if (readout->image) { … … 71 68 return false; 72 69 } 73 psRegion region = psRegionSet( MAX(biassec->x0 - readout->col0, 0), // x074 MIN(biassec->x1 - readout->col0, image->numCols), // x175 MAX(biassec->y0 - readout->row0, 0), // y076 MIN(biassec->y1 - readout->row0, image->numRows) // y170 psRegion region = psRegionSet(PS_MAX(biassec->x0 - readout->col0, 0), // x0 71 PS_MIN(biassec->x1 - readout->col0, image->numCols), // x1 72 PS_MAX(biassec->y0 - readout->row0, 0), // y0 73 PS_MIN(biassec->y1 - readout->row0, image->numRows) // y1 77 74 ); 78 75 psImage *overscan = psMemIncrRefCounter(psImageSubset(image, region)); … … 162 159 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 163 160 164 // Read the next readout; return true if we read pixels in. 165 // 166 // Note that this doesn't put pixels in the HDU. It is therefore NOT COMPATIBLE with pmCellWrite, 167 // pmChipWrite, and pmFPAWrite (or any function that uses or creates an HDU for that matter). 168 // Use pmReadoutWriteNext to write the data that's read by this function. 169 bool pmReadoutReadNext(pmReadout *readout, // Readout into which to read 170 psFits *fits, // FITS file from which to read 171 int z, // Readout number/plane; zero-offset indexing 172 int numScans // The number of scans to read 173 ) 161 bool pmReadoutReadNext(pmReadout *readout, psFits *fits, int z, int numScans) 174 162 { 175 163 PS_ASSERT_PTR_NON_NULL(readout, false); … … 284 272 // Blow away existing data. 285 273 // Do this before returning, so that we're not returning data from a previous read 286 #if 1287 274 psFree(readout->image); 288 275 readout->image = NULL; 289 #endif290 276 291 277 while (readout->bias->n > 0) { … … 321 307 322 308 323 // Read in the cell, and allocate the readouts 324 bool pmCellRead(pmCell *cell, // Cell to read into 325 psFits *fits, // FITS file from which to read 326 psDB *db // Database handle, for "concepts" ingest 327 ) 309 bool pmCellRead(pmCell *cell, psFits *fits, psDB *db) 328 310 { 329 311 PS_ASSERT_PTR_NON_NULL(cell, false); … … 383 365 } 384 366 385 // Read in the component cells 386 bool pmChipRead(pmChip *chip, // Chip to read into 387 psFits *fits, // FITS file from which to read 388 psDB *db // Database handle, for "concepts" ingest 389 ) 367 bool pmChipRead(pmChip *chip, psFits *fits, psDB *db) 390 368 { 391 369 PS_ASSERT_PTR_NON_NULL(chip, false); … … 410 388 } 411 389 412 // Read in the component chips 413 bool pmFPARead(pmFPA *fpa, // FPA to read into 414 psFits *fits, // FITS file from which to read 415 psDB *db // Database handle, for "concepts" ingest 416 ) 390 bool pmFPARead(pmFPA *fpa, psFits *fits, psDB *db) 417 391 { 418 392 PS_ASSERT_PTR_NON_NULL(fpa, false); … … 442 416 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 443 417 444 // Read the mask into the cell, and allocate the readouts 445 bool pmCellReadMask(pmCell *cell, // Cell to read into 446 psFits *fits, // FITS file from which to read 447 psDB *db // Database handle, for "concepts" ingest 448 ) 418 bool pmCellReadMask(pmCell *cell, psFits *fits, psDB *db) 449 419 { 450 420 PS_ASSERT_PTR_NON_NULL(cell, false); … … 497 467 } 498 468 499 // Read the mask into the component cells 500 bool pmChipReadMask(pmChip *chip, // Chip to read into 501 psFits *fits, // FITS file from which to read 502 psDB *db // Database handle, for "concepts" ingest 503 ) 469 bool pmChipReadMask(pmChip *chip, psFits *fits, psDB *db) 504 470 { 505 471 PS_ASSERT_PTR_NON_NULL(chip, false); … … 524 490 } 525 491 526 // Read the mask into the component chips 527 bool pmFPAReadMask(pmFPA *fpa, // FPA to read into 528 psFits *fits, // FITS file from which to read 529 psDB *db // Database handle, for "concepts" ingest 530 ) 492 bool pmFPAReadMask(pmFPA *fpa, psFits *fits, psDB *db) 531 493 { 532 494 PS_ASSERT_PTR_NON_NULL(fpa, false); … … 555 517 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 556 518 557 // Read the weight map into the cell, and allocate the readouts 558 bool pmCellReadWeight(pmCell *cell, // Cell to read into 559 psFits *fits, // FITS file from which to read 560 psDB *db // Database handle, for "concepts" ingest 561 ) 519 bool pmCellReadWeight(pmCell *cell, psFits *fits, psDB *db) 562 520 { 563 521 PS_ASSERT_PTR_NON_NULL(cell, false); … … 610 568 } 611 569 612 // Read the weight map into the component cells 613 bool pmChipReadWeight(pmChip *chip, // Chip to read into 614 psFits *fits, // FITS file from which to read 615 psDB *db // Database handle, for "concepts" ingest 616 ) 570 bool pmChipReadWeight(pmChip *chip, psFits *fits, psDB *db) 617 571 { 618 572 PS_ASSERT_PTR_NON_NULL(chip, false); … … 637 591 } 638 592 639 // Read the weight map into the component chips 640 bool pmFPAReadWeight(pmFPA *fpa, // FPA to read into 641 psFits *fits, // FITS file from which to read 642 psDB *db // Database handle, for "concepts" ingest 643 ) 593 bool pmFPAReadWeight(pmFPA *fpa, psFits *fits, psDB *db) 644 594 { 645 595 PS_ASSERT_PTR_NON_NULL(fpa, false);
Note:
See TracChangeset
for help on using the changeset viewer.
