Changeset 623
- Timestamp:
- May 7, 2004, 4:28:10 PM (22 years ago)
- Location:
- trunk/archive/pslib/include
- Files:
-
- 2 edited
-
psAstrom.h (modified) (7 diffs)
-
psPosition.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psAstrom.h
r621 r623 96 96 97 97 psMetadata *md; ///< Chip-level metadata 98 ps CoordXform *chipToFPA;///< Transformations from chip coordinates to FPA coordinates99 ps CoordXform *FPAtoChip;///< Transformations from FPA coordinates to chip98 psPlaneCoordXform *chipToFPA; ///< Transformations from chip coordinates to FPA coordinates 99 psPlaneCoordXform *FPAtoChip; ///< Transformations from FPA coordinates to chip 100 100 101 101 struct psFPA *parentFPA; ///< FPA which contains this chip … … 110 110 psMetadata *md; ///< Cell-level metadata 111 111 112 ps CoordXform *cellToChip;///< Transformations from cell coordinates to chip coordinates113 ps CoordXform *cellToFPA;///< Transformations from cell coordinates to FPA coordinates114 ps CoordXform *cellToSky;///< Quick and Dirty transformations from cell coordinates to sky112 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 115 115 116 116 struct psChip *parentChip; ///< chip which contains this cell … … 137 137 psChip * 138 138 psChipInFPA (psChip *out, ///< Chip to return, or NULL 139 const psPlaneCoord *coord ///< coordinate in FPA 139 140 const psFPA *fpa, ///< FPA description 140 const psCoord *coord ///< coordinate in FPA141 141 ); 142 142 … … 144 144 psCell * 145 145 psCellInChip(psCell *out, ///< Cell to return, or NULL 146 const psPlaneCoord *coord ///< coordinate in chip 146 147 const psChip *chip, ///< chip description 147 const psCoord *coord ///< coordinate in chip148 148 ); 149 149 … … 151 151 psCell * 152 152 psCellInFPA(psCell *out, ///< Cell to return, or NULL 153 const psPlaneCoord *coord ///< Coordinate in FPA 153 154 const psFPA *fpa, ///< FPA description 154 const psCoord *coord ///< Coordinate in FPA155 155 ); 156 156 157 157 158 158 /** Convert (RA,Dec) to cell and cell coordinates */ 159 ps Coord *160 psCoordSkyToCell(ps Coord *out,///< Coordinates to return, or NULL159 psPlaneCoord * 160 psCoordSkyToCell(psPlaneCoord *out, ///< Coordinates to return, or NULL 161 161 psCell *cell, ///< Cell to return 162 const psSphereCoord *in, ///< Input coordinates 162 163 const psFPA *fpa ///< FPA description 163 164 ); 164 165 165 166 /** Convert cell and cell coordinate to (RA,Dec) */ 166 psCoord * 167 psCoordCellToSky(psCoord *out, ///< Coordinates to return, or NULL 167 psSphereCoord * 168 psCoordCellToSky(psSphereCoord *out, ///< Coordinates to return, or NULL 169 const psPlaneCoord *coord ///< cell coordinates to transform 168 170 const psCell *cell, ///< Cell to get coordinates for 169 const psCoord *coord ///< cell coordinates to transform170 171 ); 171 172 172 173 /** Quick and dirty cell to (RA,Dec) --- employs cellToSky transformation */ 173 psCoord * 174 psCoordCellToSkyQuick(psCoord *out, ///< Coordinates to return, or NULL 174 psSphereCoord * 175 psCoordCellToSkyQuick(psSphereCoord *out, ///< Coordinates to return, or NULL 176 const psPlaneCoord *coord ///< cell coordinates to transform 175 177 const psCell *cell, ///< Cell description 176 const psCoord *coord ///< cell coordinates to transform177 178 ); 178 179 179 180 /** Convert (RA,Dec) to tangent plane coords */ 180 ps Coord *181 psCoordSkyToTP(ps Coord *out,///< Coordinates to return, or NULL182 const ps Exposure *exp, ///< Exposure description183 const ps Coord *coord ///< input Sky coordinate181 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 184 185 ); 185 186 186 187 /** Convert tangent plane coords to focal plane coordinates */ 187 psCoord * 188 psCoordTPtoFPA(psCoord *out, ///< Coordinates to return, or NULL 188 psPlaneCoord * 189 psCoordTPtoFPA(psPlaneCoord *out, ///< Coordinates to return, or NULL 190 const psPlaneCoord *coord ///< input TP coordinate 189 191 const psFPA *fpa, ///< FPA description 190 const psCoord *coord ///< input TP coordinate191 192 ); 192 193 193 194 /** converts the specified FPA coord to the coord on the given Chip */ 194 psCoord * 195 psCoordFPAtoChip (psCoord *out, ///< Coordinates to return, or NULL 195 psPlaneCoord * 196 psCoordFPAtoChip (psPlaneCoord *out, ///< Coordinates to return, or NULL 197 const psPlaneCoord *coord ///< input FPA coordinate 196 198 const psChip *chip, ///< Chip of interest 197 const psCoord *coord ///< input FPA coordinate198 199 ); 199 200 200 201 /** converts the specified Chip coord to the coord on the given Cell */ 201 psCoord * 202 psCoordChiptoCell (psCoord *out, ///< Coordinates to return, or NULL 202 psPlaneCoord * 203 psCoordChiptoCell (psPlaneCoord *out, ///< Coordinates to return, or NULL 204 const psPlaneCoord *coord ///< input Chip coordinate 203 205 const psCell *cell, ///< Cell of interest 204 const psCoord *coord ///< input Chip coordinate205 206 ); 206 207 207 208 /** converts the specified Cell coord to the coord on the parent Chip */ 208 psCoord * 209 psCoordCelltoChip (psCoord *out, ///< Coordinates to return, or NULL 209 psPlaneCoord * 210 psCoordCelltoChip (psPlaneCoord *out, ///< Coordinates to return, or NULL 211 const psPlaneCoord *coord ///< input Cell coordinate 210 212 const psCell *cell, ///< Cell description 211 const psCoord *coord ///< input Cell coordinate212 213 ); 213 214 214 215 /** converts the specified Chip coord to the coord on the parent FPA */ 215 psCoord * 216 psCoordChiptoFPA (psCoord *out, ///< Coordinates to return, or NULL 216 psPlaneCoord * 217 psCoordChiptoFPA (psPlaneCoord *out, ///< Coordinates to return, or NULL 218 const psPlaneCoord *coord ///< input Chip coordinate 217 219 const psChip *chip, ///< Chip description 218 const psCoord *coord ///< input Chip coordinate219 220 ); 220 221 221 222 /** Convert focal plane coords to tangent plane coordinates */ 222 psCoord * 223 psCoordFPAToTP(psCoord *out, ///< Coordinates to return, or NULL 223 psPlaneCoord * 224 psCoordFPAToTP(psPlaneCoord *out, ///< Coordinates to return, or NULL 225 const psPlaneCoord *coord ///< input FPA coordinate 224 226 const psFPA *fpa, ///< FPA description 225 const psCoord *coord ///< input FPA coordinate226 227 ); 227 228 228 229 /** Convert tangent plane coords to (RA,Dec) */ 229 ps Coord *230 psCoordTPtoSky(ps Coord *out,///< Coordinates to return, or NULL231 const ps Exposure *exp, ///< Exposure description232 const ps Coord *coord ///< input TP coordinate230 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 233 234 ); 234 235 235 236 /** Convert Cell coords to FPA coordinates */ 236 psCoord * 237 psCoordCellToFPA(psCoord *out, ///< Coordinates to return, or NULL 237 psPlaneCoord * 238 psCoordCellToFPA(psPlaneCoord *out, ///< Coordinates to return, or NULL 239 const psPlaneCoord *coord ///< Input cell coordinates 238 240 const psCell *cell, ///< Cell description 239 const psCoord *coord ///< Input cell coordinates240 241 ); 241 242 242 243 /** Get the airmass for a given position and sidereal time */ 243 244 float 244 psGetAirmass(const ps Coord *coord,///< Position on the sky245 psGetAirmass(const psSphereCoord *coord, ///< Position on the sky 245 246 double siderealTime, ///< Sidereal time 246 247 float height ///< Height above sea level … … 249 250 /** Get the parallactic angle for a given position and sidereal time */ 250 251 float 251 psGetParallactic(const ps Coord *coord,///< Position on the sky252 psGetParallactic(const psSphereCoord *coord, ///< Position on the sky 252 253 double siderealTime ///< Sidereal time 253 254 ); … … 262 263 263 264 /** Calculate the parallax factor */ 264 ps Coord *265 psSphereCoord * 265 266 psGetParallaxFactor(const psExposure *exp ///< Exposure details 266 267 ); -
trunk/archive/pslib/include/psPosition.h
r396 r623 9 9 /** Structures *********************/ 10 10 11 /** A point in 2-D space, with errors. 12 */ 13 typedef union { 14 struct { 15 double x; ///< x position 16 double y; ///< y position 17 double xErr; ///< Error in x position 18 double yErr; ///< Error in y position 19 } xy; 20 struct { 21 double r; ///< RA 22 double d; ///< Dec 23 double rErr; ///< Error in RA 24 double dErr; ///< Error in Dec 25 } rd; 26 } psCoord; 11 /** A point in 2-D space, with errors. */ 12 typedef struct { 13 double x; ///< x position 14 double y; ///< y position 15 double xErr; ///< Error in x position 16 double yErr; ///< Error in y position 17 } psPlaneCoord; 18 19 /** A point on the surface of a sphere, with errors */ 20 typedef struct { 21 double r; ///< RA 22 double d; ///< Dec 23 double rErr; ///< Error in RA 24 double dErr; ///< Error in Dec 25 } psSphereCoord; 27 26 28 27 /** A polynomial transformation between coordinate frames. This may be a linear relationship, or may … … 32 31 psDPolynomial2D *x; 33 32 psDPolynomial2D *y; 34 } ps CoordXform;33 } psPlaneCoordXform; 35 34 36 35 /** The optical distortion terms. The lowest two terms are the x and y axis of the target system. The higher … … 40 39 psDPolynomial4D *x; 41 40 psDPolynomial4D *y; 42 } ps Distortion;41 } psPlaneDistortion; 43 42 44 43 /** Functions **************************************************************/ … … 48 47 49 48 /** apply the coordinate transformation to the given coordinate */ 50 ps Coord *psCoordXformApply (psCoord *out, ///< Output coordinates, or NULL51 const psCoordXform *frame, ///< coordinate transformation52 const psCoord *coords ///< input coordiate49 psPlaneCoord *psPlaneCoordXformApply (psPlaneCoord *out, ///< Output coordinates, or NULL 50 const psPlaneCoordXform *frame, ///< coordinate transformation 51 const psPlaneCoord *coords ///< input coordiate 53 52 ); 54 53 55 54 /** apply the optical distortion to the given coordinate, magnitude, color */ 56 ps Coord *psDistortionApply (psCoord *out, ///< Output coordinates, or NULL57 const psDistortion *pattern, ///< optical distortion pattern58 const psCoord *coords, ///< input coordinate59 float mag,///< magnitude of object60 float color ///< color of object55 psPlaneCoord *psPlaneDistortionApply (psPlaneCoord *out, ///< Output coordinates, or NULL 56 const psPlaneDistortion *pattern, ///< optical distortion pattern 57 const psPlaneCoord *coords, ///< input coordinate 58 float mag, ///< magnitude of object 59 float color ///< color of object 61 60 ); 62 61 63 62 /** Get offset (RA,Dec) on the sky between two positions position1 and position2 may not be identical */ 64 ps Coord *65 psGetOffset(const ps Coord *restrict position1, ///< Position 166 const ps Coord *restrict position2, ///< Position 263 psSphereCoord * 64 psGetOffset(const psSphereCoord *restrict position1, ///< Position 1 65 const psSphereCoord *restrict position2, ///< Position 2 67 66 const char *type ///< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc 68 67 ); 69 68 70 69 /** Apply an offset to a position */ 71 ps Coord *72 psApplyOffset(const ps Coord *restrict position, ///< Position73 const ps Coord *restrict offset, ///< Offset70 psSphereCoord * 71 psApplyOffset(const psSphereCoord *restrict position, ///< Position 72 const psSphereCoord *restrict offset, ///< Offset 74 73 const char *type ///< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc 75 74 ); … … 78 77 79 78 /** Get Sun Position */ 80 ps Coord *79 psSphereCoord * 81 80 psGetSunPos(float mjd ///< MJD to get position for 82 81 ); 83 82 84 83 /** Get Moon position */ 85 ps Coord *84 psSphereCoord * 86 85 psGetMoonPos(float mjd, ///< MJD to get position for 87 86 double latitude, ///< Latitude for apparent position … … 95 94 96 95 /** Get Planet positions */ 97 ps Coord *96 psSphereCoord * 98 97 psGetSolarSystemPos(const char *solarSystemObject, ///< Named S.S. object 99 98 float mjd ///< MJD to get position for … … 105 104 106 105 /** Convert ICRS to Ecliptic */ 107 ps Coord *108 psCoordinatesItoE(const ps Coord *restrict coordinates ///< ICRS coordinates to convert106 psSphereCoord * 107 psCoordinatesItoE(const psSphereCoord *restrict coordinates ///< ICRS coordinates to convert 109 108 ); 110 109 111 110 /** Convert Ecliptic to ICRS */ 112 ps Coord *113 psCoordinatesEtoI(const ps Coord *restrict coordinates ///< Ecliptic coordinates to convert111 psSphereCoord * 112 psCoordinatesEtoI(const psSphereCoord *restrict coordinates ///< Ecliptic coordinates to convert 114 113 ); 115 114 116 115 /** Convert ICRS to Galactic */ 117 ps Coord *118 psCoordinatesItoG(const ps Coord *restrict coordinates ///< ICRS coordinates to convert116 psSphereCoord * 117 psCoordinatesItoG(const psSphereCoord *restrict coordinates ///< ICRS coordinates to convert 119 118 ); 120 119 121 120 /** Convert Galactic to ICRS */ 122 ps Coord *123 psCoordinatesGtoI(const ps Coord *restrict coordinates ///< Galactic coordinates to convert121 psSphereCoord * 122 psCoordinatesGtoI(const psSphereCoord *restrict coordinates ///< Galactic coordinates to convert 124 123 ); 125 124
Note:
See TracChangeset
for help on using the changeset viewer.
