ecTrans contains a wrapper for accessing a limited subset of functionality from Python, called ectrans4py. Here we present instructions for building ectrans4py and document the available functionality.
Installation proceeds at first as with a general installation of ecTrans. Follow the instructions up to the step "Building ecTrans". Then export fiat_ROOT as the full path to the FIAT build directory.
Then, prepare your Python environment. For example, we suggest that you create a new Python venv:
python3 -m venv venv
. venv/bin/activate
Now you can build the ectrans4py wheel:
pip install build
python -m build --wheel ectrans -o $PWD
pip install ectrans4py*
You should now be able to import the ectrans4py module:
python -c "import ectrans4py"
If this command does not work, please raise an issue to let us know.
Functionality is provided through the ectransp4y module.
ectrans_versionReturns the version string of ecTrans.
Parameters:
None
Returns:
get_legendre_assetsFetches the arrays relevant for performing the Legendre transform. Use this function to obtain the Legendre polynomials
Parameters:
Returns:
etrans_inq4pytrans_inq4pysp2gp_lam4pygp2sp_lam4pysp2gp_gauss4pygp2sp_gauss4pysp2gp_fft1d4py