IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 28, 2009, 2:33:51 PM (17 years ago)
Author:
Paul Price
Message:

Changing pmReadout.weight to variance. Adding pmReadout.covariance which will carry around a covariance pseudo-matrix, allowing us to calculate the pixel-to-pixel variance. pmReadout.covariance now exists and is set, but no mechanism yet to read/write, or use it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_20090128/psModules/src/camera/pmFPAExtent.c

    r20635 r21211  
    1616    }
    1717    if (!image) {
    18         image = readout->weight;
     18        image = readout->variance;
    1919    }
    2020
     
    2323
    2424    if (!image) {
    25         pmHDU *hdu = pmHDUFromReadout (readout);
    26         if (hdu && hdu->header) {
    27             bool status;
    28             xSize = psMetadataLookupS32(&status, hdu->header, "NAXIS1");
    29             if (!status) {
    30                 xSize = psMetadataLookupS32(&status, hdu->header, "IMNAXIS1");
    31                 if (!status) return NULL;
    32             }           
    33             ySize = psMetadataLookupS32(&status, hdu->header, "NAXIS2");
    34             if (!status) {
    35                 ySize = psMetadataLookupS32(&status, hdu->header, "IMNAXIS2");
    36                 if (!status) return NULL;
    37             }           
    38         } else {
     25        pmHDU *hdu = pmHDUFromReadout (readout);
     26        if (hdu && hdu->header) {
     27            bool status;
     28            xSize = psMetadataLookupS32(&status, hdu->header, "NAXIS1");
     29            if (!status) {
     30                xSize = psMetadataLookupS32(&status, hdu->header, "IMNAXIS1");
     31                if (!status) return NULL;
     32            }
     33            ySize = psMetadataLookupS32(&status, hdu->header, "NAXIS2");
     34            if (!status) {
     35                ySize = psMetadataLookupS32(&status, hdu->header, "IMNAXIS2");
     36                if (!status) return NULL;
     37            }
     38        } else {
    3939        // Don't have anything to base the true extent on, so have to give the hardwired value (largest possible extent)
    40             xSize = psMetadataLookupS32(NULL, readout->parent->concepts, "CELL.XSIZE");
    41             ySize = psMetadataLookupS32(NULL, readout->parent->concepts, "CELL.YSIZE");
    42         }
     40            xSize = psMetadataLookupS32(NULL, readout->parent->concepts, "CELL.XSIZE");
     41            ySize = psMetadataLookupS32(NULL, readout->parent->concepts, "CELL.YSIZE");
     42        }
    4343        return psRegionAlloc(0, xSize, 0, ySize);
    4444    }
     
    7070    // Don't have anything to base the true extent on, so have to give the hardwired value (largest possible extent)
    7171    if (readouts->n == 0) {
    72         int xSize = psMetadataLookupS32(NULL, cell->concepts, "CELL.XSIZE");
    73         int ySize = psMetadataLookupS32(NULL, cell->concepts, "CELL.YSIZE");
    74         cellExtent->x0 = 0;
    75         cellExtent->x1 = xSize;
    76         cellExtent->y0 = 0;
    77         cellExtent->y1 = ySize;
     72        int xSize = psMetadataLookupS32(NULL, cell->concepts, "CELL.XSIZE");
     73        int ySize = psMetadataLookupS32(NULL, cell->concepts, "CELL.YSIZE");
     74        cellExtent->x0 = 0;
     75        cellExtent->x1 = xSize;
     76        cellExtent->y0 = 0;
     77        cellExtent->y1 = ySize;
    7878    }
    7979
     
    9797    // CELL.X0,Y0 are the coordinate of the amp on the chip, subtract size if parity flipped
    9898    if (xParityCell > 0) {
    99         cellExtent->x0 += x0;
    100         cellExtent->x1 += x0;
     99        cellExtent->x0 += x0;
     100        cellExtent->x1 += x0;
    101101    } else {
    102         float x0Cell = x0 - cellExtent->x1;
    103         float x1Cell = x0 - cellExtent->x0;
    104         cellExtent->x0 = x0Cell;
    105         cellExtent->x1 = x1Cell;
     102        float x0Cell = x0 - cellExtent->x1;
     103        float x1Cell = x0 - cellExtent->x0;
     104        cellExtent->x0 = x0Cell;
     105        cellExtent->x1 = x1Cell;
    106106    }
    107107    if (yParityCell > 0) {
    108         cellExtent->y0 += y0;
    109         cellExtent->y1 += y0;
     108        cellExtent->y0 += y0;
     109        cellExtent->y1 += y0;
    110110    } else {
    111         float y0Cell = y0 - cellExtent->y1;
    112         float y1Cell = y0 - cellExtent->y0;
    113         cellExtent->y0 = y0Cell;
    114         cellExtent->y1 = y1Cell;
     111        float y0Cell = y0 - cellExtent->y1;
     112        float y1Cell = y0 - cellExtent->y0;
     113        cellExtent->y0 = y0Cell;
     114        cellExtent->y1 = y1Cell;
    115115    }
    116116
Note: See TracChangeset for help on using the changeset viewer.