Changeset 13499 for trunk/psModules/src/camera/pmFPAExtent.c
- Timestamp:
- May 23, 2007, 6:01:33 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAExtent.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAExtent.c
r12710 r13499 10 10 PS_ASSERT_PTR_NON_NULL(readout, NULL); 11 11 12 if (readout->image) {13 return psRegionAlloc(readout->col0, readout->image->numCols,14 readout->row0, readout->image->numRows);12 psImage *image = readout->image; // Image from which to get dimensions 13 if (!image) { 14 image = readout->mask; 15 15 } 16 pmCell *cell = readout->parent; // The parent cell 17 if (!cell) { 18 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to determine size of readout.\n"); 19 return NULL; 20 } 21 bool mdok; // Status of MD lookup 22 psRegion *trimsec = psMetadataLookupPtr(&mdok, cell->concepts, "CELL.TRIMSEC"); // Trim section 23 if (!mdok || !trimsec) { 24 psError(PS_ERR_UNKNOWN, true, "Unable to find CELL.TRIMSEC.\n"); 25 return NULL; 16 if (!image) { 17 image = readout->weight; 26 18 } 27 19 28 // XXX: Binning?29 // XXX this is not setting the right value for megacam spliced chip30 trimsec->x0 = 0;31 trimsec->y0 = 0;32 trimsec->x1 = 2112;33 trimsec->y1 = 4644;20 if (!image) { 21 // Don't have anything to base the true extent on, so have to give the largest possible extent 22 int xSize = psMetadataLookupS32(NULL, readout->parent->concepts, "CELL.XSIZE"); 23 int ySize = psMetadataLookupS32(NULL, readout->parent->concepts, "CELL.YSIZE"); 24 return psRegionAlloc(0, xSize, 0, ySize); 25 } 34 26 35 return psRegionAlloc(readout->col0, trimsec->x1 - trimsec->x0, 36 readout->row0, trimsec->y1 - trimsec->y0); 27 // Get the offset to the CCD window 28 int xWindow = psMetadataLookupS32(NULL, readout->parent->concepts, "CELL.XWINDOW"); 29 int yWindow = psMetadataLookupS32(NULL, readout->parent->concepts, "CELL.YWINDOW"); 30 return psRegionAlloc(xWindow, xWindow + image->numCols, 31 yWindow, yWindow + image->numRows); 37 32 } 38 33
Note:
See TracChangeset
for help on using the changeset viewer.
