Skip to content

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

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.