Main SPEX APIΒΆ

The main SPEX API is located in the libspex library in the spex_api module and can be imported using the use spex_api statement in Fortran. The name of the class is sapi, which can be used to create a SPEX object. The top of a Fortran program using this API looks like this:

program lines
use spex_api
type(sapi) :: spex

Please note that at this level, one does not have access to calling SPEX commands or log files directly. This is handles in the SPEX command interface, which is a level higher.

In the documentation below, we list the procedures that you can use in the API and mention their command-line and pyspex equivalents.