eisdrt 1.0.x
Functions
libtorch API

Api for use with libtorch applications calculates drts with libtorch datatypes. More...

Functions

torch::Tensor calcDrtTorch (const std::vector< eis::DataPoint > &data, const std::vector< fvalue > &omegaVector, FitMetrics &fm, const FitParameters &fp)
 Calculates impedance from drt using torch datatypes.
 
torch::Tensor calcDrtTorch (const std::vector< eis::DataPoint > &data, FitMetrics &fm, const FitParameters &fp)
 Calculates impedance from drt using torch datatypes.
 
torch::Tensor calcImpedance (torch::Tensor &drt, fvalue rSeries, const std::vector< fvalue > &omegaVector)
 Calculates impedance from drt using eisgenerator datatypes.
 
template<typename fv >
torch::Tensor calcDrtTorch (torch::Tensor &impedanceSpectra, torch::Tensor &omegaTensor, FitMetrics &fm, const FitParameters &fp)
 Calculates a drt on eisgenerator types.
 
template<typename fv >
torch::Tensor calcImpedance (torch::Tensor &drt, fv rSeries, torch::Tensor &omegaVector)
 Calculates impedance from drt.
 

Detailed Description

Api for use with libtorch applications

calculates drts with libtorch datatypes.

....

Function Documentation

◆ calcDrtTorch() [1/3]

torch::Tensor calcDrtTorch ( const std::vector< eis::DataPoint > & data,
const std::vector< fvalue > & omegaVector,
FitMetrics & fm,
const FitParameters & fp )

Calculates impedance from drt using torch datatypes.

This function ignores the frequencies in data and uses those from omegaVector

Parameters
dataThe spectra to calculate impedance from.
omegaVectorA vector of radial frequencies to calculate the drt at.
fmA fit metrics struct where this function returns information on the fit acquired.
fpA struct with fit parameters.
Returns
A complex tensor with the drt values.

◆ calcDrtTorch() [2/3]

torch::Tensor calcDrtTorch ( const std::vector< eis::DataPoint > & data,
FitMetrics & fm,
const FitParameters & fp )

Calculates impedance from drt using torch datatypes.

Parameters
dataThe spectra to calculate impedance from.
fmA fit metrics struct where this function returns information on the fit acquired.
fpA struct with fit parameters.
Returns
A complex tensor with the drt values.

◆ calcDrtTorch() [3/3]

template<typename fv >
torch::Tensor calcDrtTorch ( torch::Tensor & impedanceSpectra,
torch::Tensor & omegaTensor,
FitMetrics & fm,
const FitParameters & fp )

Calculates a drt on eisgenerator types.

Template Parameters
fvThe Precision to be used, either double or float.
Parameters
impedanceSpectraA 1d complex tensor with the impedance measurement data points.
omegaTensorA 1d tensor with the omega values that the impedances where measured at.
fmA fit metrics struct where this function returns information on the fit acquired.
fpA struct with fit parameters.
Returns
A 1d tensor with the drt values.

◆ calcImpedance() [1/2]

template<typename fv >
torch::Tensor calcImpedance ( torch::Tensor & drt,
fv rSeries,
torch::Tensor & omegaVector )

Calculates impedance from drt.

Template Parameters
fvThe Precision to be used, either double or float.
Parameters
drtThe drt to calculate impedance from.
Returns
A complex tensor with the impedance spectra.

◆ calcImpedance() [2/2]

torch::Tensor calcImpedance ( torch::Tensor & drt,
fvalue rSeries,
const std::vector< fvalue > & omegaVector )

Calculates impedance from drt using eisgenerator datatypes.

Parameters
drtThe drt to calculate impedance from.
omegaRangeA range that describes the omega values the drt was taken at.
rSeriesAn optional parameter where the series resistance is stored.
Returns
A vector with the impedance values.