IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1583


Ignore:
Timestamp:
Aug 18, 2004, 4:45:14 PM (22 years ago)
Author:
eugene
Message:

bugzilla mods, projection fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/psLibADD.tex

    r1560 r1583  
    1 %%% $Id: psLibADD.tex,v 1.28 2004-08-17 03:30:07 eugene Exp $
     1%%% $Id: psLibADD.tex,v 1.29 2004-08-19 02:45:14 eugene Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    897897\subsubsection{Celestial Coordinate Conversions}
    898898
     899Changes between spherical coordinate systems (ie, Ecliptic, Galactic,
     900and ICRS, or Celestial, coordinates) is equivalent to a rotation in
     9013D.  Given two coordinate system, $\alpha,\delta$ and $\phi,\theta$
     902which differ by only a rotation, the transformation between these two
     903systems are defined by the following three parameters:
     904\begin{itemize}
     905\item $\alpha_p$ : the longitude of the target system pole in the
     906  source system
     907\item $\delta_p$ : the latitutde of the target system pole in the
     908  source system. 
     909\item $\phi_p$ : the longitude of the ascending node in the target system
     910\end{itemize}
     911Note that $\theta_p$, the latitude of the source system pole in the
     912target system, is equal to $\delta_p$ by symmetry.
     913
     914The relevant trigonometric relationships are:
     915\begin{eqnarray}
     916\sin \theta                        = \cos \delta \sin \delta_p \sin (\alpha - \alpha_p) + \sin \delta \cos \delta_p
     917\cos \theta \sin (\phi - \phi_p)   = \cos \delta \cos \delta_p \sin (\alpha - \alpha_p) - \sin \delta \sin \delta_p
     918\cos \theta \cos (\phi - \phi_p)   = \cos \delta \cos (\alpha - \alpha_p)
     919\end{eqnarray}
     920%
     921and for the inverse transformations, the equivalent relationships are:
     922%
     923\begin{eqnarray}
     924\sin \delta                          & = & \cos \theta \sin \delta_p \sin (\phi - \phi_p) + \sin \theta \cos \delta_p \\
     925\cos \delta \sin (\alpha - \alpha_p) & = & \cos \theta \cos \delta_p \sin (\phi - \phi_p) - \sin \theta \sin \delta_p \\
     926\cos \delta \cos (\alpha - \alpha_p) & = & \cos \theta \cos (\phi - \phi_p)
     927\end{eqnarray}
     928%
     929Since $\theta$ and $\delta$ have domains of $-\pi/2, \pi/2$, the value
     930of these angles are found by applying the arcsin to the sine of these
     931angles ($\theta = \arcsin \sin \theta$) which is always single-valued
     932and defined.  The value of $\alpha$ (or $\phi$) is found from
     933\code{atan2(y,x)}, where $y = \cos \delta \sin (\alpha - \alpha_p)$ and
     934$x = \cos \delta \cos (\alpha - \alpha_p)$.   
     935
     936\paragraph{Galactic to ICRS}
     937
     938\tbd{clean up these values - the transformations above need to be
     939  checked for pole vs node coords}
     940
     941\begin{verbatim}
     942*  P = 192.25       RA of galactic north pole (mean B1950.0)
     943*  Q =  62.6        inclination of galactic to mean B1950.0 equator
     944*  R =  33          longitude of ascending node
     945
     946We should precess L2,B2 coords from B1950 to epoch of interest
     947
     948265.600000 -28.916667 (B1950)
     949192.250000  27.400000 (B1950)
     950
     951266.394165 -28.936098 (J2000)
     952192.859536  27.128309 (J2000)
     953\end{verbatim}
     954
    899955These will be implemented using the corresponding SLALIB functions:
    900956
     
    912968\subsubsection{Projections}
    913969
    914 The following information is from
     970We implement three types of projections: {\em zenithal}, {\em
     971cylindrical} and {\em pseudocylindrical}, each requiring slightly
     972different handling.  Our representations are based on the treatment of
     973projections presented by
    915974\href{http://www.cv.nrao.edu/fits/documents/wcs/wcs.all.ps}{Greisen \&
    916 Calabretta (1995, ADASS, 4, 233)}.
    917 
    918 Let the latitude be $\phi$ and the longitude $\theta$.  The domains of
    919 these are $-\pi < \phi \le \pi$ and $-\pi/2 \le \theta \le \pi/2$.
    920 
    921 For zenithal projections (e.g.\ Gnomonic and Orthographic) the
    922 following hold:
    923 
    924 \begin{eqnarray}
    925 x & = & R \sin (\phi) \\
    926 y & = & -R \cos (\phi)
    927 \end{eqnarray}
    928 
    929 and
    930 
    931 \begin{eqnarray}
    932 R & = & \sqrt{x^2 + y^2} \\
    933 \phi & = & {\rm arg} (-y,x)
    934 \end{eqnarray}
    935 
    936 \paragraph{Gnomonic}
    937 
    938 The Gnomonic projection (``TAN'') is a zenithal projection.
    939 
    940 \begin{eqnarray}
    941 R & = & \cot (\theta) 180^\circ/\pi \\
    942 \theta & = & \arctan (180^\circ/(\pi R))
    943 \end{eqnarray}
    944 
    945 \paragraph{Orthographic}
    946 
    947 The Orthographic projection (``SIN'') is a zenithal projection.
    948 
    949 \begin{eqnarray}
    950 R & = & \cos (\theta) 180^\circ/\pi \\
    951 \theta & = & \arccos (\pi R / 180^\circ)
    952 \end{eqnarray}
    953 
    954 \paragraph{Cartesian}
    955 
    956 The Cartesian projection (``CAR'') is a very simple cylindrical projection.
     975Calabretta (1995, ADASS, 4, 233)}.  In all of these projections, we
     976are converting from a spherical coordinate $\alpha,\delta$ to a linear
     977(2-D) coordinate $x_p,y_p$.  The projection is defined by the
     978projection type, the projection center ($\alpha_p, \delta_p$) and the
     979the plate scales in the $x_p$ and $y_p$ directions ($\rho_x,\rho_y$).
     980
     981In the structure, \code{psProjection}, the projection type is defined
     982by the element \code{type}, the projection center $\alpha_p,\delta_p$
     983is defined by the elements \code{R,D}, and the plate scales,
     984$\rho_x,\rho_y$, are defined by the elements \code{Xs,Ys}.  The plate
     985scales are applied independently to the $x$ and $y$ coordinates to
     986convert them to the corresponding linear units (ie, pixels):
     987%
     988\begin{eqnarray}
     989x_p & = & \rho_x x \\
     990y_p & = & \rho_y y \\
     991\end{eqnarray}
     992%
     993In the discussions below, we ignore this last step (or first step,
     994depending on the direction of the conversion).
     995
     996\paragraph{Zenithal Projections}
     997
     998The {\em zenithal} projections are defined relative to a set of
     999spherical coordinates with pole at the center of the projection
     1000($\alpha_p, \delta_p$), and which thus represents a coordinate system
     1001rotated relative to the coordinate system of $\alpha, \delta$.  In
     1002this spherical coordinate system, the coordinate of longitude is
     1003labeled $\phi$, and has domain of $-\pi < \phi \le \pi$, while the
     1004latitude, measured from the pole, is labeled $\theta$ and has domain
     1005$0 \le \theta \le \pi$.  The coordinate frame of $\phi,\theta$ is
     1006defined so that $\phi_p$, the longitude of the target system pole, is
     10070.0.
     1008
     1009For an arbitrary projection center, it is necessary to convert the
     1010spherical coordinates to be projected ($\alpha,\delta$) to the
     1011projection spherical coordinate system coordinates ($\phi, \theta$).
     1012In practice, we construct the following useful trigonometric
     1013relationships between $\phi$ and $\theta$ which may be employed in the
     1014equations of $x,y$ below:
     1015%
     1016\begin{eqnarray}
     1017\sin \theta           & = & \sin \delta \sin \delta_p + \cos \delta \cos \delta_p \cos (\alpha - \alpha_p) \\
     1018\cos \theta \cos \phi & = & \sin \delta \cos \delta_p - \cos \delta \sin \delta_p \cos (\alpha - \alpha_p) \\
     1019\cos \theta \sin \phi & = & - \cos \delta \sin (\alpha - \alpha_p)
     1020\end{eqnarray}
     1021%
     1022For the inverse transformations, the equivalent relationships are:
     1023%
     1024\begin{eqnarray}
     1025\sin \delta                          & = & \sin \theta \sin \delta_p + \cos \theta \cos \delta_p \cos \phi \\
     1026\cos \delta \cos (\alpha - \alpha_p) & = & \sin \theta \cos \delta_p - \cos \theta \sin \delta_p \cos \phi \\
     1027\cos \delta \sin (\alpha - \alpha_p) & = & - \cos \theta \sin \phi
     1028\end{eqnarray}
     1029%
     1030For zenithal projections, the linear coordinates are related to
     1031$\phi,\theta$ by:
     1032%
     1033\begin{eqnarray}
     1034x & = & R_\theta \sin \phi \\
     1035y & = & -R_\theta \cos \phi
     1036\end{eqnarray}
     1037%
     1038and the inverse:
     1039%
     1040\begin{eqnarray}
     1041R_\theta & = & \sqrt{x^2 + y^2} \\
     1042\phi     & = & {\rm arg} (-y,x)
     1043\end{eqnarray}
     1044%
     1045The coordinates $x,y$ above are defined to be in angular units (ie,
     1046radians). 
     1047
     1048From these relationships, we can calculate $\alpha, \delta$ as:
     1049%
     1050\begin{eqnarray}
     1051\alpha - \alpha_p & = & \arctan (\sin \alpha, \cos \alpha) \\
     1052\delta            & = & \arcsin (\sin \delta) \\
     1053\end{eqnarray}
     1054%
     1055Note that if $(x,y) = (0,0)$, then $\alpha = \alpha_p, \delta = \delta_p$.
     1056
     1057\subparagraph{Gnomonic}
     1058
     1059The Gnomonic projection (``TAN'') is a zenithal projection with
     1060$R_\theta = \cot \theta$.  The resulting relationships for $(x,y)$ and
     1061for $\sin \theta, \cos \theta$ are:
     1062
     1063\begin{eqnarray}
     1064x           & = & \frac{\cos \theta \sin \phi}{\sin \theta} \\
     1065y           & = & \frac{-\cos \theta \cos \phi}{\sin \theta} \\
     1066\sin \theta & = & \zeta / \sqrt{1 + \zeta^2} \\
     1067\cos \theta & = & 1 / \sqrt{1 + \zeta^2} \\
     1068\end{eqnarray}
     1069
     1070where $\zeta = 1 / R_\theta$.
     1071
     1072\subparagraph{Orthographic}
     1073
     1074The Orthographic projection (``SIN'') is a zenithal projection with
     1075$R_\theta = \cos \theta$.  The resulting relationships for $(x,y)$ and
     1076for $\sin \theta, \cos \theta$ are:
     1077
     1078\begin{eqnarray}
     1079x           & = & \cos \theta \sin \phi \\
     1080y           & = & -\cos \theta \cos \phi \\
     1081\sin \theta & = & \sqrt{1 - R_\theta^2} \\
     1082\cos \theta & = & R_\theta \\
     1083\end{eqnarray}
     1084
     1085\paragraph{Cylindrical and Pseudocylindrical Projections}
     1086
     1087The {\em cylindrical} and {\em pseudocylindrical} projections are
     1088defined relative to a set of cylindrical coordinates whose pole is
     1089coincident with the pole of the spherical coordinates.  These
     1090projections are particularly used for full-sky representations, and
     1091are only defined for projection centers with $\delta_p = 0$.  In this
     1092spherical coordinate system, the coordinate of longitude is labeled
     1093$\phi$, and has domain of $-\pi < \phi \le \pi$, while the latitude,
     1094measured from the pole, is labeled $\theta$ and has domain $0 \le
     1095\theta \le \pi$.  The projection center longitude, $\alpha_p$
     1096corresponds to $\phi = 0$, thus the value of $\phi$ is determined as
     1097$\alpha - \alpha_p$ for all such projections.
     1098
     1099\subparagraph{Cartesian}
     1100
     1101The Cartesian projection (``CAR'') is a very simple cylindrical
     1102projection with the following relationships between $x,y$ and
     1103$\phi,\theta$:
    9571104
    9581105\begin{eqnarray}
     
    9611108\end{eqnarray}
    9621109
    963 \paragraph{Mercator}
     1110\subparagraph{Mercator}
    9641111
    9651112The Mercator projection (``MER'') is a cylindrical projection.
     
    9671114\begin{eqnarray}
    9681115x & = & \phi \\
    969 y & = & \ln \left( \tan (45^\circ + \theta/2) \right) 180^\circ/\pi \\
    970 {\rm and}\hspace{1cm} \theta & = & 2 \arctan \left( e^{y\pi/180^\circ} \right) - 90^\circ
    971 \end{eqnarray}
    972 
    973 \paragraph{Hammer-Aitoff}
    974 
    975 The Hammer-Aitoff projection is a general projection, and is defined:
    976 
    977 \begin{eqnarray}
    978 x & = & 2 \alpha \cos (\theta) \sin (\phi/2) \\
    979 y & = & \alpha \sin \theta \\
    980 {\rm where}\hspace{1cm} \alpha^{-1} & \equiv & (180^\circ/\pi) \sqrt{\left(1 + \cos (\theta) \cos (\phi/2) \right) / 2}
     1116y & = & \ln \left( \tan (\pi/4 + \theta/2) \right) \\
     1117{\rm and}\hspace{1cm} \theta & = & 2 \arctan \left( e^y \right) - \pi/2
     1118\end{eqnarray}
     1119
     1120\subparagraph{Hammer-Aitoff}
     1121
     1122The Hammer-Aitoff projection(``AIT'') is a pseudocylindrical projection, and is defined:
     1123
     1124\begin{eqnarray}
     1125x & = & 2 \zeta \cos \theta \sin \frac{\phi}{2} \\
     1126y & = & \zeta \sin \theta \\
     1127{\rm where}\hspace{1cm} \zeta^{-1} & \equiv & \sqrt{\frac{1}{2}\left(1 + \cos \theta \cos \frac{\phi}{2} \right)}
    9811128\end{eqnarray}
    9821129
     
    9841131
    9851132\begin{eqnarray}
    986 \phi & = & 2 {\rm arg} (2z^2 - 1, xz \pi/360^\circ) \\
    987 \theta & = & \arcsin (yz\pi/180^\circ) \\
    988 {\rm where}\hspace{1cm} z & \equiv & \sqrt{1 - (x\pi/720^\circ)^2 - (y\pi/360^\circ)^2}
     1133\phi & = & 2 {\rm \arctan} (2z^2 - 1, x z) \\
     1134\theta & = & \arcsin (yz) \\
     1135{\rm where}\hspace{1cm} z & \equiv & \sqrt{1 - (x/2)^2 - y^2}
     1136\end{eqnarray}
     1137
     1138\subparagraph{Parabolic}
     1139
     1140The Parabolic projection (``PAR'') is a pseudocylindrical projection, and is defined:
     1141
     1142\begin{eqnarray}
     1143x & = & \phi \left( 2 \cos \frac{2 \theta}{3} - 1 \right) \\
     1144y & = & \pi \sin \frac{\theta}{3} \\
     1145\end{eqnarray}
     1146
     1147And in reverse:
     1148
     1149\begin{eqnarray}
     1150\theta & = & 3 \sin^{-1} \rho \\
     1151\phi   & = & \frac{x}{1 - 4\rho^2} \\
     1152{\rm where}\hspace{1cm} \rho & \equiv & y/\pi \\
    9891153\end{eqnarray}
    9901154
Note: See TracChangeset for help on using the changeset viewer.