Changeset 4770 for trunk/psModules/src/pmAstrometry.h
- Timestamp:
- Aug 15, 2005, 3:10:36 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/pmAstrometry.h (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmAstrometry.h
r4754 r4770 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-08-1 1 00:03:51$10 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-08-16 01:10:34 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 143 143 // Information 144 144 psImage *image; ///< Imaging area of readout 145 // XXX: The following mask was removed from the pmReadout struct in recent SDRS 146 // versions. However, I'm keeping it here since al ot of modules still require 147 // it. 148 psImage *mask; ///< Mask of input image 145 149 psMetadata *analysis; ///< Readout-level analysis metadata 146 150 psMetadata *concepts; ///< Cache for PS Concepts 147 151 pmCell *parent; ///< Parent cell 148 152 } 149 psReadout; 150 151 /** Allocates a psReadout 153 pmReadout; 154 155 156 /** Allocates a pmReadout 152 157 * 153 158 * The constructor shall make an empty pmReadout. If the parent cell is not … … 156 161 * other pointers in the structure shall be initialized to NULL. 157 162 * 158 * @return p sReadout* newly allocated psReadout with all internal pointers set to NULL159 */ 160 p sReadout *pmReadoutAlloc(163 * @return pmReadout* newly allocated pmReadout with all internal pointers set to NULL 164 */ 165 pmReadout *pmReadoutAlloc( 161 166 pmCell *cell ///< Parent cell 162 167 ); 163 168 164 /** Allocates a p sCell169 /** Allocates a pmCell 165 170 * 166 171 * The constructor shall make an empty pmCell. If the parent chip is not NULL, 167 * the parent link is made and the cell shall be placed in the parentThe 168 * constructor shall make an empty psCell.s array of cells. The readouts 169 * array shall be allocated with a zero size, and the metadata containers 170 * constructed. All other pointers in the structure shall be initialized to 171 * NULL. 172 * 173 * @return psCell* newly allocated psCell 172 * the parent link is made and the cell shall be placed in the parents array of 173 * cells. The readouts array shall be allocated with a zero size, and the 174 * metadata containers constructed. All other pointers in the structure shall be 175 * initialized to NULL. 176 * 177 * @return pmCell* newly allocated pmCell 174 178 */ 175 179 pmCell *pmCellAlloc( … … 198 202 */ 199 203 pmFPA *pmFPAAlloc( 200 const psMetadata *camera ///< Camera configuration 201 // psDB *db ///< Database handle 202 ); 203 204 const psMetadata *camera, ///< Camera configuration 205 psDB *db ///< Database handle 206 ); 207 208 209 /** Verify parent links. 210 * 211 * This function checks the validity of the parent links in the FPA hierarchy. 212 * If a parent link is not set (or not set correctly), it is corrected, and the 213 * function shall return false. If all the parent pointers were correct, the 214 * function shall return true. 215 * 216 */ 217 bool pmFPACheckParents( 218 pmFPA *fpa 219 ); 220 221 222 223 /** FUNC DESC 224 * 225 * 226 * 227 * 228 */ 204 229 205 230 … … 211 236 212 237 213 214 215 216 217 218 /** Wallace's Grommit219 *220 * SLALib requires several elements to perform the transformations between221 * the tangent plane and the sky. Pre-computing these quantities for each222 * exposure means that subsequent transformations are faster. For historical223 * reasons, this structure is known colloquially as "Wallace's Grommit".224 *225 */226 227 /*228 typedef struct229 {230 const double latitude; ///< geodetic latitude (radians)231 const double longitude; ///< longitude + ... (radians)232 const double height; ///< height (HM)233 const double abberationMag; ///< magnitude of diurnal aberration vector234 const double temperature; ///< ambient temperature (TDK)235 const double pressure; ///< pressure (PMB)236 const double humidity; ///< relative humidity (RH)237 const double wavelength; ///< wavelength (WL)238 const double lapseRate; ///< lapse rate (TLR)239 const double refractA, refractB; ///< refraction constants A and B (radians)240 const double siderealTime; ///< local apparent sidereal time (radians)241 }242 psGrommit;243 */244 245 246 /** Fixed Pattern Corrections247 *248 * The fixed pattern is a correction to the general astrometric solution249 * formed by summing the residuals from many observations. The intent is to250 * correct for higher-order distortions in the camera system on a coarse251 * grid (larger than individual pixels, but smaller than a single cell).252 * Hence, in addition to the offsets, we need to specify the size and scale253 * of the grid in x and y as well as the origin of the grid.254 */255 /*256 typedef struct257 {258 psS32 nX; ///< Number of elements in x direction259 psS32 nY; ///< Number of elements in y direction260 double x0; ///< X Position of 0,0 corner on focal plane261 double y0; ///< Y Position of 0,0 corner on focal plane262 double xScale; ///< Scale of the grid in x direction263 double yScale; ///< Scale of the grid in x direction264 /// XXX: I added the following memvers to facilitate the psFreeing of the x,y data structures.265 psS32 p_ps_xRows; ///< Number of rows in the x member266 psS32 p_ps_xCols; ///< Number of cols in the x member267 psS32 p_ps_yRows; ///< Number of rows in the y member268 psS32 p_ps_yCols; ///< Number of cols in the y member269 double **x; ///< The grid of offsets in x270 double **y; ///< The grid of offsets in y271 }272 psFixedPattern;273 */274 275 276 /** Observatory Information277 *278 * A container for the observatory data that doesn't change per exposure.279 *280 */281 /*typedef struct282 {283 const char* name; ///< Name of observatory284 const double latitude; ///< Latitude of observatory, east positive (degrees?)285 const double longitude; ///< Longitude of observatory (degrees?)286 const double height; ///< Height of observatory in meters287 const double tlr; ///< Tropospheric Lapse Rate288 }289 psObservatory;290 */291 292 /** Exposure Information293 *294 * Several quantities from the telescope in order to make a first guess at295 * the astrometric solution. From these quantities, further quantities can296 * be derivedand stored for later use.297 *298 */299 /*typedef struct psExposure300 {301 const double ra; ///< Telescope boresight, right ascention302 const double dec; ///< Telescope boresight, declination303 const double hourAngle; ///< Hour angle304 const double zenithDistance; ///< Zenith distance305 const double azimuth; ///< Azimuth306 const psTime* time; ///< Time of observation307 const float rotAngle; ///< Rotator position angle in degrees? XXX: see bug#209308 const float temperature; ///< Air temperature in Kelvin309 const float pressure; ///< Air pressure in mB310 const float humidity; ///< Relative humidity, for refraction311 const float exposureTime; ///< Exposure time312 const float wavelength; ///< Wavelength in microns313 const psObservatory* observatory; ///< Observatory data314 315 // Derived quantities316 const double lst; ///< Local Sidereal Time317 const float positionAngle; ///< Position angle318 const float parallacticAngle; ///< Parallactic angle319 const float airmass; ///< Airmass, calculated from zenith distance320 const float parallacticFactor; ///< Parallactic factor321 const char* cameraName; ///< name of camera which provided exposure322 const char* telescopeName; ///< name of telescope which provided exposure323 }324 psExposure;325 */326 327 /** Allocator for psFixedPattern struct328 *329 * Allocates a new psFixedPattern struct with the attributes coorsponding330 * to the parameters set to the said input values.331 *332 * @return psFixedPattern* New psFixedPattern struct.333 */334 /*psFixedPattern* psFixedPatternAlloc(335 double x0, ///< X Position of 0,0 corner on focal plane336 double y0, ///< Y Position of 0,0 corner on focal plane337 double xScale, ///< Scale of the grid in x direction338 double yScale, ///< Scale of the grid in x direction339 const psImage *x, ///< The grid of offsets in x340 const psImage *y ///< The grid of offsets in y341 );342 */343 344 /** Allocator for psExposure345 *346 * We need several quantities from the telescope in order to make a first347 * guess at the astrometric solution. From these quantities, further348 * quantities can be derived and stored for later use.349 *350 * @return psExposure* New psExposure struct351 */352 /*psExposure* psExposureAlloc(353 double ra, ///< Telescope boresight, right ascention354 double dec, ///< Telescope boresight, declination355 double hourAngle, ///< Hour angle356 double zenithDistance, ///< Zenith distance357 double azimuth, ///< Azimuth358 const psTime* time, ///< time of observation359 float rotAngle, ///< Rotator position angle360 float temperature, ///< Temperature361 float pressure, ///< Pressure362 float humidity, ///< Relative humidity363 float exposureTime, ///< Exposure time364 float wavelength, ///< wavelength365 const psObservatory* observatory ///< Observatory data366 );367 */368 369 /** Allocator for psObservatory370 *371 * This function shall construct a new psObservatory with attributes372 * cooresponding to the function parameters.373 *374 * @return psObservatory* new psObservatory struct375 */376 /*psObservatory* psObservatoryAlloc(377 const char* name, ///< Name of observatory378 double latitude, ///< Latitude of observatory, east positive379 double longitude, ///< Longitude of observatory380 double height, ///< Height of observatory381 double tlr ///< Tropospheric Lapse Rate382 );383 */384 385 /** Allocates a Wallace's Grommit structure.386 *387 * The psGrommit is calculated from telescope information for the particular388 * exposure.389 *390 * @return psGrommit* New grommit structure.391 */392 /*psGrommit* psGrommitAlloc(393 const psExposure* exp ///< the cooresponding exposure structure.394 );395 */396 397 238 /** Find cooresponding cell for given FPA coordinate 398 239 * 399 * @return p sCell* the cell cooresponding to the coord in FPA400 */ 401 /*psCell* psCellInFPA(240 * @return pmCell* the cell cooresponding to the coord in FPA 241 */ 242 pmCell* pmCellInFPA( 402 243 const psPlane* coord, ///< the coordinate in FPA plane 403 const p sFPA* FPA ///< the FPA to search for the cell404 ); 405 */ 244 const pmFPA* FPA ///< the FPA to search for the cell 245 ); 246 406 247 407 248 /** Find cooresponding chip for given FPA coordinate 408 249 * 409 * @return p sChip* the chip cooresponding to coord410 */ 411 /*psChip* psChipInFPA(250 * @return pmChip* the chip cooresponding to coord 251 */ 252 pmChip* pmChipInFPA( 412 253 const psPlane* coord, ///< the coordinate in FPA plane 413 const p sFPA* FPA ///< the FPA to search for the cell414 ); 415 */ 254 const pmFPA* FPA ///< the FPA to search for the cell 255 ); 256 416 257 417 258 /** Find cooresponding cell for given Chip coordinate 418 259 * 419 * @return p sCell* the cell cooresponding to coord420 */ 421 /*psCell* psCellInChip(260 * @return pmCell* the cell cooresponding to coord 261 */ 262 pmCell* pmCellInChip( 422 263 const psPlane* coord, ///< the coordinate in Chip plane 423 const p sChip* chip ///< the chip to search for the cell424 ); 425 */ 264 const pmChip* chip ///< the chip to search for the cell 265 ); 266 426 267 427 268 /** Translate a cell coordinate into a chip coordinate … … 429 270 * @return psPlane* the resulting chip coordinate 430 271 */ 431 /*psPlane* psCoordCellToChip(272 psPlane* psCoordCellToChip( 432 273 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 433 274 const psPlane* in, ///< the coordinate within Cell 434 const p sCell* cell ///< the Cell in interest435 ); 436 */ 275 const pmCell* cell ///< the Cell in interest 276 ); 277 437 278 438 279 /** Translate a chip coordinate into a FPA coordinate … … 440 281 * @return psPlane* the resulting FPA coordinate 441 282 */ 442 /*psPlane* psCoordChipToFPA(283 psPlane* psCoordChipToFPA( 443 284 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 444 285 const psPlane* in, ///< the coordinate within Chip 445 const p sChip* chip ///< the chip in interest446 ); 447 */ 286 const pmChip* chip ///< the chip in interest 287 ); 288 448 289 449 290 /** Translate a FPA coordinate into a Tangent Plane coordinate … … 451 292 * @return psPlane* the resulting Tangent Plane coordinate 452 293 */ 453 /*psPlane* psCoordFPAToTP(294 psPlane* psCoordFPAToTP( 454 295 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 455 296 const psPlane* in, ///< the coordinate within FPA 456 297 double color, ///< Color of source 457 298 double magnitude, ///< Magnitude of source 458 const p sFPA* fpa ///< the FPA in interest459 ); 460 */ 299 const pmFPA* fpa ///< the FPA in interest 300 ); 301 461 302 462 303 /** Translate a Tangent Plane coordinate into a Sky coordinate … … 464 305 * @return psSphere* the resulting Sky coordinate 465 306 */ 466 /*psSphere* psCoordTPToSky(307 psSphere* psCoordTPToSky( 467 308 psSphere* out, ///< a sphere struct to recycle. If NULL, a new struct is created 468 const psPlane* in, ///< the coordinate within Tangent Plane 469 const psGrommit* grommit ///< the grommit of the tangent plane 470 ); 471 */ 309 const psPlane* in, ///< the coordinate within Tangent Plane 310 const psProjection *projection 311 ); 472 312 473 313 /** Translate a cell coordinate into a FPA coordinate … … 475 315 * @return psPlane* the resulting FPA coordinate 476 316 */ 477 /*psPlane* psCoordCellToFPA(317 psPlane* psCoordCellToFPA( 478 318 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 479 319 const psPlane* in, ///< the coordinate within cell 480 const p sCell* cell ///< the cell in interest481 ); 482 */ 320 const pmCell* cell ///< the cell in interest 321 ); 322 483 323 484 324 /** Translate a cell coordinate into a Sky coordinate … … 486 326 * @return psSphere* the resulting Sky coordinate 487 327 */ 488 /*psSphere* psCoordCellToSky(328 psSphere* psCoordCellToSky( 489 329 psSphere* out, ///< a sphere struct to recycle. If NULL, a new struct is created 490 330 const psPlane* in, ///< the coordinate within cell 491 331 double color, ///< Color of source 492 332 double magnitude, ///< Magnitude of source 493 const p sCell* cell ///< the cell in interest494 ); 495 */ 333 const pmCell* cell ///< the cell in interest 334 ); 335 496 336 497 337 /** Translate a cell coordinate into a Sky coordinate using a 'quick and … … 500 340 * @return psSphere* the resulting Sky coordinate 501 341 */ 502 /*psSphere* psCoordCellToSkyQuick(342 psSphere* psCoordCellToSkyQuick( 503 343 psSphere* out, ///< a sphere struct to recycle. If NULL, a new struct is created 504 344 const psPlane* in, ///< the coordinate within cell 505 const p sCell* cell ///< the cell in interest506 ); 507 */ 345 const pmCell* cell ///< the cell in interest 346 ); 347 508 348 509 349 /** Translate a Sky coordinate into a Tangent Plane coordinate … … 511 351 * @return psPlane* the resulting Tangent Plane coordinate 512 352 */ 513 /*psPlane* psCoordSkyToTP(353 psPlane* psCoordSkyToTP( 514 354 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 515 355 const psSphere* in, ///< the sky coordinate 516 const psGrommit* grommit ///< the grommit 517 ); 518 */ 356 const psProjection *projection 357 ); 519 358 520 359 /** Translate a Tangent Plane coordinate into a FPA coordinate … … 522 361 * @return psPlane* the resulting FPA coordinate 523 362 */ 524 /*psPlane* psCoordTPToFPA(363 psPlane* psCoordTPToFPA( 525 364 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 526 365 const psPlane* in, ///< the coordinate within tangent plane 527 366 double color, ///< Color of source 528 367 double magnitude, ///< Magnitude of source 529 const p sFPA* fpa ///< the FPA of interest530 ); 531 */ 368 const pmFPA* fpa ///< the FPA of interest 369 ); 370 532 371 533 372 /** Translate a FPA coordinate into a chip coordinate … … 535 374 * @return psPlane* the resulting chip coordinate 536 375 */ 537 /*psPlane* psCoordFPAToChip(376 psPlane* psCoordFPAToChip( 538 377 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 539 378 const psPlane* in, ///< the FPA coordinate 540 const p sChip* chip ///< the chip of interest541 ); 542 */ 379 const pmChip* chip ///< the chip of interest 380 ); 381 543 382 544 383 /** Translate a chip coordinate into a cell coordinate … … 546 385 * @return psPlane* the resulting cell coordinate 547 386 */ 548 /*psPlane* psCoordChipToCell(387 psPlane* psCoordChipToCell( 549 388 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 550 389 const psPlane* in, ///< the Chip coordinate 551 const p sCell* cell ///< the cell of interest552 ); 553 */ 390 const pmCell* cell ///< the cell of interest 391 ); 392 554 393 555 394 /** Translate a sky coordinate into a cell coordinate … … 557 396 * @return psPlane* the resulting cell coordinate 558 397 */ 559 /*psPlane* psCoordSkyToCell(398 psPlane* psCoordSkyToCell( 560 399 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 561 400 const psSphere* in, ///< the Sky coordinate 562 double color,///< Color of source563 double magnitude,///< Magnitude of source564 const p sCell* cell ///< the cell of interest565 ); 566 */ 401 float color, ///< Color of source 402 float magnitude, ///< Magnitude of source 403 const pmCell* cell ///< the cell of interest 404 ); 405 567 406 568 407 /** Translate a sky coordinate into a cell coordinate using a 'quick and … … 571 410 * @return psPlane* the resulting cell coordinate 572 411 */ 573 /*psPlane* psCoordSkyToCellQuick(412 psPlane* psCoordSkyToCellQuick( 574 413 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 575 414 const psSphere* in, ///< the Sky coordinate 576 const p sCell* cell ///< the cell of interest577 ); 578 */ 415 const pmCell* cell ///< the cell of interest 416 ); 417 579 418 580 419 #endif // #ifndef PS_ASTROMETRY_H
Note:
See TracChangeset
for help on using the changeset viewer.
