The Python code in HLSVDPRO is simple and is compatible with Python 2 and 3.
HLSVDPRO is written in Fortran and compiled to a library (DLL/shared object/dylib). It only exposes one function which is hlsvdpw_python()
in [source:trunk/hlsvdpro/src/hlsvdpro.f hlsvdpro.f]. That function is a convenience wrapper (in Fortran) around the core functionality.
Since there's only one function to call, we chose to wrap it using ctypes
.
The [source:trunk/hlsvdpro/hlsvd.py Python code] is a single-function convenience wrapper around the Fortran convenience wrapper. The Python code handles loading the binary library and passing data via ctypes
.
The binary libraries have been built in 64-mode only. It's possible to build them for 32-bit mode (see the [source:trunk/hlsvdpro/src Makefiles] in the src
directory) but we don't support that.
We have [source:trunk/hlsvdpro/demo/demo.py code that demonstrates calling HLSVDPRO]. That code also interprets the results and displays a plot of the observed vs. estimated values.
[source:trunk/hlsvdpro/hlsvd.py The Python wrapper] contains an extensive docstring that describes inputs and outputs.
On Linux, you'll need to install libfftw3
before running HLSVDPRO.