IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 20, 2004, 6:12:37 PM (22 years ago)
Author:
eugene
Message:

substantial API changes based on change to PSLib SDRS

File:
1 edited

Legend:

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

    r704 r753  
    7979
    8080    psMetadata *md;                     ///< FPA-level metadata
    81     psPlaneDistortion *TPtoFP;          ///< Transformation term from
    82     psPlaneDistortion *FPtoTP;          ///< Transformation term from
     81    psPlaneDistort *TPtoFP;             ///< Transformation term from
     82    psPlaneDistort *FPtoTP;             ///< Transformation term from
    8383    psFixedPattern *pattern;            ///< Fixed pattern residual offsets
    8484    const psExposure *exp;              ///< information about this exposure
     
    9696
    9797    psMetadata *md;                     ///< Chip-level metadata
    98     psPlaneCoordXform *chipToFPA;       ///< Transformations from chip coordinates to FPA coordinates
    99     psPlaneCoordXform *FPAtoChip;       ///< Transformations from FPA coordinates to chip
     98    psPlaneTransform *chipToFPA;        ///< Transformations from chip coordinates to FPA coordinates
     99    psPlaneTransform *FPAtoChip;        ///< Transformations from FPA coordinates to chip
    100100
    101101    struct psFPA *parentFPA;            ///< FPA which contains this chip
     
    110110    psMetadata *md;                     ///< Cell-level metadata
    111111
    112     psPlaneCoordXform *cellToChip;      ///< Transformations from cell coordinates to chip coordinates
    113     psPlaneCoordXform *cellToFPA;       ///< Transformations from cell coordinates to FPA coordinates
    114     psPlaneCoordXform *cellToSky;       ///< Quick and Dirty transformations from cell coordinates to sky
     112    psPlaneTransform *cellToChip;       ///< Transformations from cell coordinates to chip coordinates
     113    psPlaneTransform *cellToFPA;        ///< Transformations from cell coordinates to FPA coordinates
     114    psPlaneTransform *cellToSky;        ///< Quick and Dirty transformations from cell coordinates to sky
    115115
    116116    struct psChip  *parentChip;         ///< chip which contains this cell
     
    134134/*** Calculating and applying astrometric solutions ***/
    135135
     136/** Return the cell in FPA which contains the given FPA coordinates */
     137psCell *
     138psCellInFPA(psCell *out,                ///< Cell to return, or NULL
     139            const psPlane *coord,       ///< Coordinate in FPA
     140            const psFPA *fpa)           ///< FPA description
     141;
     142
     143
    136144/** returns Chip in FPA which contains the given FPA coordinate */
    137145psChip *
    138146psChipInFPA (psChip *out,               ///< Chip to return, or NULL
    139              const psPlaneCoord *coord, ///< coordinate in FPA
    140              const psFPA *fpa           ///< FPA description
    141              );
     147             const psPlane *coord,      ///< coordinate in FPA
     148             const psFPA *fpa)          ///< FPA description
     149;
    142150
    143151/** returns Cell in Chip which contains the given chip coordinate */
    144152psCell *
    145153psCellInChip(psCell *out,               ///< Cell to return, or NULL
    146              const psPlaneCoord *coord, ///< coordinate in chip
    147              const psChip *chip ///< chip description
    148              );
    149 
    150 /** Return the cell in FPA which contains the given FPA coordinates */
    151 psCell *
    152 psCellInFPA(psCell *out,                ///< Cell to return, or NULL
    153             const psPlaneCoord *coord,  ///< Coordinate in FPA
    154             const psFPA *fpa            ///< FPA description
    155             );
    156 
     154             const psPlane *coord,      ///< coordinate in chip
     155             const psChip *chip)        ///< chip description
     156;
     157
     158/************ conversions low -> high ****************/
     159/** converts the specified Cell coord to the coord on the parent Chip */
     160psPlane *
     161psCoordCelltoChip (psPlane *out,        ///< Coordinates to return, or NULL
     162                   const psPlane *in,   ///< input Cell coordinate
     163                   const psCell *cell)  ///< Cell description
     164;
     165
     166/** converts the specified Chip coord to the coord on the parent FPA */
     167psPlane *
     168psCoordChiptoFPA (psPlane *out,         ///< Coordinates to return, or NULL
     169                  const psPlane *in,    ///< input Chip coordinate
     170                  const psChip *chip)   ///< Chip description
     171;
     172
     173/** Convert focal plane coords to tangent plane coordinates */
     174psPlane *
     175psCoordFPAToTP(psPlane *out,            ///< Coordinates to return, or NULL
     176               const psPlane *in,       ///< input FPA coordinate
     177               const psFPA *fpa)        ///< FPA description
     178;
     179
     180/** Convert tangent plane coords to (RA,Dec) */
     181psSphere *
     182psCoordTPtoSky(psSphere *out,           ///< Coordinates to return, or NULL
     183               const psPlane *in,       ///< input TP coordinate
     184               const psGrommit *grommit) ///< Grommit for fast conversion
     185;
     186
     187/** Convert Cell coords to FPA coordinates */
     188psPlane *
     189psCoordCellToFPA(psPlane *out,          ///< Coordinates to return, or NULL
     190                 const psPlane *in,     ///< Input cell coordinates
     191                 const psCell *cell)    ///< Cell description
     192;
     193
     194/** Convert cell and cell coordinate to (RA,Dec) */
     195psSphere *
     196psCoordCellToSky(psSphere *out,         ///< Coordinates to return, or NULL
     197                 const psPlane *in,     ///< cell coordinates to transform
     198                 const psCell *cell)    ///< Cell to get coordinates for
     199;
     200
     201/** Convert cell and cell coordinate to (RA,Dec) */
     202psSphere *
     203psCoordCellToSkyQD(psSphere *out,       ///< Coordinates to return, or NULL
     204                   const psPlane *in,   ///< cell coordinates to transform
     205                   const psCell *cell)  ///< Cell to get coordinates for
     206;
     207
     208
     209/************ conversions low -> high ****************/
     210/** Convert (RA,Dec) to tangent plane coords */
     211psPlane *
     212psCoordSkyToTP(psPlane *out,            ///< Coordinates to return, or NULL
     213               const psSphere *in,      ///< input Sky coordinate
     214               const psGrommit *grommit) ///< Grommit for fast conversion
     215;
     216
     217/** Convert tangent plane coords to focal plane coordinates */
     218psPlane *
     219psCoordTPtoFPA(psPlane *out,            ///< Coordinates to return, or NULL
     220               const psPlane *in,       ///< input TP coordinate
     221               const psFPA *fpa)        ///< FPA description
     222;
     223
     224/** converts the specified FPA coord to the coord on the given Chip */
     225psPlane *
     226psCoordFPAtoChip (psPlane *out,         ///< Coordinates to return, or NULL
     227                  const psPlane *in,    ///< input FPA coordinate
     228                  const psChip *chip)   ///< Chip of interest
     229;
     230
     231/** converts the specified Chip coord to the coord on the given Cell */
     232psPlane *
     233psCoordChiptoCell (psPlane *out,        ///< Coordinates to return, or NULL
     234                   const psPlane *in,   ///< input Chip coordinate
     235                   const psCell *cell)  ///< Cell of interest
     236;
    157237
    158238/** Convert (RA,Dec) to cell and cell coordinates */
    159 psPlaneCoord *
    160 psCoordSkyToCell(psPlaneCoord *out,     ///< Coordinates to return, or NULL
    161                  psCell *cell,          ///< Cell to return
    162                  const psSphereCoord *in, ///< Input coordinates
    163                  const psFPA *fpa       ///< FPA description
    164                  );
    165 
    166 /** Convert cell and cell coordinate to (RA,Dec) */
    167 psSphereCoord *
    168 psCoordCellToSky(psSphereCoord *out,    ///< Coordinates to return, or NULL
    169                  const psPlaneCoord *coord, ///< cell coordinates to transform
    170                  const psCell *cell     ///< Cell to get coordinates for
    171                  );
     239psPlane *
     240psCoordSkyToCell(psPlane *out,          ///< Coordinates to return
     241                 const psSphere *in,    ///< Input coordinates
     242                 const psCell *cell)    ///< Cell of interest
     243;
    172244
    173245/** Quick and dirty cell to (RA,Dec) --- employs cellToSky transformation */
    174 psSphereCoord *
    175 psCoordCellToSkyQuick(psSphereCoord *out, ///< Coordinates to return, or NULL
    176                       const psPlaneCoord *coord,        ///< cell coordinates to transform
    177                       const psCell *cell ///< Cell description
    178                       );
    179 
    180 /** Convert (RA,Dec) to tangent plane coords */
    181 psPlaneCoord *
    182 psCoordSkyToTP(psPlaneCoord *out,       ///< Coordinates to return, or NULL
    183                const psSphereCoord *coord, ///< input Sky coordinate
    184                const psGrommit *grommit ///< Grommit for fast conversion
    185                );
    186 
    187 /** Convert tangent plane coords to focal plane coordinates */
    188 psPlaneCoord *
    189 psCoordTPtoFPA(psPlaneCoord *out,       ///< Coordinates to return, or NULL
    190                const psPlaneCoord *coord, ///< input TP coordinate
    191                const psFPA *fpa        ///< FPA description
    192                );
    193 
    194 /** converts the specified FPA coord to the coord on the given Chip */
    195 psPlaneCoord *
    196 psCoordFPAtoChip (psPlaneCoord *out,    ///< Coordinates to return, or NULL
    197                   const psPlaneCoord *coord, ///< input FPA coordinate
    198                   const psChip *chip    ///< Chip of interest
    199                   );
    200 
    201 /** converts the specified Chip coord to the coord on the given Cell */
    202 psPlaneCoord *
    203 psCoordChiptoCell (psPlaneCoord *out,   ///< Coordinates to return, or NULL
    204                    const psPlaneCoord *coord, ///< input Chip coordinate
    205                    const psCell *cell   ///< Cell of interest
    206                    );
    207 
    208 /** converts the specified Cell coord to the coord on the parent Chip */
    209 psPlaneCoord *
    210 psCoordCelltoChip (psPlaneCoord *out,   ///< Coordinates to return, or NULL
    211                    const psPlaneCoord *coord, ///< input Cell coordinate
    212                    const psCell *cell   ///< Cell description
    213                    );
    214 
    215 /** converts the specified Chip coord to the coord on the parent FPA */
    216 psPlaneCoord *
    217 psCoordChiptoFPA (psPlaneCoord *out,            ///< Coordinates to return, or NULL
    218                   const psPlaneCoord *coord,    ///< input Chip coordinate
    219                   const psChip *chip    ///< Chip description
    220                   );
    221 
    222 /** Convert focal plane coords to tangent plane coordinates */
    223 psPlaneCoord *
    224 psCoordFPAToTP(psPlaneCoord *out,               ///< Coordinates to return, or NULL
    225                const psPlaneCoord *coord, ///< input FPA coordinate
    226                const psFPA *fpa         ///< FPA description
    227                );
    228 
    229 /** Convert tangent plane coords to (RA,Dec) */
    230 psSphereCoord *
    231 psCoordTPtoSky(psSphereCoord *out,      ///< Coordinates to return, or NULL
    232                const psPlaneCoord *coord, ///< input TP coordinate
    233                const psGrommit *grommit ///< Grommit for fast conversion
    234                );
    235 
    236 /** Convert Cell coords to FPA coordinates */
    237 psPlaneCoord *
    238 psCoordCellToFPA(psPlaneCoord *out,     ///< Coordinates to return, or NULL
    239                  const psPlaneCoord *coord, ///< Input cell coordinates
    240                  const psCell *cell     ///< Cell description
    241                  );
     246psSphere *
     247psCoordSkyToCellQD(psPlane *out,        ///< Coordinates to return
     248                   const psSphere *in,  ///< Input coordinates
     249                   const psCell *cell)  ///< Cell of interest
     250;
     251
     252/**** other utilities ****/
    242253
    243254/** Get the airmass for a given position and sidereal time */
    244255float
    245 psGetAirmass(const psSphereCoord *coord, ///< Position on the sky
     256psGetAirmass(const psSphere *coord,     ///< Position on the sky
    246257             double siderealTime,       ///< Sidereal time
    247              float height               ///< Height above sea level
    248              );
     258             float height)              ///< Height above sea level
     259;
    249260
    250261/** Get the parallactic angle for a given position and sidereal time */
    251262float
    252 psGetParallactic(const psSphereCoord *coord, ///< Position on the sky
    253                  double siderealTime    ///< Sidereal time
    254                  );
     263psGetParallactic(const psSphere *coord, ///< Position on the sky
     264                 double siderealTime)   ///< Sidereal time
     265;
    255266
    256267/** Estimate atmospheric refraction, along the parallactic */
     
    259270                psPhotSystem colorPlus, ///< Colour reference
    260271                psPhotSystem colorMinus, ///< Colour reference
    261                 const psExposure *exp   ///< Telescope pointing information, for airmass, temp and pressure
    262                 );
     272                const psExposure *exp)  ///< Telescope pointing information, for airmass, temp and pressure
     273;
    263274
    264275/** Calculate the parallax factor */
    265 psSphereCoord *
    266 psGetParallaxFactor(const psExposure *exp ///< Exposure details
    267     );
     276psSphere *
     277psGetParallaxFactor(const psExposure *exp) ///< Exposure details
     278;
    268279
    269280/*** Constructors / Destructors ******************************************************/
     
    281292                float pressure,         ///< Pressure
    282293                float humidity,         ///< Relative humidity
    283                 float exptime           ///< Exposure time
    284                 );
     294                float exptime)          ///< Exposure time
     295;
    285296
    286297/** Destructor */
    287298void
    288 psExposureFree(psExposure *restrict myExp ///< Object to destroy
    289                );
     299psExposureFree(psExposure *restrict myExp) ///< Object to destroy
     300;
    290301
    291302/** Constructor */
    292303psGrommit *
    293 psGrommitAlloc(const psExposure *exp    ///< Relevant exposure
    294     );
     304psGrommitAlloc(const psExposure *exp)   ///< Relevant exposure
     305;
    295306
    296307/** Destructor */
    297308void
    298 psGrommitFree(psGrommit *grommit        ///< Grommit to destroy
    299     );
     309psGrommitFree(psGrommit *grommit)       ///< Grommit to destroy
     310;
    300311
    301312/* \} */ // End of AstroGroup Functions
     
    304315
    305316/*
    306    example images:
    307 
    308    GPC:          1 Chip per file, 1 Cell per extension
    309    Megacam:      1 FPA per file, 1 Chip per extension, 2 Cell per extension (DSEC)
    310    CFH12K (MEF): 1 FPA per file, 1 Chip per extension, 1 Cell per extension
    311    CFHT-IR:      1 FPA per file, 1 Chip per extension, 4 Cell per extension (NAXIS = 3)
    312    WIRCAM:       1 FPA per file, 1 Chip per extension, 1 Cell per extension (?)
     317  example images:
     318
     319  GPC:          1 Chip per file, 1 Cell per extension
     320  Megacam:      1 FPA per file, 1 Chip per extension, 2 Cell per extension (DSEC)
     321  CFH12K (MEF): 1 FPA per file, 1 Chip per extension, 1 Cell per extension
     322  CFHT-IR:      1 FPA per file, 1 Chip per extension, 4 Cell per extension (NAXIS = 3)
     323  WIRCAM:       1 FPA per file, 1 Chip per extension, 1 Cell per extension (?)
    313324   
    314325
Note: See TracChangeset for help on using the changeset viewer.