Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

f2py and numpy wrappers of the fortran version of the astro library SLALIB

branch: master

Merge pull request #4 from mmarquar/sdist

Add metadata to enable source build (sdist) and debian packaging (stdeb)
latest commit a0cb1974b4
Scott Ransom authored
Octocat-spinner-32 lib More fixes for 3.2 vs 2.x June 23, 2011
Octocat-spinner-32 test Fixed import in test script. January 01, 2011
Octocat-spinner-32 .gitignore Add metadata to enable source build (sdist) and debian packaging (stdeb) August 03, 2012
Octocat-spinner-32 MANIFEST.in Add metadata to enable source build (sdist) and debian packaging (stdeb) August 03, 2012
Octocat-spinner-32 Makefile First commit. September 20, 2010
Octocat-spinner-32 README.txt Updated README December 07, 2010
Octocat-spinner-32 addet.f First commit. September 20, 2010
Octocat-spinner-32 afin.f First commit. September 20, 2010
Octocat-spinner-32 airmas.f First commit. September 20, 2010
Octocat-spinner-32 altaz.f First commit. September 20, 2010
Octocat-spinner-32 amp.f First commit. September 20, 2010
Octocat-spinner-32 ampqk.f First commit. September 20, 2010
Octocat-spinner-32 aop.f First commit. September 20, 2010
Octocat-spinner-32 aoppa.f First commit. September 20, 2010
Octocat-spinner-32 aoppat.f First commit. September 20, 2010
Octocat-spinner-32 aopqk.f First commit. September 20, 2010
Octocat-spinner-32 atmdsp.f First commit. September 20, 2010
Octocat-spinner-32 atms.f First commit. September 20, 2010
Octocat-spinner-32 atmt.f First commit. September 20, 2010
Octocat-spinner-32 av2m.f First commit. September 20, 2010
Octocat-spinner-32 bear.f First commit. September 20, 2010
Octocat-spinner-32 caf2r.f First commit. September 20, 2010
Octocat-spinner-32 caldj.f First commit. September 20, 2010
Octocat-spinner-32 calyd.f First commit. September 20, 2010
Octocat-spinner-32 cc2s.f First commit. September 20, 2010
Octocat-spinner-32 cc62s.f First commit. September 20, 2010
Octocat-spinner-32 cd2tf.f First commit. September 20, 2010
Octocat-spinner-32 cldj.f First commit. September 20, 2010
Octocat-spinner-32 clyd.f First commit. September 20, 2010
Octocat-spinner-32 combn.f First commit. September 20, 2010
Octocat-spinner-32 cr2af.f First commit. September 20, 2010
Octocat-spinner-32 cr2tf.f First commit. September 20, 2010
Octocat-spinner-32 cs2c.f First commit. September 20, 2010
Octocat-spinner-32 cs2c6.f First commit. September 20, 2010
Octocat-spinner-32 ctf2d.f First commit. September 20, 2010
Octocat-spinner-32 ctf2r.f First commit. September 20, 2010
Octocat-spinner-32 daf2r.f First commit. September 20, 2010
Octocat-spinner-32 dafin.f First commit. September 20, 2010
Octocat-spinner-32 dat.f New leap second: 2012 July 1 February 02, 2012
Octocat-spinner-32 dav2m.f First commit. September 20, 2010
Octocat-spinner-32 dbear.f First commit. September 20, 2010
Octocat-spinner-32 dbjin.f First commit. September 20, 2010
Octocat-spinner-32 dc62s.f First commit. September 20, 2010
Octocat-spinner-32 dcc2s.f First commit. September 20, 2010
Octocat-spinner-32 dcmpf.f First commit. September 20, 2010
Octocat-spinner-32 dcs2c.f First commit. September 20, 2010
Octocat-spinner-32 dd2tf.f First commit. September 20, 2010
Octocat-spinner-32 de2h.f First commit. September 20, 2010
Octocat-spinner-32 deuler.f First commit. September 20, 2010
Octocat-spinner-32 dfltin.f First commit. September 20, 2010
Octocat-spinner-32 dh2e.f First commit. September 20, 2010
Octocat-spinner-32 dimxv.f First commit. September 20, 2010
Octocat-spinner-32 djcal.f First commit. September 20, 2010
Octocat-spinner-32 djcl.f First commit. September 20, 2010
Octocat-spinner-32 dm2av.f First commit. September 20, 2010
Octocat-spinner-32 dmat.f First commit. September 20, 2010
Octocat-spinner-32 dmoon.f First commit. September 20, 2010
Octocat-spinner-32 dmxm.f First commit. September 20, 2010
Octocat-spinner-32 dmxv.f First commit. September 20, 2010
Octocat-spinner-32 dpav.f First commit. September 20, 2010
Octocat-spinner-32 dr2af.f First commit. September 20, 2010
Octocat-spinner-32 dr2tf.f First commit. September 20, 2010
Octocat-spinner-32 drange.f First commit. September 20, 2010
Octocat-spinner-32 dranrm.f First commit. September 20, 2010
Octocat-spinner-32 ds2c6.f First commit. September 20, 2010
Octocat-spinner-32 ds2tp.f First commit. September 20, 2010
Octocat-spinner-32 dsep.f First commit. September 20, 2010
Octocat-spinner-32 dsepv.f First commit. September 20, 2010
Octocat-spinner-32 dt.f First commit. September 20, 2010
Octocat-spinner-32 dtf2d.f First commit. September 20, 2010
Octocat-spinner-32 dtf2r.f First commit. September 20, 2010
Octocat-spinner-32 dtp2s.f First commit. September 20, 2010
Octocat-spinner-32 dtp2v.f First commit. September 20, 2010
Octocat-spinner-32 dtps2c.f First commit. September 20, 2010
Octocat-spinner-32 dtpv2c.f First commit. September 20, 2010
Octocat-spinner-32 dtt.f First commit. September 20, 2010
Octocat-spinner-32 dv2tp.f First commit. September 20, 2010
Octocat-spinner-32 dvdv.f First commit. September 20, 2010
Octocat-spinner-32 dvn.f First commit. September 20, 2010
Octocat-spinner-32 dvxv.f First commit. September 20, 2010
Octocat-spinner-32 e2h.f First commit. September 20, 2010
Octocat-spinner-32 earth.f First commit. September 20, 2010
Octocat-spinner-32 ecleq.f First commit. September 20, 2010
Octocat-spinner-32 ecmat.f First commit. September 20, 2010
Octocat-spinner-32 ecor.f First commit. September 20, 2010
Octocat-spinner-32 eg50.f First commit. September 20, 2010
Octocat-spinner-32 el2ue.f First commit. September 20, 2010
Octocat-spinner-32 epb.f First commit. September 20, 2010
Octocat-spinner-32 epb2d.f First commit. September 20, 2010
Octocat-spinner-32 epco.f First commit. September 20, 2010
Octocat-spinner-32 epj.f First commit. September 20, 2010
Octocat-spinner-32 epj2d.f First commit. September 20, 2010
Octocat-spinner-32 epv.f First commit. September 20, 2010
Octocat-spinner-32 eqecl.f First commit. September 20, 2010
Octocat-spinner-32 eqeqx.f First commit. September 20, 2010
Octocat-spinner-32 eqgal.f First commit. September 20, 2010
Octocat-spinner-32 etrms.f First commit. September 20, 2010
Octocat-spinner-32 euler.f First commit. September 20, 2010
Octocat-spinner-32 evp.f First commit. September 20, 2010
Octocat-spinner-32 fitxy.f First commit. September 20, 2010
Octocat-spinner-32 fk425.f First commit. September 20, 2010
Octocat-spinner-32 fk45z.f First commit. September 20, 2010
Octocat-spinner-32 fk524.f First commit. September 20, 2010
Octocat-spinner-32 fk52h.f First commit. September 20, 2010
Octocat-spinner-32 fk54z.f First commit. September 20, 2010
Octocat-spinner-32 fk5hz.f First commit. September 20, 2010
Octocat-spinner-32 flotin.f First commit. September 20, 2010
Octocat-spinner-32 galeq.f First commit. September 20, 2010
Octocat-spinner-32 galsup.f First commit. September 20, 2010
Octocat-spinner-32 ge50.f First commit. September 20, 2010
Octocat-spinner-32 geoc.f First commit. September 20, 2010
Octocat-spinner-32 get_docstring.py Attempt to get things working on python3.2 June 22, 2011
Octocat-spinner-32 gmst.f First commit. September 20, 2010
Octocat-spinner-32 gmsta.f First commit. September 20, 2010
Octocat-spinner-32 gresid.F First commit. September 20, 2010
Octocat-spinner-32 h2e.f First commit. September 20, 2010
Octocat-spinner-32 h2fk5.f First commit. September 20, 2010
Octocat-spinner-32 hfk5z.f First commit. September 20, 2010
Octocat-spinner-32 idchf.f First commit. September 20, 2010
Octocat-spinner-32 idchi.f First commit. September 20, 2010
Octocat-spinner-32 imxv.f First commit. September 20, 2010
Octocat-spinner-32 intin.f First commit. September 20, 2010
Octocat-spinner-32 invf.f First commit. September 20, 2010
Octocat-spinner-32 kbj.f First commit. September 20, 2010
Octocat-spinner-32 m2av.f First commit. September 20, 2010
Octocat-spinner-32 map.f First commit. September 20, 2010
Octocat-spinner-32 mappa.f First commit. September 20, 2010
Octocat-spinner-32 mapqk.f First commit. September 20, 2010
Octocat-spinner-32 mapqkz.f First commit. September 20, 2010
Octocat-spinner-32 moon.f First commit. September 20, 2010
Octocat-spinner-32 mxm.f First commit. September 20, 2010
Octocat-spinner-32 mxv.f First commit. September 20, 2010
Octocat-spinner-32 nut.f First commit. September 20, 2010
Octocat-spinner-32 nutc.f First commit. September 20, 2010
Octocat-spinner-32 nutc80.f First commit. September 20, 2010
Octocat-spinner-32 oap.f First commit. September 20, 2010
Octocat-spinner-32 oapqk.f First commit. September 20, 2010
Octocat-spinner-32 obs.f First commit. September 20, 2010
Octocat-spinner-32 pa.f First commit. September 20, 2010
Octocat-spinner-32 pav.f First commit. September 20, 2010
Octocat-spinner-32 pcd.f First commit. September 20, 2010
Octocat-spinner-32 pda2h.f First commit. September 20, 2010
Octocat-spinner-32 pdq2h.f First commit. September 20, 2010
Octocat-spinner-32 permut.f First commit. September 20, 2010
Octocat-spinner-32 pertel.f First commit. September 20, 2010
Octocat-spinner-32 pertue.f First commit. September 20, 2010
Octocat-spinner-32 planel.f First commit. September 20, 2010
Octocat-spinner-32 planet.f First commit. September 20, 2010
Octocat-spinner-32 plante.f First commit. September 20, 2010
Octocat-spinner-32 plantu.f First commit. September 20, 2010
Octocat-spinner-32 pm.f First commit. September 20, 2010
Octocat-spinner-32 polmo.f First commit. September 20, 2010
Octocat-spinner-32 prebn.f First commit. September 20, 2010
Octocat-spinner-32 prec.f First commit. September 20, 2010
Octocat-spinner-32 preces.f First commit. September 20, 2010
Octocat-spinner-32 precl.f First commit. September 20, 2010
Octocat-spinner-32 prenut.f First commit. September 20, 2010
Octocat-spinner-32 pv2el.f First commit. September 20, 2010
Octocat-spinner-32 pv2ue.f First commit. September 20, 2010
Octocat-spinner-32 pvobs.f First commit. September 20, 2010
Octocat-spinner-32 pxy.f First commit. September 20, 2010
Octocat-spinner-32 random.F First commit. September 20, 2010
Octocat-spinner-32 range.f First commit. September 20, 2010
Octocat-spinner-32 ranorm.f First commit. September 20, 2010
Octocat-spinner-32 rcc.f First commit. September 20, 2010
Octocat-spinner-32 rdplan.f First commit. September 20, 2010
Octocat-spinner-32 refco.f First commit. September 20, 2010
Octocat-spinner-32 refcoq.f First commit. September 20, 2010
Octocat-spinner-32 refro.f First commit. September 20, 2010
Octocat-spinner-32 refv.f First commit. September 20, 2010
Octocat-spinner-32 refz.f First commit. September 20, 2010
Octocat-spinner-32 rverot.f First commit. September 20, 2010
Octocat-spinner-32 rvgalc.f First commit. September 20, 2010
Octocat-spinner-32 rvlg.f First commit. September 20, 2010
Octocat-spinner-32 rvlsrd.f First commit. September 20, 2010
Octocat-spinner-32 rvlsrk.f First commit. September 20, 2010
Octocat-spinner-32 s2tp.f First commit. September 20, 2010
Octocat-spinner-32 sep.f First commit. September 20, 2010
Octocat-spinner-32 sepv.f First commit. September 20, 2010
Octocat-spinner-32 setup.py Merge pull request #3 from phn/master February 02, 2012
Octocat-spinner-32 sla.c First commit. September 20, 2010
Octocat-spinner-32 sla_config.h First commit. September 20, 2010
Octocat-spinner-32 slalib.h First commit. September 20, 2010
Octocat-spinner-32 slalib.pyf First commit. September 20, 2010
Octocat-spinner-32 slamac.h First commit. September 20, 2010
Octocat-spinner-32 smat.f First commit. September 20, 2010
Octocat-spinner-32 stdeb.cfg Add metadata to enable source build (sdist) and debian packaging (stdeb) August 03, 2012
Octocat-spinner-32 subet.f First commit. September 20, 2010
Octocat-spinner-32 supgal.f First commit. September 20, 2010
Octocat-spinner-32 svd.f First commit. September 20, 2010
Octocat-spinner-32 svdcov.f First commit. September 20, 2010
Octocat-spinner-32 svdsol.f First commit. September 20, 2010
Octocat-spinner-32 tp2s.f First commit. September 20, 2010
Octocat-spinner-32 tp2v.f First commit. September 20, 2010
Octocat-spinner-32 tps2c.f First commit. September 20, 2010
Octocat-spinner-32 tpv2c.f First commit. September 20, 2010
Octocat-spinner-32 ue2el.f First commit. September 20, 2010
Octocat-spinner-32 ue2pv.f First commit. September 20, 2010
Octocat-spinner-32 unpcd.f First commit. September 20, 2010
Octocat-spinner-32 v2tp.f First commit. September 20, 2010
Octocat-spinner-32 vdv.f First commit. September 20, 2010
Octocat-spinner-32 veri.f First commit. September 20, 2010
Octocat-spinner-32 vers.f First commit. September 20, 2010
Octocat-spinner-32 vn.f First commit. September 20, 2010
Octocat-spinner-32 vxv.f First commit. September 20, 2010
Octocat-spinner-32 wait.f First commit. September 20, 2010
Octocat-spinner-32 xy2xy.f First commit. September 20, 2010
Octocat-spinner-32 zd.f First commit. September 20, 2010
README.txt
pySLALIB v1.0.2  (Dec 2010)
---------------

This is archive contains new f2py-generated (and hand-tweaked to
eliminate unnecessary function/subroutine arguments) wrappers for the
Fortran version of P.T. Wallace's SLALIB positional astronomy library.
SLALIB used to be hosted by the STARLINK site, although that service
has been suspended.  The version of SLALIB included here is 2.5-4
(with several additional tweaks) and is released under the GPL.

The python wrappers cover every function in SLALIB and a comprehensive
set of unit tests are available in the test/ directory.  The only
external dependency is numpy (http://numpy.scipy.org).  These wrappers
are not related to the older (and apparently abandoned) pySLALIB that
was once available on the Web (and which depended on Numeric as
opposed to numpy).

Installation
------------
Most users will only need to do:
  > python setup.py install
to generate the wrappers, build, and install the library.

Once slalib.so has been installed in your PYTHONPATH, you can run the
unittests via:
  > python test/test_slalib.py

Example Usage (using IPython)
-------------
In [1]: from pyslalib import slalib

In [2]: slalib.sla_veri()
Out[2]: 2005004

In [3]: slalib.sla_caldj(1999, 12, 31)
Out[3]: (51543.0, 0)

In [4]: slalib.sla_etrms(1976.9)
Out[4]: array([ -1.62161710e-06,  -3.31007009e-07,  -1.43529663e-07])

In [5]: slalib.sla_fk45z(1.234, -0.123, 1984)
Out[5]: (1.2446165107316911, -0.12141858395865548)

In [6]: slalib.sla_dafin("-00 03 34.6", 1)
Out[6]: (12, -0.0010404101596610642, 0)

In [7]: slalib.sla_obs(0, "GBT")
Out[7]:
('GBT',
 'Green Bank Telescope                    ',
 1.3934679949996727,
 0.67078450520692623,
 880.0)

If you import "sladoc" you can print the original Fortran doc
strings using something like:

In [1]: from pyslalib import slalib, sladoc

In [2]: print sladoc['sla_caldj']
"""
*     - - - - - -
*      C A L D J
*     - - - - - -
*
*  Gregorian Calendar to Modified Julian Date
*
*  (Includes century default feature:  use sla_CLDJ for years
*   before 100AD.)
*
*  Given:
*     IY,IM,ID     int    year, month, day in Gregorian calendar
*
...

Thanks go to Prasanth for adding the docstring capabilities!

If you would like to build a shared library for linking with other
programs, a simple Makefile is also included that should work with
only minor tweaks for most Unix-like OSs.

Please let me know if you find any problems.

Scott

----------------------------------
Scott M. Ransom <sransom@nrao.edu>
http://www.cv.nrao.edu/~sransom
Something went wrong with that request. Please try again.