IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 10, 2008, 2:02:51 PM (17 years ago)
Author:
eugene
Message:

pmCellExtent was not respecting the parity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAExtent.c

    r19388 r20635  
    9292    }
    9393
    94     cellExtent->x0 += x0;
    95     cellExtent->x1 += x0;
    96     cellExtent->y0 += y0;
    97     cellExtent->y1 += y0;
     94    int xParityCell = psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY");
     95    int yParityCell = psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY");
     96
     97    // CELL.X0,Y0 are the coordinate of the amp on the chip, subtract size if parity flipped
     98    if (xParityCell > 0) {
     99        cellExtent->x0 += x0;
     100        cellExtent->x1 += x0;
     101    } else {
     102        float x0Cell = x0 - cellExtent->x1;
     103        float x1Cell = x0 - cellExtent->x0;
     104        cellExtent->x0 = x0Cell;
     105        cellExtent->x1 = x1Cell;
     106    }
     107    if (yParityCell > 0) {
     108        cellExtent->y0 += y0;
     109        cellExtent->y1 += y0;
     110    } else {
     111        float y0Cell = y0 - cellExtent->y1;
     112        float y1Cell = y0 - cellExtent->y0;
     113        cellExtent->y0 = y0Cell;
     114        cellExtent->y1 = y1Cell;
     115    }
    98116
    99117    return cellExtent;
Note: See TracChangeset for help on using the changeset viewer.