xraypy / feff85exafs

Feff8L: Open Source theoretical EXAFS fitting standards
Other
15 stars 7 forks source link

updates to C/Fortran linking, especially for Windows #41

Closed newville closed 7 years ago

newville commented 7 years ago

This adds a C method calc_onepath() that wraps the Fortran function onepath() to calculate the EXAFS for a single path using a long list of simple arguments, rather than constructing a C FeffPath structure.

It also changes the way libfeff8lpath is linked, using gcc instead of gfortran. These steps result in a uniform c interface for the dynamic libfeff8lpath library that works well on all platforms, including Windows.

This also move the python wrapper from python_ctypes to python, and makes several changes to that wrapper, primarily to use the new calc_onepath() function in libfeff8lpath.

Also added: a Python version of feff8l, a master program that will run all (or selected, with command-line switched) modules of Feff8L.

I tried to add a simple proof-of-principle Travis CI script, but this is currently failing because I can't figure out how to properly install and use gfortran > 4.9 (needed for JSON) on the very old linux version they provide.

newville commented 7 years ago

@bruceravel this seems to work for me, and a simple travis test now runs!