IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 16, 2004, 3:56:41 PM (22 years ago)
Author:
eugene
Message:

cleaned up time handling

File:
1 edited

Legend:

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

    r1548 r1554  
    1 %%% $Id: psLibADD.tex,v 1.24 2004-08-16 19:12:54 eugene Exp $
     1%%% $Id: psLibADD.tex,v 1.25 2004-08-17 01:56:41 eugene Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    644644
    645645Correct time representation is critical in astronomical software.
    646 PSLib uses the \code{psTime} structure to represent all time
    647 values.  This structure represents a time which is equivalent to TAI
    648 (International Atomic Time) and has the following properties:
    649 \begin{itemize}
    650 \item it represents both seconds and microseconds
    651 \item the seconds are continuous (no leap seconds)
    652 \item the zero reference point is \tbd{1970/01/01,00:00:10} UTC.
    653 \end{itemize}
     646PSLib uses the \code{psTime} structure to represent all time values.
     647This structure represents a time which is consists of seconds and
     648fractions of seconds in a time system defined by the \code{psTimeType}
     649element \code{type}.  Two possible time systems are currently
     650available: TAI and UTC.  Both are defined in terms of the reference
     651epoch 1970-01-01T00:00:00Z, but with minor modifications for
     652leap-seconds as needed.  The first represenatation, TAI (International
     653Atomic Time), has seconds of uniform length and no leap seconds.  The
     654exact zero reference is 1970/01/01,00:00:10 UTC.  The second
     655representations is UTC, which has seconds of uniform length and
     656leap-seconds as needed to adjust it to remain within 0.9 seconds of
     657the Earth's rotation.  It has a zero-point of exactly
     6581970/01/01,00:00:00 UTC.
    654659
    655660Julian Day (JD) and Modified Julian Day (MJD) are both continuous time
     
    708713\end{verbatim}
    709714
     715The conversion from a time and longitude to local mean sidereal time
     716is performed using the SLA Lib function \code{sla_GMST}.  This
     717function requires the value $\Delta$ UT1 = UTC - UT1.  The value of
     718$\Delta$ UT1 may be determined from the following site in real time:
     719
     720\code{ftp://maia.usno.navy.mil/ser7/ser7.dat}
     721
     722In addition, the long-term values may be determined from the table
     723found at: \code{ftp://maia.usno.navy.mil/ser7/finals.all}.  See also
     724the web page \code{http://maia.usno.navy.mil/}.  The most significant
     725accuracy requirements are for the current value when calculating the
     726LST.  For this purpose, the table above (\code{ser7.dat}), which
     727provides predictions over a 2 month period, must be made available
     728locally to PSLib and updated regularly.
     729
    710730%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    711731
     
    842862\subsubsection{Projections}
    843863
    844 We implement three types of projections, {\em zenithal} and {\em
    845 cylindrical} and {\em pseudocylindrical} projections.  These three
    846 require slightly different handling.  Our representations are based on
    847 the treatment of projections presented by
     864We implement three types of projections: {\em zenithal}, {\em
     865cylindrical} and {\em pseudocylindrical}, each requiring slightly
     866different handling.  Our representations are based on the treatment of
     867projections presented by
    848868\href{http://www.cv.nrao.edu/fits/documents/wcs/wcs.all.ps}{Greisen \&
    849 Calabretta (1995, ADASS, 4, 233)}.
     869Calabretta (1995, ADASS, 4, 233)}.  In all of these projections, we
     870are converting from a spherical coordinate $\alpha,\delta$ to a linear
     871(2-D) coordinate $x_p,y_p$.  The projection is defined by the
     872projection type, the projection center ($\alpha_p, \delta_p$) and the
     873the plate scales in the $x_p$ and $y_p$ directions ($\rho_x,\rho_y$).
     874
     875In the structure, \code{psProjection}, the projection type is defined
     876by the element \code{type}, the projection center $\alpha_p,\delta_p$
     877is defined by the elements \code{R,D}, and the plate scales,
     878$\rho_x,\rho_y$, are defined by the elements \code{Xs,Ys}.  The plate
     879scales are applied independently to the $x$ and $y$ coordinates to
     880convert them to the corresponding linear units (ie, pixels):
     881%
     882\begin{eqnarray}
     883x_p & = & \rho_x x \\
     884y_p & = & \rho_y y \\
     885\end{eqnarray}
     886%
     887In the discussions below, we ignore this last step (or first step,
     888depending on the direction of the conversion).
    850889
    851890\paragraph{Zenithal Projections}
    852891
    853892The {\em zenithal} projections are defined relative to a set of
    854 spherical coordinates whose pole is the center of the projection
    855 ($\alpha_p, \delta_p$, or \code{psProjection.R, psProjection.D}).  In
     893spherical coordinates with pole at the center of the projection
     894($\alpha_p, \delta_p$), and which thus represents a coordinate system
     895rotated relative to the coordinate system of $\alpha, \delta$.  In
    856896this spherical coordinate system, the coordinate of longitude is
    857897labeled $\phi$, and has domain of $-\pi < \phi \le \pi$, while the
     
    859899$0 \le \theta \le \pi$.
    860900
    861 For zenithal projections (e.g.\ Gnomonic and Orthographic) the
    862 following hold:
    863 %
    864 \begin{eqnarray}
    865 x & = & R_\theta \sin \phi \\
    866 y & = & -R_\theta \cos \phi
    867 \end{eqnarray}
    868 %
    869 and
    870 %
    871 \begin{eqnarray}
    872 R_\theta & = & \sqrt{x^2 + y^2} \\
    873 \phi     & = & {\rm arg} (-y,x)
    874 \end{eqnarray}
    875 %
    876 The coordinates $x,y$ above are defined to be in angular units (ie,
    877 radians).  The plate scales ($\rho_x, \rho_y$ = \code{psProjection.Xs,
    878 psProjection.Ys}) are applied independently to the $x$ and $y$
    879 coordinates to convert them to the corresponding linear units (ie,
    880 pixels):
    881 %
    882 \begin{eqnarray}
    883 x_p & = & \rho_x x \\
    884 y_p & = & \rho_y y \\
    885 \end{eqnarray}
    886 
    887901For an arbitrary projection center, it is necessary to convert the
    888902spherical coordinates to be projected ($\alpha,\delta$) to the
    889 projection spherical coordinate system coordinates ($\phi, \theta$)
    890 from which $x,y$ may be calculated using the relationships above,
    891 given a prescription for $R_\theta$.  In practice, we construct the
    892 following useful trigonometric relationships between $\phi$ and
    893 $\theta$ which may be employed in the equations of $x,y$ above:
     903projection spherical coordinate system coordinates ($\phi, \theta$).
     904In practice, we construct the following useful trigonometric
     905relationships between $\phi$ and $\theta$ which may be employed in the
     906equations of $x,y$ below:
    894907%
    895908\begin{eqnarray}
     
    907920\end{eqnarray}
    908921%
     922For zenithal projections, the linear coordinates are related to
     923$\phi,\theta$ by:
     924%
     925\begin{eqnarray}
     926x & = & R_\theta \sin \phi \\
     927y & = & -R_\theta \cos \phi
     928\end{eqnarray}
     929%
     930and the inverse:
     931%
     932\begin{eqnarray}
     933R_\theta & = & \sqrt{x^2 + y^2} \\
     934\phi     & = & {\rm arg} (-y,x)
     935\end{eqnarray}
     936%
     937The coordinates $x,y$ above are defined to be in angular units (ie,
     938radians). 
     939
    909940From these relationships, we can calculate $\alpha, \delta$ as:
    910941%
    911942\begin{eqnarray}
    912 \alpha - \alpha_p & = & arg (\sin \alpha, \cos \alpha) \\
    913 \delta            & = & arcsin (sin \delta) \\
    914 \end{eqnarray}
    915 %
    916 The necessary relationships for $\phi$ are equivalent for all zenithal projections:
    917 %
    918 \begin{eqnarray}
    919 R_\theta  & = & \sqrt{x^2 + y^2} \\
    920 \sin \phi & = & x / R_\theta \\
    921 \cos \phi & = & -y / R_\theta \\
     943\alpha - \alpha_p & = & \arctan (\sin \alpha, \cos \alpha) \\
     944\delta            & = & \arcsin (\sin \delta) \\
    922945\end{eqnarray}
    923946%
     
    933956x           & = & \frac{\cos \theta \sin \phi}{\sin \theta} \\
    934957y           & = & \frac{-\cos \theta \cos \phi}{\sin \theta} \\
    935 \sin \theta & = & \zeta / \sqrt (1 + \zeta^2) \\
    936 \cos \theta & = & 1 / \sqrt (1 + \zeta^2) \\
     958\sin \theta & = & \zeta / \sqrt{1 + \zeta^2} \\
     959\cos \theta & = & 1 / \sqrt{1 + \zeta^2} \\
    937960\end{eqnarray}
    938961
     
    958981coincident with the pole of the spherical coordinates.  These
    959982projections are particularly used for full-sky representations, and
    960 are only defined for projection centers with $\delta_c = 0$.  In this
     983are only defined for projection centers with $\delta_p = 0$.  In this
    961984spherical coordinate system, the coordinate of longitude is labeled
    962985$\phi$, and has domain of $-\pi < \phi \le \pi$, while the latitude,
    963986measured from the pole, is labeled $\theta$ and has domain $0 \le
    964 \theta \le \pi$.  The projection center longitude, $\alpha_c$
     987\theta \le \pi$.  The projection center longitude, $\alpha_p$
    965988corresponds to $\phi = 0$, thus the value of $\phi$ is determined as
    966 $\alpha - \alpha_c$ for all such projections.  The terms
    967 $\alpha_c,\delta_c$ are equivalent to the elements
    968 \code{psProjection.R} and \code{psProjection.D}.
     989$\alpha - \alpha_p$ for all such projections.
    969990
    970991\subparagraph{Cartesian}
    971992
    972 The Cartesian projection (``CAR'') is a very simple cylindrical with
    973 the following relationships between $x,y$ and $\phi,\theta$:
     993The Cartesian projection (``CAR'') is a very simple cylindrical
     994projection with the following relationships between $x,y$ and
     995$\phi,\theta$:
    974996
    975997\begin{eqnarray}
     
    9851007x & = & \phi \\
    9861008y & = & \ln \left( \tan (\pi/4 + \theta/2) \right) \\
    987 {\rm and}\hspace{1cm} \theta & = & 2 \arctan \left( e^y \right) - \pi/2^\circ
     1009{\rm and}\hspace{1cm} \theta & = & 2 \arctan \left( e^y \right) - \pi/2
    9881010\end{eqnarray}
    9891011
    9901012\subparagraph{Hammer-Aitoff}
    9911013
    992 The Hammer-Aitoff projection is a pseudocylindrical projection, and is defined:
    993 
    994 \begin{eqnarray}
    995 x & = & 2 \alpha \cos \theta \sin \frac{\phi}{2} \\
    996 y & = & \alpha \sin \theta \\
    997 {\rm where}\hspace{1cm} \alpha^{-1} & \equiv & \sqrt{\frac{1}{2}\left(1 + \cos \theta \cos \frac{\phi}{2} \right)}
     1014The Hammer-Aitoff projection(``AIT'') is a pseudocylindrical projection, and is defined:
     1015
     1016\begin{eqnarray}
     1017x & = & 2 \zeta \cos \theta \sin \frac{\phi}{2} \\
     1018y & = & \zeta \sin \theta \\
     1019{\rm where}\hspace{1cm} \zeta^{-1} & \equiv & \sqrt{\frac{1}{2}\left(1 + \cos \theta \cos \frac{\phi}{2} \right)}
    9981020\end{eqnarray}
    9991021
     
    10011023
    10021024\begin{eqnarray}
    1003 \phi & = & 2 {\rm arg} (2z^2 - 1, x z) \\
     1025\phi & = & 2 {\rm \arctan} (2z^2 - 1, x z) \\
    10041026\theta & = & \arcsin (yz) \\
    10051027{\rm where}\hspace{1cm} z & \equiv & \sqrt{1 - (x/2)^2 - y^2}
Note: See TracChangeset for help on using the changeset viewer.