Python3 bindings for eisgenerator
- git
- c++11 capable compiler (GCC, CLANG)
- cmake 3.20 or higher
- libeisgenerator from eisgenerator
- pybind11
- pip
git clone https://git-ce.rwth-aachen.de/carl_philipp.klemm/eisgeneraorpy.git
cd eisgeneraorpy
pip install .
These bindings provide only a subset of the functionality provided by eisgenerator.
The main suported classes are
eisgenerator.Model
- corrisponds too eis::Model
- only a subset of members are suported includeing the execute* family and the code generation members
eisgenerator.DataPoint
- corrisponds too eis::DataPoint
eisgenerator.Range
- corrisponds too eis::Range
eisgenerator.EisSpectra
- corrisponds too eis::EisSpectra
eisgenerator.Log
- corrisponds too eis::Log
TorchScript exectution is performed differently than on the C++ and two extra functions are provided for this:
eisgenerator.compileModel
- compiles the model to a torch object and caches it internally, returns True if this was sucessfull
eisgenerator.getModelFunction
- returns the a fuction object to use the model, or None on failure
- the returned function takes two torch.Tensor parameters
- a 1d, (n) sized tensor containing the model parameters
- a 1d, (n) sized tensor with omega values to calculate the impance at
- a 1d complex tensor is returned with the impedance values
eisgenerator.getModelParameters
- returns the model paramters at the given index as a torch.Tensor