IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12520


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

Location:
trunk/psModules/src/camera
Files:
3 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++) {
  • trunk/psModules/src/camera/pmFPAExtent.h

    r11253 r12520  
    33 * @author Paul Price, IfA
    44 *
    5  * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    6  * @date $Date: 2007-01-24 02:54:14 $
     5 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     6 * @date $Date: 2007-03-21 22:01:32 $
    77 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    88 */
     
    2626                      );
    2727
     28// return chip pixels included in all cells
     29psRegion *pmChipPixels(const pmChip *chip);
     30
    2831/// Return the extent of a chip
    2932///
     
    3134psRegion *pmChipExtent(const pmChip *chip ///< The chip of interest
    3235                      );
     36
     37// return FPA pixels included in all chips
     38// this FPA grid has 0,0 at the 0,0 corner of one chip, and is NOT the same
     39// as the astrometry focal plane coordinate system
     40psRegion *pmFPAPixels(const pmFPA *fpa);
    3341
    3442/// Return the extent of an FPA
  • trunk/psModules/src/camera/pmFPAfileDefine.c

    r12455 r12520  
    332332    // adjust the rules to identify these files in the file->names data
    333333    psFree (file->filerule);
    334     // XXX DROP ME: psFree (file->filesrc);
    335334    file->filerule = psStringCopy ("@FILES");
    336335    file->filesrc = psStringCopy ("{CHIP.NAME}.{CELL.NAME}");
Note: See TracChangeset for help on using the changeset viewer.