
*** thorsky ***

Time-and-the-sky software originally written by John Thorstensen 
(Dartmouth College)

These are based on astropy.coordinates and astropy.time, with some
low-precision routines added to speed execution.  

INSTALLATION

Untar the distribution as usual (you've already done this).

			gunzip thorsky-1.0.tar.gz

			tar xvf thorsky-1.0.tar

and then simply
			
			cd thorsky-1.0.tar

			python setup.py install 

on the command line.  That will install it in whatever python
environment you're using.  You may instead need to type

			sudo python setup.py install

depending on how you're set up.   

My own default python is 2.7, but I have python3 installed, and
was able to install there with simply

			sudo pytho3 setup.py install.

If you're using anaconda, you'll need to install separately in
each python environment you use.  I'm using anaconda on a mac,
and had good luck with 

			activate iraf27         
		
			sudo python setup.py install

			deactivate iraf27
	
			activate py3

			sudo python setup.py install

and the package was available in both pythons.

CONTENTS

./bin contains: 

pyskycalc3.py -- this is an executable script that the setup
package should install somewhere on your execution path.
If it doesn't, simply copy it to someplace on your path.
Then you can start it by simpy typing the name pyskycalc3.py .

pyskycalc3.py is a GUI-based time and the sky calculator that is
very similar to my java program JSkyCalc, but which is 
entirely in python.  It requires the venerable python Tk 
GUI stuff, but there's nothing that you shouldn't be able to 
find and install fairly easily.  It requires python3, but
specifies this on the top line and should run from either
python2 or python3 environments. 

./thorsky contains

thorskyutil.py -- a python module that contains utility programs
for time and the sky.  Most people won't use these directly, I think.

thorskyclasses3.py -- High-level classes for doing time-and-the-sky
calculations.  The class structure is based on that used in JSkyCalc,
but built on astropy.coordinate objects.  This should be VERY 
useful in supporting reduction pipelines and so on.  

WHERE TO FIND DOCUMENTATION

The distribution directory contains thorskyclasses_py2.ipynb 
(and similar for py3).  These are jupyter notebooks explaining 
how to use the top class in thorskyclasses3,
namely Observation.  

The directory doc/_build/html has extensive detailed HTML documentation
generated by Sphinx from docstrings in the source code. 

USAGE 

Once the package is installed, you should be able to 
(in the python interpreter or in a script) :

import thorsky.thorskyutil as tsu
import thorsky.thorskyclasses3 as tsc3

and if this works, take it for a little spin:

x = tsc3.Observation() 
x.computesky()
x.computesunmoon()
x.computeplanets()
x.computequickbary()

x.printnow()

There's more detail in the jupyter notebook.

The first time you run it, you may have to wait for a 3-Megabyte 
download of cache data required by some of the astropy coordinates 
routines.

NB: HARMLESS WARNINGS

At run-time the programs occasionally generate "ErfaWarnings" because
the program is extrapolating past the time when the Erfa routines
underlying astropy.coordinates have exact earth rotation data,
which can't be predicted.  This can be safely ignored by almost
everyone, and if you're one of the people who can't ignore it,
you undoubtedly know who you are.

			
