\File{(stdin)}{Fri Sep 26 11:45:32 2008}

\PythonNoMath

\PythonDocBlock
\verb""\\ 
\verb"An astronomy library for precessing coordinates between epochs and converting "\\ 
\verb"between topocentric (z = up, x = east), ecliptic (heliocentric), equatorial"\\ 
\verb"(celestial), and galactic coordinate systems.  Vectors are 3 dimensional "\\ 
\verb"with magnitude 1, representing a point on the unit sphere.  Includes generic "\\ 
\verb"3 vector rotation code."\\ 

\PythonDocBlockEnd






\I{17}{0}$\K{def}\ \F{convert}\,(\V{crd},\V{isys},\V{osys},\V{iepoch}\Y{=}e.\V{J2000},\V{oepoch}\Y{=}e.\V{J2000})\Y{:}$
\DS{18}{1}{%
\verb"Convert 'crd' from coordinate system 'isys' to 'osys', including"\\ 
\verb"epoch precession.  Valid coordinate systems are 'ec' (Ecliptic), 'eq' "\\ 
\verb"(Equatorial), and 'ga' (Galactic).  Epochs may be date strings, or"\\ 
\verb"numerical ephemeris times."}\vskip 5pt 



\I{26}{0}$\K{def}\ \F{convert\_m}\,(\V{isys},\V{osys},\V{iepoch}\Y{=}e.\V{J2000},\V{oepoch}\Y{=}e.\V{J2000})\Y{:}$
\DS{27}{1}{%
\verb"Return the 3x3 matrix corresponding to a coordinate "\\ 
\verb"system/precssion transformation (see 'convert')."}\vskip 5pt 





\I{35}{0}$\K{def}\ \F{rot\_m}\,(\V{ang},\V{vec})\Y{:}$
\DS{36}{1}{%
\verb"Return 3x3 matrix defined by rotation by 'ang' around the"\\ 
\verb"axis 'vec', according to the right-hand rule.  Both can be vectors,"\\ 
\verb"returning a vector of rotation matrices.  Rotation matrix will have a "\\ 
\verb"scaling of |vec| (i.e. normalize |vec|=1 for a pure rotation)."}\vskip 5pt 










\I{51}{0}$\K{def}\ \F{xyz2thphi}\,(\V{xyz})\Y{:}$
\DS{52}{1}{%
\verb"Convert xyz vectors (x,y,z along first axis) into angles theta"\\ 
\verb"(from z axis), phi (counter-clockwise around z, 0 at x axis)."}\vskip 5pt 










\I{65}{0}$\K{def}\ \F{thphi2xyz}\,(\V{th\_phi})\Y{:}$
\DS{66}{1}{%
\verb"Convert angles theta (from z axis), phi (counter-clockwise around z, "\\ 
\verb"0 at x axis) into xyz vectors (x,y,z along first axis)."}\vskip 5pt 











\I{80}{0}$\K{def}\ \F{eq2radec}\,(\V{xyz})\Y{:}$
\DS{81}{1}{%
\verb"Convert equatorial xyz vectors (x,y,z along first axis) into angles ra "\\ 
\verb"(counter-clockwise around z = north, 0 at x axis), dec (from equator)."}\vskip 5pt 






\I{90}{0}$\K{def}\ \F{radec2eq}\,(\V{ra\_dec})\Y{:}$
\DS{91}{1}{%
\verb"Convert angles ra (counter-clockwise around z = north, 0 at x axis), dec "\\ 
\verb"(from equator) into equatorial xyz vectors (x,y,z along first axis)."}\vskip 5pt 


\I{96}{0}$\K{def}\ \F{latlong2xyz}\,(\V{lat\_long})\Y{:}$
\DS{97}{1}{%
\verb"Convert angles lat (from equator), long (counter-clockwise around"\\ 
\verb"z = north, 0 at x axis) into xyz vectors (x,y,z along first axis)."}\vskip 5pt 


\I{102}{0}$\K{def}\ \F{top2azalt}\,(\V{xyz})\Y{:}$
\DS{103}{1}{%
\verb"Convert topocentric xyz vectors (x,y,z along first axis) into angles az "\\ 
\verb"(clockwise around z = up, 0 at x axis = north), alt (from horizon)."}\vskip 5pt 







\I{113}{0}$\K{def}\ \F{azalt2top}\,(\V{az\_alt})\Y{:}$
\DS{114}{1}{%
\verb"Convert angles az (clockwise around z = up, 0 at x axis = north), alt "\\ 
\verb"(from horizon) into topocentric xyz vectors (x,y,z along first axis)."}\vskip 5pt 


\I{119}{0}$\K{def}\ \F{eq2top\_m}\,(\V{ha},\V{dec})\Y{:}$
\DS{120}{1}{%
\verb"Return the 3x3 matrix converting equatorial coordinates to topocentric"\\ 
\verb"at the given hour angle (ha) and declination (dec)."}\vskip 5pt 








\I{131}{0}$\K{def}\ \F{top2eq\_m}\,(\V{ha},\V{dec})\Y{:}$
\DS{132}{1}{%
\verb"Return the 3x3 matrix converting topocentric coordinates to equatorial"\\ 
\verb"at the given hour angle (ha) and declination (dec)."}\vskip 5pt 

