IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 21, 2007, 12:01:32 PM (19 years ago)
Author:
magnier
Message:

adding functions to return valid pixel region for chip and fpa

File:
1 edited

Legend:

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

    r11124 r12520  
    44#include "pmFPA.h"
    55
     6// return cell pixels bounding the readout
    67psRegion *pmReadoutExtent(const pmReadout *readout)
    78{
     
    3031}
    3132
    32 
     33// return chip pixels bounding the cell (all readouts)
    3334psRegion *pmCellExtent(const pmCell *cell)
    3435{
     
    6970}
    7071
    71 
    72 psRegion *pmChipExtent(const pmChip *chip)
     72// return chip pixels included in all cells
     73psRegion *pmChipPixels(const pmChip *chip)
    7374{
    7475    PS_ASSERT_PTR_NON_NULL(chip, NULL);
    7576
    76     psArray *cells = chip->cells;       // Arrya of component cells
     77    psArray *cells = chip->cells;       // Array of component cells
    7778    psRegion *chipExtent = psRegionAlloc(INFINITY, 0, INFINITY, 0); // Extent of chip
    7879    for (long i = 0; i < cells->n; i++) {
     
    8586        psFree(cellExtent);
    8687    }
     88
     89    return chipExtent;
     90}
     91
     92// return pixels in basic FPA grid bounded by chip
     93// this FPA grid has 0,0 at the 0,0 corner of one chip, and is NOT the same
     94// as the astrometry focal plane coordinate system
     95psRegion *pmChipExtent(const pmChip *chip)
     96{
     97    PS_ASSERT_PTR_NON_NULL(chip, NULL);
     98
     99    psRegion *chipExtent = pmChipPixels(chip);
     100    if (!chipExtent) return NULL;
    87101
    88102    bool mdok;                          // Status of MD lookup
     
    108122}
    109123
    110 
    111 psRegion *pmFPAExtent(const pmFPA *fpa)
     124// return FPA pixels included in all chips
     125// this FPA grid has 0,0 at the 0,0 corner of one chip, and is NOT the same
     126// as the astrometry focal plane coordinate system
     127psRegion *pmFPAPixels(const pmFPA *fpa)
    112128{
    113129    PS_ASSERT_PTR_NON_NULL(fpa, NULL);
    114130
    115     psArray *chips = fpa->chips;       // Arrya of component chips
     131    psArray *chips = fpa->chips;       // Array of component chips
    116132    psRegion *fpaExtent = psRegionAlloc(INFINITY, 0, INFINITY, 0); // Extent of fpa
    117133    for (long i = 0; i < chips->n; i++) {
Note: See TracChangeset for help on using the changeset viewer.