IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 17, 2004, 5:33:48 PM (22 years ago)
Author:
eugene
Message:

cleaned up structures to compile successfully

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psAstrom.h

    r251 r253  
    77 */
    88
    9 /** Astrometric solution for an OTA.
     9/* Astrometric transformations for a focal plane array.
    1010 * There are five coordinate frames that we need to worry about:
    11  * 1. Cell frame:    x,y in pixels (raw coordinates; lower-left pixel center is 0.5,0.5 TBR)
    12  * 2. Chip frame:    X,Y in pixels
    13  * 3. FPA frame:     P,Q in microns
     11 * 1. Cell:          x,y in pixels (raw coordinates; lower-left pixel center is 0.5,0.5 TBR)
     12 * 2. Chip:          X,Y in pixels
     13 * 3. FPA:           P,Q in microns
    1414 * 4. Tangent plane: L,M in arcsec (TBR - angles or linear?) from the telescope boresight.
    1515 * 5. Sky frame:     R,D in degrees (TBR - radians?)
    1616 *
    17  * 1 <--> 2: cell.coords : a 2-D linear transformation : rotation, scaling, offset, (skew)
    18  * 2 <--> 3: chip.coords : a 2-D cubic (max) transform : specifies how the chips are mounted on the focal plane.
    19  * 3 <--> 4: fpa.distort : a 2-D quartic (?) transform : specifies the distortions in the optics
    20  * 4 <--> 5: fpa.SLpars  : SLALib parameters generated based on the telescope, ra, dec, time, etc from exposure info
     17 * 1 <--> 2: 2 2-D polynomials: (X,Y) = f(x,y)
     18 * 2 <--> 3: 2 2-D polynomials: (P.Q) = f(X,Y)
     19 * 3 <--> 4: 2 4-D polynomials: (L,M) = f(P,Q,m,c) (m & c are magnitude and color of object)
     20 * 4 <--> 5: SLALib transformation using exposure parameters (psExposure or psGrommit)
    2121 */
    2222
     
    6767    int nChips;                         ///< Number of Cells assigned
    6868    int nAlloc;                         ///< Number of Cells available
    69     psChip *chips;                      ///< Chips in the Focal Plane Array
    70     psMetaData *md;                     ///< FPA-level metadata
    71     psDistort *TPtoFP;                  ///< Transformation term from
    72     psDistort *FPtoTP;                  ///< Transformation term from
     69    struct psChip *chips;               ///< Chips in the Focal Plane Array
     70
     71    psMetaDataSet *md;                  ///< FPA-level metadata
     72    psDistortion *TPtoFP;               ///< Transformation term from
     73    psDistortion *FPtoTP;               ///< Transformation term from
    7374    psExposure *exp;                    ///< information about this exposure
    7475    psMatrix *dx, *dy;                  //!< Focal Plane fixed pattern residual offsets
     
    8384typedef struct {
    8485    int nCells;                         ///< Number of Cells assigned
    85     psCell *cells;                      ///< Cells in the Chip
    86     psMetaData *md;                     ///< Chip-level metadata
    87 
     86    struct psCell *cells;               ///< Cells in the Chip
     87
     88    psMetaDataSet *md;                  ///< Chip-level metadata
    8889    psCoordXform *chipToFPA;            ///< Transformations from chip coordinates to FPA coordinates
    8990    psCoordXform *FPAtoChip;            ///< Transformations from chip coordinates to FPA coordinates
    9091
    91     psFPA *parentFPA;                   ///< FPA which contains this chip
     92    struct psFPA *parentFPA;            ///< FPA which contains this chip
    9293} psChip;
    9394
     
    9596 */
    9697typedef struct {
    97     psObjectTable *objects;             ///< objects derived from cell
     98    int nImage;                         ///< number of images in this cell realization
    9899    psImage *image;                     ///< imaging area of cell
     100    psDlist *objects;                   ///< objects derived from cell
    99101    psImage *overscan;                  ///< bias region (subimage) of cell
    100     psMetaData *md;                     ///< Cell-level metadata
     102    psMetaDataSet *md;                  ///< Cell-level metadata
    101103
    102104    psCoordXform *cellToChip;           ///< Transformations from cell coordinates to chip coordinates
    103105    psCoordXform *cellToFPA;            ///< Transformations from cell coordinates to FPA coordinates
    104106
    105     psChip  *parentChip;                ///< chip which contains this cell
     107    struct psChip  *parentChip;         ///< chip which contains this cell
    106108} psCell;
    107109
     
    112114/* Calculating and applying astrometric solutions */
    113115
    114 /** returns Cell in Chip which contains the given point */
    115 int
     116/** returns Chip in FPA which contains the given FPA coordinate */
     117psChip *
     118psChipInFPA (psFPA *fpa,                ///< FPA description
     119             psCoord *coord             ///< coordinate in FPA
     120             );
     121
     122/** returns Cell in Chip which contains the given chip coordinate */
     123psCell *
    116124psCellInChip (psChip *chip,             ///< chip description
    117               psCoords *coords          ///< coordinate to find
     125              psCoord *coord            ///< coordinate in chip
    118126              );
    119127
    120 /** returns the Cell coords for the specified Cell corresponding to the given Chip coords */
    121 psCoords
    122 psChipCoordsOnCell (psCell *cell,       ///< source cell for coordinate
    123                     psCoords *coords    ///< coordinate of interest
    124                     );
    125 
    126 /** returns the Cell coords for the specified Cell corresponding to the given Chip coords */
    127 psCoords
    128 psCellCoordsInChip (psChip *chip,       ///<
    129                     int cell,           ///<
    130                     psCoords *coords    ///<
    131                     );
    132 
    133 /** returns Chip in FPA which contains the given point */
    134 int
    135 psChipInFPA (psFPA *fpa,                ///<
    136              psCoords *coords           ///<
    137              );
    138 
    139 /** returns the Chip coords for the specified Chip corresponding to the given FPA coords */
    140 psCoords
    141 psFPACoordsOnChip (psChip *chip,        ///<
    142                    psCoords *coords     ///<
     128/** Convert (RA,Dec) to tangent plane coords */
     129psCoord *
     130psCoordSkyToTP(psExposure *exp,         //!< Exposure description
     131               psCoord *coord           //!< input Sky coordinate
     132               );
     133
     134/** Convert tangent plane coords to focal plane coordinates */
     135psCoord *
     136psCoordTPtoFPA(psFPA *fpa,              //!< FPA description
     137               psCoord *coord           //!< input TP coordinate
     138               );
     139
     140/** converts the specified FPA coord to the coord on the given Chip */
     141psCoord *
     142psCoordFPAtoChip (psFPA *fpa,           ///< FPA description
     143                  psChip *chip,         ///< Chip of interest
     144                  psCoord *coord        ///< input FPA coordinate
     145                  );
     146
     147/** converts the specified Chip coord to the coord on the given Cell */
     148psCoord *
     149psCoordChiptoCell (psChip *chip,        ///< Chip description
     150                   psCell *cell,        ///< Cell of interest
     151                   psCoord *coord       ///< input Chip coordinate
    143152                   );
    144153
    145 /** returns the Chip coords for the specified Chip corresponding to the given FPA coords */
    146 psCoords
    147 psChipCoordsInFPA (psFPA *fpa,          ///<
    148                    int chip,            ///<
    149                    psCoords *coords     ///<
     154/** converts the specified Cell coord to the coord on the parent Chip */
     155psCoord *
     156psCoordCelltoChip (psCell *cell,        ///< Cell description
     157                   psCoord *coord       ///< input Cell coordinate
    150158                   );
    151159
    152 /** Convert (RA,Dec) to (cell#,x,y) */
    153 psCoords *
    154 psSkyToFPA(psFPA *fpa,                  //!< OTA details
    155            psCoords *coords             //!< Position on the sky
    156            );
    157 
    158 /** Convert (cell#,x,y) to (RA,Dec) */
    159 psCoords *
    160 psFPAToSky(psFPA *fpa,                  //!< OTA details
    161            psCoords *coords             //!< Position on the sky
    162            );
    163 
    164 /** Convert (RA,Dec) to (cell#,x,y) */
    165 psCoords *
    166 psSkyToTP(psExposure *exp,              //!< OTA details
    167           psCoords *coords              //!< Position on the sky
    168           );
    169 
    170 /** Convert (RA,Dec) to (cell#,x,y) */
    171 psCoords *
    172 psTPtoSky(psExposure *exp,              //!< OTA details
    173           psCoords *coords              //!< Position on the sky
    174           );
     160/** converts the specified Chip coord to the coord on the parent FPA */
     161psCoord *
     162psCoordChiptoFPA (psChip *chip,         ///< Chip description
     163                  psCoord *coord        ///< input Chip coordinate
     164                  );
     165
     166/** Convert focal plane coords to tangent plane coordinates */
     167psCoord *
     168psCoordFPAToTP(psFPA *fpa,                      //!< FPA description
     169               psCoord *coord           //!< input FPA coordinate
     170               );
     171
     172/** Convert tangent plane coords to (RA,Dec) */
     173psCoord *
     174psCoordTPtoSky(psExposure *exp,         //!< Exposure description
     175               psCoord *coord           //!< input TP coordinate
     176               );
    175177
    176178/** Get the airmass for a given position and sidereal time */
    177179float
    178 psGetAirmass(psCoords *coords,          //!< Position on the sky
     180psGetAirmass(psCoord *coord,            //!< Position on the sky
    179181             double siderealTime        //!< Sidereal time
    180182             );
     
    182184/** Get the parallactic angle for a given position and sidereal time */
    183185float
    184 psGetParallactic(psCoords *coords,      //!< Position on the sky
     186psGetParallactic(psCoord *coord,        //!< Position on the sky
    185187                 double siderealTime    //!< Sidereal time
    186188                 );
     
    189191float
    190192psGetRefraction(float colour,           //!< Colour of object
    191                 psColourRef colourRef,  //!< Colour reference
     193                psPhotSystem colorPlus, //
     194                psPhotSystem colorMinus, ///< Colour reference
    192195                psExposure *exp         //!< Telescope pointing information, for airmass, temp and pressure
    193196                );
    194 
    195 /** Fit astrometric solution to list of (chip#,x,y) and (RA,Dec) */
    196 int
    197 psFitAstrom(psOTADescription *restrict ota, //!< Initial guess for coefficients
    198             const psOTAPosArray *restrict detector, //!< Positions on OTA (chip#,x,y)
    199             const psSkyPosArray *restrict sky, //!< Positions on the sky (RA,Dec)
    200             const psExposure *exp       //!< Telescope pointing information, for airmass, parallactic angle
    201                                         //!< which may help set the astrometric solution
    202             );
    203197
    204198/*** Constructors / Destructors ******************************************************/
     
    223217psExposureFree(psExposure *restrict myExp //!< Object to destroy
    224218               );
    225 
    226219#endif
     220
     221/*
     222   example images:
     223
     224   GPC:          1 Chip per file, 1 Cell per extension
     225   Megacam:      1 FPA per file, 1 Chip per extension, 2 Cell per extension (DSEC)
     226   CFH12K (MEF): 1 FPA per file, 1 Chip per extension, 1 Cell per extension
     227   CFHT-IR:      1 FPA per file, 1 Chip per extension, 4 Cell per extension (NAXIS = 3)
     228   WIRCAM:       1 FPA per file, 1 Chip per extension, 1 Cell per extension (?)
     229   
     230
     231*/
Note: See TracChangeset for help on using the changeset viewer.