Changeset 3564 for trunk/doc/pslib/psLibSDRS_Astrom.tex
- Timestamp:
- Mar 30, 2005, 11:14:48 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS_Astrom.tex (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS_Astrom.tex
r3181 r3564 270 270 \code{TRUE} if they are all correctly assigned, otherwise \code{FALSE}. 271 271 272 \subsubsection{ Coordinate Transformations}272 \subsubsection{Detector Coordinate Transformations} 273 273 274 274 \begin{figure} … … 322 322 \end{verbatim} 323 323 324 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 325 326 % add psExposure to metadata? 327 % add grommit to metadata? 328 % add photsystem data to metadata? 329 % add statistics to metadata? 330 331 \subsubsection{Observatory data} 324 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 325 326 \subsection{Astrometry} 327 328 Astrometry is a basic functionality required for the IPP that will be 329 used repeatedly, both for low-precision (roughly where is my favorite 330 object?) and high-precision (what is the proper motion of this star?). 331 As such, it must be flexible, yet robust. 332 333 \subsubsection{Coordinate frames} 334 \label{sec:coordinateFrames} 335 336 There are five coordinate frames that we need to worry about for the 337 purposes of astrometry: 338 \begin{itemize} 339 \item Cell: $(x,y)$ in pixels --- raw coordinates; 340 \item Chip: $(X,Y)$ in pixels --- the location on the silicon; 341 \item Focal Plane: $(p,q)$ in microns --- the location on the focal plane; 342 \item Tangent Plane: $(l,m)$ in arcsec from the telescope boresight; and 343 \item Sky: (RA,Dec) --- ICRS. 344 \end{itemize} 345 346 The following steps are required to convert from the cell coordinates to 347 the sky: 348 \begin{itemize} 349 \item Cell $\longleftrightarrow$ Chip: two 2D polynomials, $(X,Y) = f(x,y)$; 350 \item Chip $\longleftrightarrow$ FP: two 2D polynomials, $(p,q) = g(X,Y)$; 351 \item FP $\longleftrightarrow$ TP: two 4D polynomials, $(l,m) = 352 h(p,q,m,c)$, where $m$ and $c$ are the magnitude and color of the 353 object, respectively; and 354 \item TP $\longleftrightarrow$ Sky: transformation to the sky using 355 pre-computed coefficients for each pointing. 356 \end{itemize} 357 358 Note that the transformation between the Focal Plane and the Tangent 359 Plane is a four-dimensional polynomial, in order to account for any 360 possible dependencies in the astrometry on the stellar magnitude and 361 color; the former serves as a check for charge transfer 362 inefficiencies, while the latter will correct chromatic refraction, 363 both through the atmosphere and the corrector lenses. 364 365 We require structures to contain each of the above transformations as 366 well as the pixel data. 367 368 \subsubsection{Position Finding} 369 370 We require functions to return the structure containing given 371 coordinates. For example, we want the chip that corresponds to the 372 focal plane coordinates $(p,q) = (-1.234,+5.678)$. These routines 373 handle the one-to-many problem --- i.e., for one given focal plane 374 coordinate, there are many chips that this coordinate may be 375 correspond to; these functions will select the correct one. 376 % 377 \begin{verbatim} 378 psCell *psCellInFPA (const psPlane *coord, const psFPA *fpa); 379 psChip *psChipInFPA (const psPlane *coord, const psFPA *fpa); 380 psCell *psCellInChip(const psPlane *coord, const psChip *chip); 381 \end{verbatim} 382 383 \subsubsection{Conversion Functions} 384 385 We require functions to convert between the various coordinate frames 386 (Section~\ref{sec:coordinateFrames}). The hierarchy of the coordinate 387 frames and the transformations between each are shown in 388 Figure~\ref{fig:coco}. The functions that employ the transformations 389 are shown in Figure~\ref{fig:cocoFunc}. In addition to 390 transformations between each adjoining coordinate frame in the 391 hierarchy, we also require higher-level functions to convert between 392 the Cell and Sky coordinate frames; these will simply perform the 393 intermediate steps. 394 395 \begin{figure} 396 \psfig{file=coordinateFrames,height=7in,angle=-90} 397 \caption{The coordinate systems in the \PS{} IPP, and the relation 398 between each by transformations contained in the appropriate 399 structures.} 400 \label{fig:coco} 401 \end{figure} 402 403 \begin{figure} 404 \psfig{file=coordinateConv,height=7in,angle=-90} 405 \caption{Conversion between coordinate systems by PSLib.} 406 \label{fig:cocoFunc} 407 \end{figure} 408 409 We specify the following functions to convert between coordinates in 410 one type of frame to another type of frame. The first group consist 411 of unambiguous transformations: from the coordinates in a low-level 412 frame to the coordinates in the containing higher-level frame, of 413 which only one exists. In all of these functions, the output 414 coordinate structure may be \code{NULL} or may be supplied by the 415 calling function. In the former case, the structure must be 416 allocated; in the latter case, the supplied structure must be used. 417 418 \begin{verbatim} 419 psPlane *psCoordCellToChip (psPlane *out, const psPlane *in, const psCell *cell); 420 % astrometry comes from cell (no need for parent) 421 \end{verbatim} 422 which converts coordindates \code{in} on the specified \code{cell} to 423 the coordinates on the parent chip. 424 425 \begin{verbatim} 426 psPlane *psCoordChipToFPA (psPlane *out, const psPlane *in, const psChip *chip); 427 % astrometry comes from chip (no need for parent) 428 \end{verbatim} 429 which converts the coordinates \code{in} on the specified \code{chip} 430 to the coordinates on the parent FPA. 431 432 \begin{verbatim} 433 psPlane *psCoordFPAToTP(psPlane *out, const psPlane *in, float color, float mag, const psFPA *fpa); 434 % astrometry comes from FPA (no need for parent) 435 \end{verbatim} 436 which converts coordinates \code{in} on the specified focal plane 437 \code{fpa} to tangent plane coordinates, applying the appropriate 438 distortion terms. The \code{color} and magnitude (\code{mag}) of the 439 source is necessary in order to perform the distortion between the 440 focal plane and the tangent plane. 441 442 \begin{verbatim} 443 psSphere *psCoordTPToSky(psSphere *out, const psPlane *in, const psGrommit *grommit); 444 \end{verbatim} 445 which converts the tangent plane coordinates \code{in} to (RA,Dec) on 446 the sky, based on the environmental information specified by 447 \code{grommit}. 448 449 % astrometry comes from cell 450 \begin{verbatim} 451 psPlane *psCoordCellToFPA(psPlane *out, const psPlane *in, const psCell *cell); 452 \end{verbatim} 453 which performs the single-step conversion between Cell coordinates 454 \code{in} and FPA coordinates. 455 456 % astrometry comes from cell,chip,fpa (PARENT IS NEEDED HERE) 457 \begin{verbatim} 458 psSphere *psCoordCellToSky(psSphere *out, const psPlane *in, float color, float mag, const psCell *cell); 459 \end{verbatim} 460 which converts coordinates on the specified cell to (RA,Dec). This 461 transformation must be performed using the intermediate stage 462 transformations of Cell to Chip, Chip to FPA, FPA to Tangent Plane, 463 Tangent Plane to Sky. The information needed for each of these 464 transformations is available in the \code{.parent} elements of 465 \code{psCell} and \code{psChip}, and the \code{psFPA.exposure} 466 element. The \code{color} and magnitude (\code{mag}) of the source is 467 necessary in order to perform the distortion between the focal plane 468 and the tangent plane. 469 470 % astrometry comes from cell (no need for parent) 471 \begin{verbatim} 472 psSphere *psCoordCellToSkyQuick(psSphere *out, const psPlane *in, const psCell *cell); 473 \end{verbatim} 474 which uses the 'quick-and-dirty' transformation to convert coordinates 475 on the specified cell to (RA,Dec). This transformation should use the 476 locally linear transformation specified by the element 477 \code{psCell.toTP}. Although the accuracy of this transformation 478 is lower than the complete transformation above, the calculation is 479 substantially faster as it only involves linear transformations. 480 481 The following functions convert from high-level frames to the 482 coordinates of contained lower-level frames. 483 484 \begin{verbatim} 485 psPlane *psCoordSkyToTP(psPlane *out, const psSphere *in, const psGrommit *grommit); 486 \end{verbatim} 487 which converts (RA,Dec) coordinates \code{in} to tangent plane coords 488 based on the enviromental information supplied by \code{grommit}. 489 490 \begin{verbatim} 491 psPlane *psCoordTPToFPA(psPlane *out, const psPlane *in, float color, float mag, const psFPA *fpa); 492 \end{verbatim} 493 which converts the tangent plane coordinates \code{in} to focal plane 494 coordinates. The \code{color} and magnitude (\code{mag}) of the 495 source is necessary in order to perform the distortion between the 496 focal plane and the tangent plane. 497 498 \begin{verbatim} 499 psPlane *psCoordFPAToChip (psPlane *out, const psPlane *in, const psChip *chip); 500 \end{verbatim} 501 which converts the specified FPA coordinates \code{in} to the 502 coordinates on the given Chip. The specified chip need not contain 503 the input coordinate. To find the chip which contains a particular 504 coordinate, the function \code{psChipInFPA}, defined above, should be 505 used. 506 507 \begin{verbatim} 508 psPlane *psCoordChipToCell (psPlane *out, const psPlane *in, const psCell *cell); 509 \end{verbatim} 510 which converts the specified Chip coordinate \code{in} to the 511 coordinate on the given Cell. The specified Cell need not contain the 512 input coordinate. To find the cell which contains a particular 513 coordinate, the function \code{psCellInChip}, defined above, should be 514 used. 515 516 \begin{verbatim} 517 psPlane *psCoordSkyToCell(psPlane *out, const psSphere *in, float color, float mag, psCell *cell); 518 \end{verbatim} 519 which directly converts (RA,Dec) \code{in} to coordinates on the 520 specified cell. The specified cell need not contain the input 521 coordinates. The \code{color} and magnitude (\code{mag}) of the 522 source is necessary in order to perform the distortion between the 523 focal plane and the tangent plane. 524 525 \begin{verbatim} 526 psPlane *psCoordSkyToCellQuick(psPlane *out, const psSphere *in, psCell *cell); 527 \end{verbatim} 528 which directly converts (RA,Dec) \code{in} to coordinates on the 529 specified cell. The specified cell need not contain the input 530 coordinates. This transformation should use the locally linear 531 transformation specified by the element \code{psCell.toTP}. 532 Although the accuracy of this transformation is lower than the 533 complete transformation above, the calculation is substantially faster 534 as it only involves linear transformations. 535 536 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 537 538 \subsection{Astrometry and World Coordinate System} 539 540 The FITS World Coordinate System (WCS) headers are commonly employed 541 with astronomical images in order to relate pixels to celestial (or 542 otherwise) coordinates. Since it is a FITS standard, we must be able 543 to read and write from WCS into our internal format. For the time 544 being, we will consider only celestial WCS (i.e., no spectral 545 wavelength calibrations, etc). Because WCS does not support the 546 multiple layers that we have built for \PS{}, we will use a simple 547 internal representation: a transformation, which handles any 548 distortions (i.e., goes directly from the coordinate frame of the 549 image to the tangent plane); and the projection. 550 551 \begin{verbatim} 552 bool psAstrometryReadWCS(psPlaneTransform **transform, // Output transformation 553 psProjection **projection, // Output projection 554 psMetadata *header // Input FITS header 555 ); 556 bool psAstrometryWriteWCS(psMetadata *header, // Output FITS header 557 psPlaneTransform *transform, // Input transformation 558 psProjection *projection, // Input projection 559 double color, // Mean color to use 560 double magnitude, // Mean magnitude to use 561 ); 562 bool psAstrometrySimplify(psPlaneTransform **transform, // Output transformation 563 psProjection **projection, // Output projection 564 psCell *cell // Cell for which to generate transform and projection 565 ); 566 \end{verbatim} 567 568 \code{pmReadAstrometry} shall parse the specified FITS \code{header}, 569 returning new instances of the \code{transform} and \code{projection} 570 that represent the WCS. The function shall return \code{true} if it 571 was able to successfully generate the outputs; otherwise it shall 572 return \code{false}. 573 574 \code{pmWriteAstrometry} shall add WCS keywords to the supplied FITS 575 \code{header} that implement the given \code{transform} and 576 \code{projection}. The function shall return \code{true} if it was 577 able to successfully generate the output; otherwise it shall return 578 \code{false}. 579 580 \code{pmSimplifyAstrometry} shall take a \code{cell} and simplify the 581 internal astrometric representation (\code{cell->toFPA} or equivalent, 582 \code{cell->parent->parent->toTangentPlane} and 583 \code{cell->parent->parent->grommit}) to a single \code{transform} and 584 \code{projection}. This allows the subsequent use of 585 \code{pmWriteAstrometry} in the case that we have only the 586 multi-layered \PS{} internal astrometric representation. The function 587 shall return \code{true} if it was able to successfully generate the 588 output; otherwise it shall return \code{false}. 589 590 \subsection{Observatory data} 332 591 333 592 We need a container for the observatory data that doesn't change per … … 350 609 \end{verbatim} 351 610 352 \subs ubsection{Exposure information}611 \subsection{Exposure information} 353 612 354 613 We need several quantities from the telescope in order to make a … … 388 647 \end{verbatim} 389 648 390 \subsubsection{Environmental Information}391 392 A-priori astrometric transformations between the tangent plane and the393 sky require several pieces of information describing the current394 environmental conditions. These quantities are consistent from image395 to image, and may vary only slowly with time. Pre-computing these396 quantities for exposures means that subsequent transformations are397 faster. The structure below carries the environment data of interest.398 For historical reasons, this structure is known colloquially as ``the399 Grommit''.400 401 \begin{verbatim}402 typedef struct {403 const double latitude; ///< geodetic latitude (radians)404 const double sinLat, cosLat; ///< sine and cosine of geodetic latitude405 const double abberationMag; ///< magnitude of diurnal aberration vector406 const double height; ///< height (HM)407 const double temperature; ///< ambient temperature (TDK)408 const double pressure; ///< pressure (PMB)409 const double humidity; ///< relative humidity (RH)410 const double wavelength; ///< wavelength (WL)411 const double lapseRate; ///< lapse rate (TLR)412 const double refractA, refractB; ///< refraction constants A and B (radians)413 const double longitudeOffset; ///< longitude + ... (radians)414 const double siderealTime; ///< local apparent sidereal time (radians)415 } psGrommit;416 \end{verbatim}417 418 The \code{psGrommit} is calculated from telescope information for the419 particular exposure, \code{exp}:420 \begin{verbatim}421 psGrommit *psGrommitAlloc(const psExposure *exp);422 \end{verbatim}423 424 \subsubsection{Fixed Pattern}425 426 The fixed pattern is a correction to the general astrometric solution427 formed by summing the residuals from many observations. The intent is428 to correct for higher-order distortions in the camera system on a429 coarse grid (larger than individual pixels, but smaller than a single430 cell). Hence, in addition to the offsets, we need to specify the size431 and scale of the grid in $x$ and $y$, as well as the origin of the432 grid.433 434 \begin{verbatim}435 typedef struct {436 int nX, nY; ///< Number of elements in x and y437 double x0, y0; ///< Position of 0,0 corner on focal plane438 double xScale, yScale; ///< Scale of the grid439 double **x, **y; ///< The grid of offsets in x and y440 } psFixedPattern;441 \end{verbatim}442 443 The constructor for \code{psFixedPattern} shall be:444 \begin{verbatim}445 psFixedPattern *psFixedPatternAlloc(double x0, double y0,446 double xScale, double yScale,447 const psImage *x, const psImage *y);448 \end{verbatim}449 Here, \code{x0}, \code{y0}, \code{xScale} and \code{yScale} have the450 same meaning as in the \code{psFixedPattern} structure. Note that the451 values of the fixed pattern offsets are specified as images, the452 values from which need to be copied into the \code{double **x} and453 \code{double **y} of \code{psFixedPattern}, and that the number of454 elements may be derived from the size of the images.455 456 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%457 458 \subsection{Astrometry}459 460 Astrometry is a basic functionality required for the IPP that will be461 used repeatedly, both for low-precision (roughly where is my favorite462 object?) and high-precision (what is the proper motion of this star?).463 As such, it must be flexible, yet robust. Accordingly, we will wrap464 the StarLink Astronomy Libraries (SLALib), which has already been465 developed. \tbd{SLAlib functions will be replaced in the next466 release}.467 468 \subsubsection{Coordinate frames}469 \label{sec:coordinateFrames}470 471 There are five coordinate frames that we need to worry about for the472 purposes of astrometry:473 \begin{itemize}474 \item Cell: $(x,y)$ in pixels --- raw coordinates;475 \item Chip: $(X,Y)$ in pixels --- the location on the silicon;476 \item Focal Plane: $(p,q)$ in microns --- the location on the focal plane;477 \item Tangent Plane: $(l,m)$ in arcsec from the telescope boresight; and478 \item Sky: (RA,Dec) --- ICRS.479 \end{itemize}480 481 The following steps are required to convert from the cell coordinates to482 the sky:483 \begin{itemize}484 \item Cell $\longleftrightarrow$ Chip: two 2D polynomials, $(X,Y) = f(x,y)$;485 \item Chip $\longleftrightarrow$ FP: two 2D polynomials, $(p,q) = g(X,Y)$;486 \item FP $\longleftrightarrow$ TP: two 4D polynomials, $(l,m) =487 h(p,q,m,c)$, where $m$ and $c$ are the magnitude and color of the488 object, respectively; and489 \item TP $\longleftrightarrow$ Sky: transformation to the sky using490 pre-computed coefficients for each pointing.491 \end{itemize}492 493 Note that the transformation between the Focal Plane and the Tangent494 Plane is a four-dimensional polynomial, in order to account for any495 possible dependencies in the astrometry on the stellar magnitude and496 color; the former serves as a check for charge transfer497 inefficiencies, while the latter will correct chromatic refraction,498 both through the atmosphere and the corrector lenses.499 500 We require structures to contain each of the above transformations as501 well as the pixel data.502 503 \subsubsection{Position Finding}504 505 We require functions to return the structure containing given506 coordinates. For example, we want the chip that corresponds to the507 focal plane coordinates $(p,q) = (-1.234,+5.678)$. These routines508 handle the one-to-many problem --- i.e., for one given focal plane509 coordinate, there are many chips that this coordinate may be510 correspond to; these functions will select the correct one.511 %512 \begin{verbatim}513 psCell *psCellInFPA (const psPlane *coord, const psFPA *fpa);514 psChip *psChipInFPA (const psPlane *coord, const psFPA *fpa);515 psCell *psCellInChip(const psPlane *coord, const psChip *chip);516 \end{verbatim}517 518 \subsubsection{Conversion Functions}519 520 We require functions to convert between the various coordinate frames521 (Section~\ref{sec:coordinateFrames}). The hierarchy of the coordinate522 frames and the transformations between each are shown in523 Figure~\ref{fig:coco}. The functions that employ the transformations524 are shown in Figure~\ref{fig:cocoFunc}. In addition to525 transformations between each adjoining coordinate frame in the526 hierarchy, we also require higher-level functions to convert between527 the Cell and Sky coordinate frames; these will simply perform the528 intermediate steps.529 530 \begin{figure}531 \psfig{file=coordinateFrames,height=7in,angle=-90}532 \caption{The coordinate systems in the \PS{} IPP, and the relation533 between each by transformations contained in the appropriate534 structures.}535 \label{fig:coco}536 \end{figure}537 538 \begin{figure}539 \psfig{file=coordinateConv,height=7in,angle=-90}540 \caption{Conversion between coordinate systems by PSLib.}541 \label{fig:cocoFunc}542 \end{figure}543 544 We specify the following functions to convert between coordinates in545 one type of frame to another type of frame. The first group consist546 of unambiguous transformations: from the coordinates in a low-level547 frame to the coordinates in the containing higher-level frame, of548 which only one exists. In all of these functions, the output549 coordinate structure may be \code{NULL} or may be supplied by the550 calling function. In the former case, the structure must be551 allocated; in the latter case, the supplied structure must be used.552 553 \begin{verbatim}554 psPlane *psCoordCellToChip (psPlane *out, const psPlane *in, const psCell *cell);555 % astrometry comes from cell (no need for parent)556 \end{verbatim}557 which converts coordindates \code{in} on the specified \code{cell} to558 the coordinates on the parent chip.559 560 \begin{verbatim}561 psPlane *psCoordChipToFPA (psPlane *out, const psPlane *in, const psChip *chip);562 % astrometry comes from chip (no need for parent)563 \end{verbatim}564 which converts the coordinates \code{in} on the specified \code{chip}565 to the coordinates on the parent FPA.566 567 \begin{verbatim}568 psPlane *psCoordFPAToTP(psPlane *out, const psPlane *in, float color, float mag, const psFPA *fpa);569 % astrometry comes from FPA (no need for parent)570 \end{verbatim}571 which converts coordinates \code{in} on the specified focal plane572 \code{fpa} to tangent plane coordinates, applying the appropriate573 distortion terms. The \code{color} and magnitude (\code{mag}) of the574 source is necessary in order to perform the distortion between the575 focal plane and the tangent plane.576 577 \begin{verbatim}578 psSphere *psCoordTPToSky(psSphere *out, const psPlane *in, const psGrommit *grommit);579 \end{verbatim}580 which converts the tangent plane coordinates \code{in} to (RA,Dec) on581 the sky, based on the environmental information specified by582 \code{grommit}.583 584 \begin{verbatim}585 psPlane *psCoordCellToFPA(psPlane *out, const psPlane *in, const psCell *cell);586 % astrometry comes from cell587 \end{verbatim}588 which performs the single-step conversion between Cell coordinates589 \code{in} and FPA coordinates.590 591 \begin{verbatim}592 psSphere *psCoordCellToSky(psSphere *out, const psPlane *in, float color, float mag, const psCell *cell);593 % astrometry comes from cell,chip,fpa (PARENT IS NEEDED HERE)594 \end{verbatim}595 which converts coordinates on the specified cell to (RA,Dec). This596 transformation must be performed using the intermediate stage597 transformations of Cell to Chip, Chip to FPA, FPA to Tangent Plane,598 Tangent Plane to Sky. The information needed for each of these599 transformations is available in the \code{.parent} elements of600 \code{psCell} and \code{psChip}, and the \code{psFPA.exposure}601 element. The \code{color} and magnitude (\code{mag}) of the source is602 necessary in order to perform the distortion between the focal plane603 and the tangent plane.604 605 \begin{verbatim}606 psSphere *psCoordCellToSkyQuick(psSphere *out, const psPlane *in, const psCell *cell);607 % astrometry comes from cell (no need for parent)608 \end{verbatim}609 which uses the 'quick-and-dirty' transformation to convert coordinates610 on the specified cell to (RA,Dec). This transformation should use the611 locally linear transformation specified by the element612 \code{psCell.toTP}. Although the accuracy of this transformation613 is lower than the complete transformation above, the calculation is614 substantially faster as it only involves linear transformations.615 616 The following functions convert from high-level frames to the617 coordinates of contained lower-level frames.618 619 \begin{verbatim}620 psPlane *psCoordSkyToTP(psPlane *out, const psSphere *in, const psGrommit *grommit);621 \end{verbatim}622 which converts (RA,Dec) coordinates \code{in} to tangent plane coords623 based on the enviromental information supplied by \code{grommit}.624 625 \begin{verbatim}626 psPlane *psCoordTPToFPA(psPlane *out, const psPlane *in, float color, float mag, const psFPA *fpa);627 \end{verbatim}628 which converts the tangent plane coordinates \code{in} to focal plane629 coordinates. The \code{color} and magnitude (\code{mag}) of the630 source is necessary in order to perform the distortion between the631 focal plane and the tangent plane.632 633 \begin{verbatim}634 psPlane *psCoordFPAToChip (psPlane *out, const psPlane *in, const psChip *chip);635 \end{verbatim}636 which converts the specified FPA coordinates \code{in} to the637 coordinates on the given Chip. The specified chip need not contain638 the input coordinate. To find the chip which contains a particular639 coordinate, the function \code{psChipInFPA}, defined above, should be640 used.641 642 \begin{verbatim}643 psPlane *psCoordChipToCell (psPlane *out, const psPlane *in, const psCell *cell);644 \end{verbatim}645 which converts the specified Chip coordinate \code{in} to the646 coordinate on the given Cell. The specified Cell need not contain the647 input coordinate. To find the cell which contains a particular648 coordinate, the function \code{psCellInChip}, defined above, should be649 used.650 651 \begin{verbatim}652 psPlane *psCoordSkyToCell(psPlane *out, const psSphere *in, float color, float mag, psCell *cell);653 \end{verbatim}654 which directly converts (RA,Dec) \code{in} to coordinates on the655 specified cell. The specified cell need not contain the input656 coordinates. The \code{color} and magnitude (\code{mag}) of the657 source is necessary in order to perform the distortion between the658 focal plane and the tangent plane.659 660 \begin{verbatim}661 psPlane *psCoordSkyToCellQuick(psPlane *out, const psSphere *in, psCell *cell);662 \end{verbatim}663 which directly converts (RA,Dec) \code{in} to coordinates on the664 specified cell. The specified cell need not contain the input665 coordinates. This transformation should use the locally linear666 transformation specified by the element \code{psCell.toTP}.667 Although the accuracy of this transformation is lower than the668 complete transformation above, the calculation is substantially faster669 as it only involves linear transformations.670 671 \subsubsection{Additional functions}672 673 We require additional functions to perform general functions which674 will be useful for astrometry. Given coordinates on the sky, we675 need to get the airmass, the parallactic angle, and an estimate of676 the atmospheric refraction.677 678 \begin{verbatim}679 float psGetAirmass(const psSphere *coord, psTime *lst, float height);680 \end{verbatim}681 which returns the airmass for a given position and local sidereal time682 (\code{lst}).683 684 \begin{verbatim}685 float psGetParallactic(const psSphere *coord, double siderealTime);686 \end{verbatim}687 which returns the parallactic angle for a given position and sidereal time.688 689 \begin{verbatim}690 float psGetRefraction(float colour, ///< Colour of object691 psPhotSystem colorPlus, ///< Colour reference692 psPhotSystem colorMinus, ///< Colour reference693 const psExposure *exp); ///< Telescope pointing information694 \end{verbatim}695 which provides an estimate of the atmospheric refraction, along the parallactic angle.696 697 \begin{verbatim}698 double psGetParallaxFactor(const psExposure *exp)699 \end{verbatim}700 Calculate the parallax factor for the given exposure. \tbd{Why do we need this?}.701 702 703 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%704 705 \subsection{Astrometry and World Coordinate System}706 707 The FITS World Coordinate System (WCS) headers are commonly employed708 with astronomical images in order to relate pixels to celestial (or709 otherwise) coordinates. Since it is a FITS standard, we must be able710 to read and write from WCS into our internal format. For the time711 being, we will consider only celestial WCS (i.e., no spectral712 wavelength calibrations, etc). Because WCS does not support the713 multiple layers that we have built for \PS{}, we will use a simple714 internal representation: a transformation, which handles any715 distortions (i.e., goes directly from the coordinate frame of the716 image to the tangent plane); and the projection.717 718 \begin{verbatim}719 bool psAstrometryReadWCS(psPlaneTransform **transform, // Output transformation720 psProjection **projection, // Output projection721 psMetadata *header // Input FITS header722 );723 bool psAstrometryWriteWCS(psMetadata *header, // Output FITS header724 psPlaneTransform *transform, // Input transformation725 psProjection *projection, // Input projection726 double color, // Mean color to use727 double magnitude, // Mean magnitude to use728 );729 bool psAstrometrySimplify(psPlaneTransform **transform, // Output transformation730 psProjection **projection, // Output projection731 psCell *cell // Cell for which to generate transform and projection732 );733 \end{verbatim}734 735 \code{pmReadAstrometry} shall parse the specified FITS \code{header},736 returning new instances of the \code{transform} and \code{projection}737 that represent the WCS. The function shall return \code{true} if it738 was able to successfully generate the outputs; otherwise it shall739 return \code{false}.740 741 \code{pmWriteAstrometry} shall add WCS keywords to the supplied FITS742 \code{header} that implement the given \code{transform} and743 \code{projection}. The function shall return \code{true} if it was744 able to successfully generate the output; otherwise it shall return745 \code{false}.746 747 \code{pmSimplifyAstrometry} shall take a \code{cell} and simplify the748 internal astrometric representation (\code{cell->toFPA} or equivalent,749 \code{cell->parent->parent->toTangentPlane} and750 \code{cell->parent->parent->grommit}) to a single \code{transform} and751 \code{projection}. This allows the subsequent use of752 \code{pmWriteAstrometry} in the case that we have only the753 multi-layered \PS{} internal astrometric representation. The function754 shall return \code{true} if it was able to successfully generate the755 output; otherwise it shall return \code{false}.756
Note:
See TracChangeset
for help on using the changeset viewer.
