A simple example in how to use eisgenerator.
A simple example in how to use eisgenerator.
#include <iostream>
#include <eisgenerator/model.h>
#include <eisgenerator/log.h>
int main(int argc, char** argv)
{
std::cout<<"A calculated data point: "<<point<<'\n';
std::cout<<"A Range:\n";
for(fvalue omega : omegaVector)
std::cout<<omega<<'\n';
std::cout<<'\n';
std::vector<eis::DataPoint> data = model.
executeSweep(omegaRange);
std::cout<<"Spectra:\n"<<spectra<<'\n';
}
Basic singular EIS data point.
Definition eistype.h:47
bool saveToDisk(const std::filesystem::path &path) const
Saves the spectra to disk.
static Level level
Minimum Level required for output to be printed.
Definition log.h:56
@ WARN
Non fatal errors or problems affecting performance or numeric precision
Definition log.h:42
The main class of eisgenerator representing an equivalent circuit model.
Definition model.h:47
std::vector< DataPoint > executeSweep(const Range &omega, size_t index=0)
Executes a frequency sweep along the given range.
std::string getModelStrWithParam(size_t index)
Returns the model string corresponding to this model object, with embedded parameters.
DataPoint execute(fvalue omaga, size_t index=0)
Gets the impedance at the given frequency.
A range.
Definition eistype.h:110
std::vector< fvalue > getRangeVector() const
This function constructs a vector that contains all elements of this range.