IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 270


Ignore:
Timestamp:
Mar 19, 2004, 5:37:29 PM (22 years ago)
Author:
Paul Price
Message:

Added quick and dirty transformation from cell to sky in psCell.
Added "psCoord *out" as the first argument in coordinate transformations.
Added some functions which will simply be wrappers for the lower-level transformations.
Put "const" into functions.

File:
1 edited

Legend:

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

    r257 r270  
    113113    psCoordXform *cellToChip;           ///< Transformations from cell coordinates to chip coordinates
    114114    psCoordXform *cellToFPA;            ///< Transformations from cell coordinates to FPA coordinates
     115    psCoordXform *cellToSky;            ///< Quick and Dirty transformations from cell coordinates to sky
    115116
    116117    struct psChip  *parentChip;         ///< chip which contains this cell
     
    119120/** a Frame: a collection of pixels */
    120121typedef struct {
    121     int x0, y0;                         //!< Offset from the lower-left corner
     122    const int x0, y0;                   //!< Offset from the lower-left corner
    122123    psImage *image;                     ///< imaging area of cell
    123124    psDlist *objects;                   ///< objects derived from cell
     
    136137/** returns Chip in FPA which contains the given FPA coordinate */
    137138psChip *
    138 psChipInFPA (psFPA *fpa,                ///< FPA description
    139              psCoord *coord             ///< coordinate in FPA
     139psChipInFPA (psChip *out,               //!< Chip to return, or NULL
     140             const psFPA *fpa,          ///< FPA description
     141             const psCoord *coord       ///< coordinate in FPA
    140142             );
    141143
    142144/** returns Cell in Chip which contains the given chip coordinate */
    143145psCell *
    144 psCellInChip (psChip *chip,             ///< chip description
    145               psCoord *coord            ///< coordinate in chip
    146               );
     146psCellInChip(psCell *out,               //!< Cell to return, or NULL
     147             const psChip *chip,        ///< chip description
     148             const psCoord *coord       ///< coordinate in chip
     149             );
     150
     151/** Return the cell in FPA which contains the given FPA coordinates */
     152psCell *
     153psCellInFPA(psCell *out,                //!< Cell to return, or NULL
     154            const psFPA *fpa,           //!< FPA description
     155            const psCoord *coord        //!< Coordinate in FPA
     156            );
     157
     158
     159/** Convert (RA,Dec) to cell and cell coordinates */
     160psCoord *
     161psCoordSkyToCell(psCoord *out,          //!< Coordinates to return, or NULL
     162                 psCell *cell,          //!< Cell to return
     163                 const psFPA *fpa       //!< FPA description
     164                 );
     165
     166/** Convert cell and cell coordinate to (RA,Dec) */
     167psCoord *
     168psCoordCellToSky(psCoord *out,          //!< Coordinates to return, or NULL
     169                 const psCell *cell,    //!< Cell to get coordinates for
     170                 const psCoord *coord   //!< cell coordinates to transform
     171                 );
     172
     173/** Quick and dirty cell to (RA,Dec) --- employs cellToSky transformation */
     174psCoord *
     175psCoordCellToSkyQuick(psCoord *out,     //!< Coordinates to return, or NULL
     176                      const psCell *cell, //!< Cell description
     177                      const psCoord *coord //!< cell coordinates to transform
     178                      );
    147179
    148180/** Convert (RA,Dec) to tangent plane coords */
    149181psCoord *
    150 psCoordSkyToTP(psExposure *exp,         //!< Exposure description
    151                psCoord *coord           //!< input Sky coordinate
     182psCoordSkyToTP(psCoord *out,            //!< Coordinates to return, or NULL
     183               const psExposure *exp,   //!< Exposure description
     184               const psCoord *coord     //!< input Sky coordinate
    152185               );
    153186
    154187/** Convert tangent plane coords to focal plane coordinates */
    155188psCoord *
    156 psCoordTPtoFPA(psFPA *fpa,              //!< FPA description
    157                psCoord *coord           //!< input TP coordinate
     189psCoordTPtoFPA(psCoord *out,            //!< Coordinates to return, or NULL
     190               const psFPA *fpa,        //!< FPA description
     191               const psCoord *coord     //!< input TP coordinate
    158192               );
    159193
    160194/** converts the specified FPA coord to the coord on the given Chip */
    161195psCoord *
    162 psCoordFPAtoChip (psFPA *fpa,           ///< FPA description
    163                   psChip *chip,         ///< Chip of interest
    164                   psCoord *coord        ///< input FPA coordinate
     196psCoordFPAtoChip (psCoord *out,         //!< Coordinates to return, or NULL
     197                  const psChip *chip,   ///< Chip of interest
     198                  const psCoord *coord  ///< input FPA coordinate
    165199                  );
    166200
    167201/** converts the specified Chip coord to the coord on the given Cell */
    168202psCoord *
    169 psCoordChiptoCell (psChip *chip,        ///< Chip description
    170                    psCell *cell,        ///< Cell of interest
    171                    psCoord *coord       ///< input Chip coordinate
     203psCoordChiptoCell (psCoord *out,        //!< Coordinates to return, or NULL
     204                   const psCell *cell,  ///< Cell of interest
     205                   const psCoord *coord ///< input Chip coordinate
    172206                   );
    173207
    174208/** converts the specified Cell coord to the coord on the parent Chip */
    175209psCoord *
    176 psCoordCelltoChip (psCell *cell,        ///< Cell description
    177                    psCoord *coord       ///< input Cell coordinate
     210psCoordCelltoChip (psCoord *out,        //!< Coordinates to return, or NULL
     211                   const psCell *cell,  ///< Cell description
     212                   const psCoord *coord ///< input Cell coordinate
    178213                   );
    179214
    180215/** converts the specified Chip coord to the coord on the parent FPA */
    181216psCoord *
    182 psCoordChiptoFPA (psChip *chip,         ///< Chip description
    183                   psCoord *coord        ///< input Chip coordinate
     217psCoordChiptoFPA (psCoord *out,         //!< Coordinates to return, or NULL
     218                  const psChip *chip,   ///< Chip description
     219                  const psCoord *coord  ///< input Chip coordinate
    184220                  );
    185221
    186222/** Convert focal plane coords to tangent plane coordinates */
    187223psCoord *
    188 psCoordFPAToTP(psFPA *fpa,                      //!< FPA description
    189                psCoord *coord           //!< input FPA coordinate
     224psCoordFPAToTP(psCoord *out,            //!< Coordinates to return, or NULL
     225               const psFPA *fpa,        //!< FPA description
     226               const psCoord *coord     //!< input FPA coordinate
    190227               );
    191228
    192229/** Convert tangent plane coords to (RA,Dec) */
    193230psCoord *
    194 psCoordTPtoSky(psExposure *exp,         //!< Exposure description
    195                psCoord *coord           //!< input TP coordinate
    196                );
     231psCoordTPtoSky(psCoord *out,            //!< Coordinates to return, or NULL
     232               const psExposure *exp,   //!< Exposure description
     233               const psCoord *coord     //!< input TP coordinate
     234               );
     235
     236/** Convert Cell coords to FPA coordinates */
     237psCoord *
     238psCoordCellToFPA(psCoord *out,          //!< Coordinates to return, or NULL
     239                 const psCell *cell,    //!< Cell description
     240                 const psCoord *coord   //!< Input cell coordinates
     241                 );
    197242
    198243/** Get the airmass for a given position and sidereal time */
    199244float
    200 psGetAirmass(psCoord *coord,            //!< Position on the sky
     245psGetAirmass(const psCoord *coord,      //!< Position on the sky
    201246             double siderealTime        //!< Sidereal time
    202247             );
     
    204249/** Get the parallactic angle for a given position and sidereal time */
    205250float
    206 psGetParallactic(psCoord *coord,        //!< Position on the sky
     251psGetParallactic(const psCoord *coord,  //!< Position on the sky
    207252                 double siderealTime    //!< Sidereal time
    208253                 );
     
    211256float
    212257psGetRefraction(float colour,           //!< Colour of object
    213                 psPhotSystem colorPlus, // 
     258                psPhotSystem colorPlus, ///< Colour reference
    214259                psPhotSystem colorMinus, ///< Colour reference
    215                 psExposure *exp         //!< Telescope pointing information, for airmass, temp and pressure
     260                const psExposure *exp   //!< Telescope pointing information, for airmass, temp and pressure
    216261                );
    217262
Note: See TracChangeset for help on using the changeset viewer.