Api for use with libtorch applications calculates drts with libtorch datatypes.
More...
|
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.
|
|
Api for use with libtorch applications
calculates drts with libtorch datatypes.
....
◆ 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
-
data | The spectra to calculate impedance from. |
omegaVector | A vector of radial frequencies to calculate the drt at. |
fm | A fit metrics struct where this function returns information on the fit acquired. |
fp | A 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
-
data | The spectra to calculate impedance from. |
fm | A fit metrics struct where this function returns information on the fit acquired. |
fp | A 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
-
fv | The Precision to be used, either double or float. |
- Parameters
-
impedanceSpectra | A 1d complex tensor with the impedance measurement data points. |
omegaTensor | A 1d tensor with the omega values that the impedances where measured at. |
fm | A fit metrics struct where this function returns information on the fit acquired. |
fp | A 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
-
fv | The Precision to be used, either double or float. |
- Parameters
-
drt | The 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
-
drt | The drt to calculate impedance from. |
omegaRange | A range that describes the omega values the drt was taken at. |
rSeries | An optional parameter where the series resistance is stored. |
- Returns
- A vector with the impedance values.