Changeset 1479
- Timestamp:
- Aug 11, 2004, 12:01:35 PM (22 years ago)
- Location:
- trunk/psLib/src/astronomy
- Files:
-
- 2 edited
-
psAstrometry.c (modified) (3 diffs)
-
psAstrometry.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psAstrometry.c
r1475 r1479 8 8 * @author George Gusciora, MHPCC 9 9 * 10 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-08-11 2 0:07:44$10 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-08-11 22:01:35 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 103 103 104 104 // Determine which chip contains the fpaCoords. 105 tmpChip = psChip inFPA(tmpChip, fpaCoord, FPA);105 tmpChip = psChipInFPA(tmpChip, fpaCoord, FPA); 106 106 107 107 // Convert to those chip coordinates. 108 chipCoord = psCoordFPA toChip(chipCoord, fpaCoord, tmpChip);108 chipCoord = psCoordFPAToChip(chipCoord, fpaCoord, tmpChip); 109 109 110 110 // Determine which cell contains those chip coordinates. 111 outCell = psCell inChip(outCell, chipCoord, tmpChip);111 outCell = psCellInChip(outCell, chipCoord, tmpChip); 112 112 113 113 psFree(tmpChip); … … 155 155 156 156 chipCoord = psPlaneTransformApply(chipCoord, tmpChip->fromFPA, fpaCoord); 157 tmpCell = psCell inChip(tmpCell, chipCoord, tmpChip);157 tmpCell = psCellInChip(tmpCell, chipCoord, tmpChip); 158 158 if (tmpCell != NULL) { 159 159 psFree(chipCoord); -
trunk/psLib/src/astronomy/psAstrometry.h
r1476 r1479 8 8 * @author George Gusciora, MHPCC 9 9 * 10 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-08-11 2 0:08:05 $10 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-08-11 22:01:35 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 163 163 typedef struct psFPA 164 164 { 165 psArray* chips; ///< chips in the focal plane array166 psMetadata* metadata; ///< focal-plane's metadata167 168 psPlaneDistort* fromTangentPlane; ///< transformation from tangent plane to focal plane169 psPlaneDistort* toTangentPlane; ///< transformation from focal plane to tangent plane170 psFixedPattern* pattern; ///< fixed pattern residual offsets171 172 const struct psExposure* exposure; ///< information about this exposure173 174 psPhotSystem* colorPlus; ///< Color reference175 psPhotSystem* colorMinus; ///< Color reference176 177 float rmsX; ///< RMS for x transformation fits178 float rmsY; ///< RMS for y transformation fits179 float chi2; ///< chi^2 of astrometric solution165 psArray* chips; ///< chips in the focal plane array 166 psMetadata* metadata; ///< focal-plane's metadata 167 168 psPlaneDistort* fromTangentPlane; ///< transformation from tangent plane to focal plane 169 psPlaneDistort* toTangentPlane; ///< transformation from focal plane to tangent plane 170 psFixedPattern* pattern; ///< fixed pattern residual offsets 171 172 const struct psExposure* exposure; ///< information about this exposure 173 174 psPhotSystem* colorPlus; ///< Color reference 175 psPhotSystem* colorMinus; ///< Color reference 176 177 float rmsX; ///< RMS for x transformation fits 178 float rmsY; ///< RMS for y transformation fits 179 float chi2; ///< chi^2 of astrometric solution 180 180 } 181 181 psFPA; … … 190 190 typedef struct psExposure 191 191 { 192 const double ra; ///< Telescope boresight, right ascention193 const double dec; ///< Telescope boresight, declination194 const double hourAngle; ///< Hour angle195 const double zenith; ///< Zenith distance196 const double azimuth; ///< Azimuth197 const double localTime; ///< Local Sidereal Time198 const float date; ///< Modified Jullian Date of observation199 const float rotAngle; ///< Rotator position angle200 const float temperature; ///< Air temperature, for estimating refraction201 const float pressure; ///< Air pressure, for calculating refraction202 const float humidity; ///< Relative humidity, for refraction203 const float exposureTime; ///< Exposure time192 const double ra; ///< Telescope boresight, right ascention 193 const double dec; ///< Telescope boresight, declination 194 const double hourAngle; ///< Hour angle 195 const double zenith; ///< Zenith distance 196 const double azimuth; ///< Azimuth 197 const double localTime; ///< Local Sidereal Time 198 const float date; ///< Modified Jullian Date of observation 199 const float rotAngle; ///< Rotator position angle 200 const float temperature; ///< Air temperature, for estimating refraction 201 const float pressure; ///< Air pressure, for calculating refraction 202 const float humidity; ///< Relative humidity, for refraction 203 const float exposureTime; ///< Exposure time 204 204 205 205 /* Derived quantities */ 206 const float positionAngle; ///< Position angle207 const float parallacticAngle; ///< Parallactic angle208 const float airmass; ///< Airmass, calculated from zenith distance209 const float parallacticFactor; ///< Parallactic factor210 const char *cameraName; ///< name of camera which provided exposure211 const char *telescopeName; ///< name of telescope which provided exposure206 const float positionAngle; ///< Position angle 207 const float parallacticAngle; ///< Parallactic angle 208 const float airmass; ///< Airmass, calculated from zenith distance 209 const float parallacticFactor; ///< Parallactic factor 210 const char *cameraName; ///< name of camera which provided exposure 211 const char *telescopeName; ///< name of telescope which provided exposure 212 212 } 213 213 psExposure; 214 214 215 psExposure* psExposureAlloc(double ra, ///< Telescope boresight, right ascention 216 double dec, ///< Telescope boresight, declination 217 double hourAngle, ///< Hour angle 218 double zenith, ///< Zenith distance 219 double azimuth, ///< Azimuth 220 double localTime, ///< Local Sidereal Time 221 float date, ///< MJD 222 float rotAngle, ///< Rotator position angle 223 float temperature, ///< Temperature 224 float pressure, ///< Pressure 225 float humidity, ///< Relative humidity 226 float exposureTime ///< Exposure time 227 ); 215 /** Allocator for psExposure 216 * 217 * We need several quantities from the telescope in order to make a first 218 * guess at the astrometric solution. From these quantities, further 219 * quantities can be derived and stored for later use. 220 * 221 * @return psExposure* new psExposure struct 222 */ 223 psExposure* psExposureAlloc( 224 double ra, ///< Telescope boresight, right ascention 225 double dec, ///< Telescope boresight, declination 226 double hourAngle, ///< Hour angle 227 double zenith, ///< Zenith distance 228 double azimuth, ///< Azimuth 229 double localTime, ///< Local Sidereal Time 230 float date, ///< MJD 231 float rotAngle, ///< Rotator position angle 232 float temperature, ///< Temperature 233 float pressure, ///< Pressure 234 float humidity, ///< Relative humidity 235 float exposureTime ///< Exposure time 236 ); 228 237 229 238 /** Allocates a Wallace's Grommit structure. … … 234 243 * @return psGrommit* New grommit structure. 235 244 */ 236 psGrommit* psGrommitAlloc(const psExposure* exp ///< the cooresponding exposure structure. 237 ); 238 239 /// XXX: This is defined as a private p_ps() type of function in the SDRS. 240 /// I changed this to a public function. 241 void psGrommitFree(psGrommit *grommit); 242 243 psCell* psCellinFPA(psCell* out, const psPlane* coord, const psFPA* FPA); 244 245 psChip* psChipinFPA(psChip* out, const psPlane* coord, const psFPA* FPA); 246 247 psCell* psCellinChip(psCell* out, const psPlane* coord, const psChip* chip); 248 249 psPlane* psCoordCelltoChip(psPlane* out, const psPlane* in, const psCell* cell); 250 251 psPlane* psCoordChipToFPA(psPlane* out, const psPlane* in, const psChip* chip); 252 253 psPlane* psCoordFPAtoTP(psPlane* out, const psPlane* in, const psFPA* fpa); 254 255 psSphere* psCoordTPtoSky(psSphere* out, const psPlane* in, const psGrommit* grommit); 256 257 psPlane* psCoordCellToFPA(psPlane* out, const psPlane* in, const psCell* cell); 258 259 psSphere* psCoordCelltoSky(psSphere* out, const psPlane* in, const psCell* cell); 260 261 psSphere* psCoordCelltoSkyQuick(psSphere* out, const psPlane* in, const psCell* cell); 262 263 psPlane* psCoordSkytoTP(psPlane* out, const psSphere* in, const psGrommit* grommit); 264 265 psPlane* psCoordTPtoFPA(psPlane* out, const psPlane* in, const psFPA* fpa); 266 267 psPlane* psCoordFPAtoChip(psPlane* out, const psPlane* in, const psChip* chip); 268 269 psPlane* psCoordChiptoCell(psPlane* out, const psPlane* in, const psCell* cell); 270 271 psPlane* psCoordSkytoCell(psPlane* out, const psSphere* in, const psCell* cell); 272 273 psPlane* psCoordSkytoCellQuick(psPlane* out, const psSphere* in, const psCell* cell); 245 psGrommit* psGrommitAlloc( 246 const psExposure* exp ///< the cooresponding exposure structure. 247 ); 248 249 /** Find cooresponding cell for given FPA coordinate 250 * 251 * @return psCell* the cell cooresponding to the coord in FPA 252 */ 253 psCell* psCellInFPA( 254 psCell* out, ///< a cell struct to recycle. If NULL, a new struct is created 255 const psPlane* coord, ///< the coordinate in FPA plane 256 const psFPA* FPA ///< the FPA to search for the cell 257 ); 258 259 /** Find cooresponding chip for given FPA coordinate 260 * 261 * @return psChip* the chip cooresponding to coord 262 */ 263 psChip* psChipInFPA( 264 psChip* out, ///< a chip struct to recycle. If NULL, a new struct is created 265 const psPlane* coord, ///< the coordinate in FPA plane 266 const psFPA* FPA ///< the FPA to search for the cell 267 ); 268 269 /** Find cooresponding cell for given Chip coordinate 270 * 271 * @return psCell* the cell cooresponding to coord 272 */ 273 psCell* psCellInChip( 274 psCell* out, ///< a cell struct to recycle. If NULL, a new struct is created 275 const psPlane* coord, ///< the coordinate in Chip plane 276 const psChip* chip ///< the chip to search for the cell 277 ); 278 279 /** Translate a cell coordinate into a chip coordinate 280 * 281 * @return psPlane* the resulting chip coordinate 282 */ 283 psPlane* psCoordCellToChip( 284 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 285 const psPlane* in, ///< the coordinate within Cell 286 const psCell* cell ///< the Cell in interest 287 ); 288 289 /** Translate a chip coordinate into a FPA coordinate 290 * 291 * @return psPlane* the resulting FPA coordinate 292 */ 293 psPlane* psCoordChipToFPA( 294 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 295 const psPlane* in, ///< the coordinate within Chip 296 const psChip* chip ///< the chip in interest 297 ); 298 299 /** Translate a FPA coordinate into a Tangent Plane coordinate 300 * 301 * @return psPlane* the resulting Tangent Plane coordinate 302 */ 303 psPlane* psCoordFPAToTP( 304 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 305 const psPlane* in, ///< the coordinate within FPA 306 const psFPA* fpa ///< the FPA in interest 307 ); 308 309 /** Translate a Tangent Plane coordinate into a Sky coordinate 310 * 311 * @return psSphere* the resulting Sky coordinate 312 */ 313 psSphere* psCoordTPToSky( 314 psSphere* out, ///< a sphere struct to recycle. If NULL, a new struct is created 315 const psPlane* in, ///< the coordinate within Tangent Plane 316 const psGrommit* grommit ///< the grommit of the tangent plane 317 ); 318 319 /** Translate a cell coordinate into a FPA coordinate 320 * 321 * @return psPlane* the resulting FPA coordinate 322 */ 323 psPlane* psCoordCellToFPA( 324 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 325 const psPlane* in, ///< the coordinate within cell 326 const psCell* cell ///< the cell in interest 327 ); 328 329 /** Translate a cell coordinate into a Sky coordinate 330 * 331 * @return psSphere* the resulting Sky coordinate 332 */ 333 psSphere* psCoordCellToSky( 334 psSphere* out, ///< a sphere struct to recycle. If NULL, a new struct is created 335 const psPlane* in, ///< the coordinate within cell 336 const psCell* cell ///< the cell in interest 337 ); 338 339 /** Translate a cell coordinate into a Sky coordinate using a 'quick and 340 * dirty' method 341 * 342 * @return psSphere* the resulting Sky coordinate 343 */ 344 psSphere* psCoordCellToSkyQuick( 345 psSphere* out, ///< a sphere struct to recycle. If NULL, a new struct is created 346 const psPlane* in, ///< the coordinate within cell 347 const psCell* cell ///< the cell in interest 348 ); 349 350 /** Translate a Sky coordinate into a Tangent Plane coordinate 351 * 352 * @return psPlane* the resulting Tangent Plane coordinate 353 */ 354 psPlane* psCoordSkyToTP( 355 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 356 const psSphere* in, ///< the sky coordinate 357 const psGrommit* grommit ///< the grommit 358 ); 359 360 /** Translate a Tangent Plane coordinate into a FPA coordinate 361 * 362 * @return psPlane* the resulting FPA coordinate 363 */ 364 psPlane* psCoordTPToFPA( 365 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 366 const psPlane* in, ///< the coordinate within tangent plane 367 const psFPA* fpa ///< the FPA of interest 368 ); 369 370 /** Translate a FPA coordinate into a chip coordinate 371 * 372 * @return psPlane* the resulting chip coordinate 373 */ 374 psPlane* psCoordFPAToChip( 375 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 376 const psPlane* in, ///< the FPA coordinate 377 const psChip* chip ///< the chip of interest 378 ); 379 380 /** Translate a chip coordinate into a cell coordinate 381 * 382 * @return psPlane* the resulting cell coordinate 383 */ 384 psPlane* psCoordChipToCell( 385 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 386 const psPlane* in, ///< the Chip coordinate 387 const psCell* cell ///< the cell of interest 388 ); 389 390 /** Translate a sky coordinate into a cell coordinate 391 * 392 * @return psPlane* the resulting cell coordinate 393 */ 394 psPlane* psCoordSkyToCell( 395 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 396 const psSphere* in, ///< the Sky coordinate 397 const psCell* cell ///< the cell of interest 398 ); 399 400 /** Translate a sky coordinate into a cell coordinate using a 'quick and 401 * dirty' method 402 * 403 * @return psPlane* the resulting cell coordinate 404 */ 405 psPlane* psCoordSkyToCellQuick( 406 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 407 const psSphere* in, ///< the Sky coordinate 408 const psCell* cell ///< the cell of interest 409 ); 274 410 275 411 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
