144void rlx_close_file(
struct rlxfile* file);
void rlx_spectra_free(struct rlx_spectra *spectra)
This frees a spectra struct.
const char * rlx_get_errnum_str(int errnum)
Returns a human readable error string for a given error number.
struct rlx_project ** rlx_get_projects(struct rlxfile *file, size_t *length)
Gets all the projects in a given RelaxIS file.
int rlx_get_errnum(const struct rlxfile *file)
Returns the last error returned on a file operation.
struct rlxfile * rlx_open_file(const char *path, const char **error)
Frees a project struct.
struct rlx_spectra * rlx_get_spectra(struct rlxfile *file, const struct rlx_project *project, int id)
Loads spectra with a given spectra id and project from file.
void rlx_project_free(struct rlx_project *proj)
This frees a project struct.
void rlx_project_free_array(struct rlx_project **proj_array)
This frees an array of project structs.
void rlx_fitparam_free(struct rlx_fitparam *param)
Frees a fitparam struct.
int rlx_get_float_arrays(const struct rlx_spectra *spectra, float **re, float **im, float **omega)
transforms a rlx_spectra struct into a set of newly allocated arrays, float version.
struct rlx_spectra ** rlx_get_all_spectra(struct rlxfile *file, const struct rlx_project *project)
Loads all spectra from file in given project.
struct rlx_fitparam ** rlx_get_fit_parameters(struct rlxfile *file, const struct rlx_project *project, int id, size_t *length)
Loads the parameters for a given spectra id from file.
int * rlx_get_spectra_ids(struct rlxfile *file, const struct rlx_project *project, size_t *length)
Loads spectra ids that are associated with a given project.
void rlx_fitparam_free_array(struct rlx_fitparam **param_array)
Frees an array of fitparam structs.
int rlx_get_double_arrays(const struct rlx_spectra *spectra, double **re, double **im, double **omega)
transforms a rlx_spectra struct into a set of newly allocated arrays, double version.
void rlx_spectra_free_array(struct rlx_spectra **spectra_array)
Frees an array of spectra structs.
This struct is used to house a single impedance data point.
Definition relaxisloader.h:67
double re
Real part of the measurement in Ohms.
Definition relaxisloader.h:69
double im
Imaginary part of the measurement in Ohms.
Definition relaxisloader.h:68
double omega
Frequency of the measurement in rad/s.
Definition relaxisloader.h:70
Definition relaxisloader.h:110
This struct represents a RelaxIS "project" containing any number of spectra.
Definition relaxisloader.h:39
time_t date
Project creation time.
Definition relaxisloader.h:42
int id
Project id.
Definition relaxisloader.h:40
char * name
Name of the project.
Definition relaxisloader.h:41
This struct is used to house an EIS spectra and associated meta-data.
Definition relaxisloader.h:76
time_t date_fitted
UNIX time the spectra was last fitted.
Definition relaxisloader.h:88
double freq_lower_limit
Lower limit of frequency range of this spectrum.
Definition relaxisloader.h:85
int project_id
Id of the project this spectrum belongs to.
Definition relaxisloader.h:84
time_t date_added
UNIX time the spectra was added.
Definition relaxisloader.h:87
int id
Spectra id, also called "file" in RelaxIS.
Definition relaxisloader.h:77
double freq_upper_limit
Upper limit of frequency range of this spectrum.
Definition relaxisloader.h:86
size_t length
Amount of data points in the spectrum.
Definition relaxisloader.h:80
struct rlx_datapoint * datapoints
Data points of the spectrum.
Definition relaxisloader.h:79
bool fitted
True if circuit has been fitted to spectrum.
Definition relaxisloader.h:83
char * circuit
RelaxIS circuit description string.
Definition relaxisloader.h:82