From c435df3534641ba6591567c303a9a1ae61762c61 Mon Sep 17 00:00:00 2001
From: Carl Philipp Klemm <philipp@uvos.xyz>
Date: Tue, 9 Jan 2024 11:09:59 +0100
Subject: [PATCH] include the readme in the doxygen documentation

---
 README.md                               |  18 +--
 basicmath.cpp                           |   5 +-
 compcache.cpp                           |   5 +-
 compile-win.cpp                         |   1 +
 compile.cpp                             |   1 +
 doc/DoxygenLayout.xml                   |   2 +-
 doc/libeisgenerator.doxygen.in          |   6 +-
 doc/mainpage.md.in                      |  53 ++++----
 doc/modelspage.md.in                    |  22 ++--
 eisgenerator/basicmath.h                |  47 +++----
 eisgenerator/componant/cap.h            |   1 +
 eisgenerator/componant/componant.h      |   1 +
 eisgenerator/componant/constantphase.h  |   1 +
 eisgenerator/componant/finitetr.h       |   1 +
 eisgenerator/componant/inductor.h       |   1 +
 eisgenerator/componant/paralellseriel.h |   1 +
 eisgenerator/componant/resistor.h       |   1 +
 eisgenerator/componant/warburg.h        |   1 +
 eisgenerator/eistype.h                  |  61 ++++-----
 eisgenerator/log.h                      |   1 +
 eisgenerator/model.h                    |  53 ++++----
 eisgenerator/normalize.h                |   9 +-
 eisgenerator/translators.h              |  11 +-
 eistype.cpp                             |   1 +
 examples/compileing.cpp                 |  20 +--
 examples/simple.cpp                     |  20 +--
 examples/torchscript.cpp                |  20 +--
 lgpl-3.0.txt                            | 165 ++++++++++++++++++++++++
 linearregession.cpp                     |   3 +-
 linearregession.h                       |   3 +-
 log.cpp                                 |   1 +
 main.cpp                                |   1 +
 model.cpp                               |   1 +
 normalize.cpp                           |   1 +
 options.h                               |   1 +
 randomgen.cpp                           |   1 +
 randomgen.h                             |   1 +
 strops.cpp                              |   1 +
 strops.h                                |   1 +
 test.cpp                                |   1 +
 translators.cpp                         |   1 +
 41 files changed, 349 insertions(+), 197 deletions(-)
 create mode 100644 lgpl-3.0.txt

diff --git a/README.md b/README.md
index ea153bf..2aba047 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
+[comment]: \page README Readme
+
 # eisgenerator
 
-eisgenerator is a shared libary (libeisgenerator.so) and CLI application that allows one to generate [EIS](https://de.wikipedia.org/wiki/Impedanzspektroskopie) spectra with high performance.
-The target application is genrating test and example datasets for machine lerning applications.
+eisgenerator is a shared library (libeisgenerator.so) and CLI application that allows one to generate [EIS](https://de.wikipedia.org/wiki/Impedanzspektroskopie) spectra with high performance.
+The target application is generating test and example datasets for machine learning applications.
 
 eisgenerator's development and target platform is UNIX, but it should compile on nigh any platform
 
@@ -29,7 +31,7 @@ In a console do:
 
 ### Cross-compile for windows on UNIX
 
-* Have mingw cross-compile toolchaing installed
+* Have mingw cross-compile toolchain installed
 * git clone https://git-ce.rwth-aachen.de/carl_philipp.klemm/eisgenerator.git
 * cd eisgenerator
 * mkdir build
@@ -46,7 +48,7 @@ eisgenerator_export --model="r{1e3}-r{100}c{1e-6}" --omega=1-1e6 --omegasteps=10
 
 flags:
 
---model: model string, format is simmular to RHD RelaxIS except that the implicit operator is parallel instead of serial, ie. "rc" is a resistor and condenser in parallel while "r-c" is the same in series and that parameters can be passed by adding {number} after the parameter, if an element requires more than one parameter they are specified by adding several comma seperated values in between the brackets like so: {420, 56}
+--model: model string, format is similar to RHD RelaxIS except that the implicit operator is parallel instead of serial, IE. "rc" is a resistor and condenser in parallel while "r-c" is the same in series and that parameters can be passed by adding {number} after the parameter, if an element requires more than one parameter they are specified by adding several comma separated values in between the brackets like so: {420, 56}
 
 * Supported Elements
 	* c: cap
@@ -56,13 +58,13 @@ flags:
 	* l: inductor
 		* one parameter: inductance {L}
 	* w: warburg element (infinite), one parameters {A}
-		* one parameter: Warburg coefficant {A}
+		* one parameter: Warburg coefficient {A}
 	* p: constant phase element
 		* two parameters: {Q, alpha}
-	* t: finite approximation of a transmition line
+	* t: finite approximation of a transition line
 		* three parameters: capacitance, resistance, approximation order {C, R, n}
 
---omega: range of freqency values (in rad/s) to sweep
+--omega: range of frequency values (in rad/s) to sweep
 
 --omegasteps: amount of steps to take in the range specified by --omega
 
@@ -78,4 +80,4 @@ Generates Nyquist plot of model specified, allows the usage of the same flags as
 
 ## Python bindings
 
-python bindings can be build seperately from: [eisgeneratorpy](https://git-ce.rwth-aachen.de/carl_philipp.klemm/eisgeneraorpy)
+python bindings can be build separately from: [eisgeneratorpy](https://git-ce.rwth-aachen.de/carl_philipp.klemm/eisgeneraorpy)
diff --git a/basicmath.cpp b/basicmath.cpp
index 157dc47..1c46413 100644
--- a/basicmath.cpp
+++ b/basicmath.cpp
@@ -1,5 +1,6 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 //
-// eisgenerator - a shared libary and application to generate EIS spectra
+// eisgenerator - a shared library and application to generate EIS spectra
 // Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
 //
 // This file is part of eisgenerator.
@@ -340,7 +341,7 @@ static eis::DataPoint linearExtrapoloatePoint(fvalue omega, const std::vector<ei
 		<<"\n\tsloap: "<<imagReg.slope<<"\n\tstderror: "<<imagReg.stdError;
 
 	if(realReg.stdError > 3 || imagReg.stdError > 3)
-		throw std::invalid_argument("input data must be sufficantly linear");
+		throw std::invalid_argument("input data must be sufficiently linear");
 
 	std::complex<fvalue> expIm(realReg.slope*log10(omega)+realReg.offset, imagReg.slope*log10(omega)+imagReg.offset);
 
diff --git a/compcache.cpp b/compcache.cpp
index 249ad4e..28c5b55 100644
--- a/compcache.cpp
+++ b/compcache.cpp
@@ -1,5 +1,6 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 //
-// eisgenerator - a shared libary and application to generate EIS spectra
+// eisgenerator - a shared library and application to generate EIS spectra
 // Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
 //
 // This file is part of eisgenerator.
@@ -49,7 +50,7 @@ std::string eis::getTempdir()
 	{
 		if(!std::filesystem::create_directory(path))
 			throw std::runtime_error(path.string() +
-				"is not a directory and a directory can not be created at this locaion");
+				"is not a directory and a directory can not be created at this location");
 	}
 
 	return path.string();
diff --git a/compile-win.cpp b/compile-win.cpp
index 1f63f74..6501c07 100644
--- a/compile-win.cpp
+++ b/compile-win.cpp
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 //
 // eisgenerator - a shared libary and application to generate EIS spectra
 // Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
diff --git a/compile.cpp b/compile.cpp
index 83018ef..10481d6 100644
--- a/compile.cpp
+++ b/compile.cpp
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 //
 // eisgenerator - a shared libary and application to generate EIS spectra
 // Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
diff --git a/doc/DoxygenLayout.xml b/doc/DoxygenLayout.xml
index fd930d6..d94bfc2 100644
--- a/doc/DoxygenLayout.xml
+++ b/doc/DoxygenLayout.xml
@@ -29,7 +29,7 @@
       <tab type="modulelist" visible="yes" title="" intro=""/>
       <tab type="modulemembers" visible="yes" title="" intro=""/>
     </tab>
-    <tab type="namespaces" visible="yes" title="">
+    <tab type="namespaces" visible="no" title="">
       <tab type="namespacelist" visible="yes" title="" intro=""/>
       <tab type="namespacemembers" visible="yes" title="" intro=""/>
     </tab>
diff --git a/doc/libeisgenerator.doxygen.in b/doc/libeisgenerator.doxygen.in
index 8f33eeb..a2e801a 100644
--- a/doc/libeisgenerator.doxygen.in
+++ b/doc/libeisgenerator.doxygen.in
@@ -864,7 +864,7 @@ WARN_LOGFILE           =
 # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
 # Note: If this tag is empty the current directory is searched.
 
-INPUT                  = @CMAKE_CURRENT_SOURCE_DIR@/eisgenerator @CMAKE_CURRENT_BINARY_DIR@/doc/mainpage.md @CMAKE_CURRENT_BINARY_DIR@/doc/modelspage.md
+INPUT                  = @CMAKE_CURRENT_SOURCE_DIR@/eisgenerator @CMAKE_CURRENT_BINARY_DIR@/doc/mainpage.md @CMAKE_CURRENT_BINARY_DIR@/doc/modelspage.md @CMAKE_CURRENT_SOURCE_DIR@/README.md
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -1201,7 +1201,7 @@ HTML_STYLESHEET        =
 # list). For an example see the documentation.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_EXTRA_STYLESHEET  =
+HTML_EXTRA_STYLESHEET  = @CMAKE_CURRENT_SOURCE_DIR@/doc/style.css
 
 # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
 # other source files which should be copied to the HTML output directory. Note
@@ -2289,7 +2289,7 @@ HIDE_UNDOC_RELATIONS   = YES
 # set to NO
 # The default value is: NO.
 
-HAVE_DOT               = NO
+HAVE_DOT               = YES
 
 # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
 # to run in parallel. When set to 0 doxygen will base this on the number of
diff --git a/doc/mainpage.md.in b/doc/mainpage.md.in
index 1d77fb1..1f306cd 100644
--- a/doc/mainpage.md.in
+++ b/doc/mainpage.md.in
@@ -1,46 +1,53 @@
 \mainpage @PROJECT_NAME@ manual
 
-@PROJECT_NAME@ is a shared libary (lib@PROJECT_NAME@.so) and CLI application that allows one to generate EIS spectra with high performance. The target application is generateing test and example datasets for machine lerning applications.
-
-@PROJECT_NAME@'s development and target platform is GNU/Linux, but besides a c++20 compile and libstd++ it has no dependancies and should compile on nigh any platform.
-
-@PROJECT_NAME@ also has python bindings, not described here but note that useing these erases a lot of the performance benefit of using this libary
-
-for an example on how to use the libary see example tab above
-
-for a description on how the model description string used by this libary see \ref modelpage
+**@PROJECT_NAME@** is a C++ shared library (lib@PROJECT_NAME@.so) and CLI application that allows one to generate EIS spectra with high performance. The target application is generating test and example datasets for machine learning applications. @PROJECT_NAME@'s development and target platform is GNU/Linux, but besides a c++20 compiler and libstd++ it has no dependencies and should compile on nigh any platform. @PROJECT_NAME@ also has python bindings, not described here, but note that using these erases a lot of the performance benefit of using this library. For information on how to build this library please look at the \ref README
+
+for an example on how to use the library see example tab above, for API documentation start here:
+* eis::Model
+	* Main object used to evaluate equivalent circuits
+* \ref TYPES
+	* Various types used by @PROJECT_NAME@
+* \ref MATH
+	* Math functions that perform various calculations on @PROJECT_NAME@ types
+* \ref NORM
+	* Data normalization functions useful for machine-learning
+* \ref TRANS
+	* Functions to translate @PROJECT_NAME@ model strings to and from other formats
+
+for a description on how the model description string used by this library see \ref modelpage
 
 ## Execution models:
 
-lib@PROJECT_NAME@ incoperates three execution models to choose from depending on your workloads requirements:
+lib@PROJECT_NAME@ incorporates three execution models to choose from depending on your workloads requirements:
 
 ### Tree execution
 
 Upon invocation of eis::Model::Model the model string is parsed into a tree of objects. In the default tree execution the model parameters and frequencies are passed down the tree with the help of the virtual function tables of the the objects in question (black arrows). The results are then passed up the tree (blue arrows), see figure below:
 
-\image html DirectExecution.svg width=800px
+\image html DirectExecution.svg width=80%
 
-This execution model has the advantage of very low latency at the expense of throughput. It is most optimal if few impedances are to be calcuated.
-This exection model will be chosen by default.
+This execution model has the advantage of very low latency at the expense of throughput. It is most optimal if few impedances are to be calculated.
+This execution model will be chosen by default.
+This execution model is always chosen by the single data point eis::Model::execute variant.
 
 ### Compiled execution
 
-In compiled execution eis::Model::compile genreates a c++ function containing an implementation of of the equivalent circuit. This code is then compiled by gcc and loaded and cached by lib@PROJECT_NAME@. Subsiquent calls to eis::Model::compile will then use the cached object.
-Once a model has been compiled any Subsiquent use of the execute family of methods will us the compiled object instead of tree exection.
-This results in a speedup of 10x from the reduction in function call overhead and the usage of vectorization.
+In compiled execution eis::Model::compile generates a c++ function containing an implementation of of the equivalent circuit. This code is then compiled by GCC and loaded and cached by lib@PROJECT_NAME@. Subsequent calls to eis::Model::compile will then use the cached object.
+Once a model has been compiled any subsequent use of the execute family of methods will us the compiled object instead of tree execution.
+This results in a speedup of greater than 10x from the reduction in virtual function call overhead and the usage of auto-vectorization.
 
-\image html CompiledExecution.svg width=800px
+\image html CompiledExecution.svg width=80%
 
-This execution model is the most performant option when evalution of many impedances is desired and exection is to be performed on a cpu.
-This exection model is only available on UNIX and UNIX-like platforms provideing [dlopen()](https://man7.org/linux/man-pages/man3/dlopen.3.html) and [fork()](https://www.man7.org/linux/man-pages/man2/fork.2.html).
+This execution model is the most performant option when evaluation of many impedances is desired and execution is to be performed on a CPU.
+This execution model is only available on UNIX and UNIX-like platforms providing [dlopen()](https://man7.org/linux/man-pages/man3/dlopen.3.html) and [fork()](https://www.man7.org/linux/man-pages/man2/fork.2.html).
 
-### TorchScript exection
+### TorchScript execution
 
-The final exection model generates a [TorchScript](https://pytorch.org/docs/stable/jit.html) for the equivalent circuit which can be compiled using [torch::jit::compile](https://pytorch.org/cppdocs/api/function_namespacetorch_1_1jit_1a8660dc13a6b82336aadac667e6dccba1.html) into a graph of torch/rocBLAS/cuBLAS gpu kernels for gpu exection. This provides the highesst possble performance. Due to the high latency associated with executing gpu kernels this methods should only be expected to outperform compiled execution if 10^8 or more datapoints are required and only performs well when a large batch of datapoints is required at a time. This version is also highly advantagous when calculateing impedance spectra as part of a larger system requireing gpu execution as in this case expensive device->host->device copies are avoided. Though torch autograd this version also provides analytic derivatives makeing it usefull where integration into machine-lerning backward passes is required. Due to defficanies in the windows port of Torch this version massively underperforms on Microsoft Windows and another platform should be used.
+The final execution model generates a [TorchScript](https://pytorch.org/docs/stable/jit.html) for the equivalent circuit which can be compiled using [torch::jit::compile](https://pytorch.org/cppdocs/api/function_namespacetorch_1_1jit_1a8660dc13a6b82336aadac667e6dccba1.html) into a graph of torch/rocBLAS/cuBLAS GPU kernels for GPU execution. This provides the highest possible performance. Due to the high latency associated with executing GPU kernels this methods should only be expected to outperform compiled execution if 10^8 or more data points are required and only performs well when a large batch of data points is required at a time. This version is also highly advantageous when calculating impedance spectra as part of a larger system requiring GPU execution as in this case expensive device->host->device copies are avoided. Though torch autograd this version also provides atomatic derivatives making it useful where integration into machine-learning backward passes is required. Due to deficiencies in the windows port of Torch this version massively underperforms on Microsoft Windows and another platform should be used.
 
-\image html TorchExecution.svg width=800px
+\image html TorchExecution.svg width=80%
 
 -----------------------------------------------------------
 
-@PROJECT_NAME@ is licenced to you under the Gnu Lesser General Public License Version 3.0
+@PROJECT_NAME@ is licensed to you under the Gnu Lesser General Public License Version 3.0. All files part of @PROJECT_NAME@ are thus to be treated as LGPL-3.0 unless otherwise noted in the file.
 
diff --git a/doc/modelspage.md.in b/doc/modelspage.md.in
index 2b57b81..23b4c7c 100644
--- a/doc/modelspage.md.in
+++ b/doc/modelspage.md.in
@@ -1,8 +1,8 @@
 \page modelpage Model Format
 
-The model format of @PROJECT_NAME@ encodes any sieres/ parralell combination of implemented impedances
+The model format of @PROJECT_NAME@ encodes any series/ parallel combination of implemented impedances
 
-Curretly @PROJECT_NAME@ supports the following elements which eatch have a number of parameters:
+Currently @PROJECT_NAME@ supports the following elements which each have a number of parameters:
 * c: cap
 	* one parameter: capacitance {C}
 * r: resistor
@@ -10,43 +10,43 @@ Curretly @PROJECT_NAME@ supports the following elements which eatch have a numbe
 * l: inductor
 	* one parameter: inductance {L}
 * w: warburg element (infinite), one parameters {A}
-	* one parameter: Warburg coefficant {A}
+	* one parameter: Warburg coefficient {A}
 * p: constant phase element
 	* two parameters: {Q, alpha}
-* t: finite approximation of a transmition line
+* t: finite approximation of a transition line
 	* three parameters: capacitance, resistance, approximation order {C, R, n}
 
 ## Combinations
 
-Combinations of these elements are achived by writeing them against eatch other for a parralell combination, or with a '-' in between for serial combinatsions:
+Combinations of these elements are achieved by writing them against each other for a parallel combination, or with a '-' in between for serial combinations:
 
 "r-c" is thus a serial combination of a resistor and a capacitance:
 | r-c |
 | :---- |
 | \image html r-c.svg width=300px |
 
-While "cr" is a parralell combination of a resistor and a capacitance:
+While "cr" is a parallel combination of a resistor and a capacitance:
 | rc |
 | :---- |
 | \image html rc.svg width=300px |
 
-While "r-cr" is a parralell combination of a resistor and a capacitance in series with another resistance, not that the implicit parralell operator has operator precedence:
+While "r-cr" is a parallel combination of a resistor and a capacitance in series with another resistance, not that the implicit parallel operator has operator precedence:
 | r-cr |
 | :---- |
 | \image html r-rc.svg width=300px |
 
-Brakets ( and ) are also support and modify the order of operations as one would expect "(r-c)r" is a series combination of a resistor and a capacitance in parralell with another resistance:
+Brackets ( and ) are also support and modify the order of operations as one would expect "(r-c)r" is a series combination of a resistor and a capacitance in parallel with another resistance:
 | (r-c)r |
 | :---- |
 | \image html _r-c_r.svg width=300px |
 
 ## Parameters
 
-To pass circut element parameters to @PROJECT_NAME@ a format embedded into the strings is perfered. Parameters are passed by adding them in braces behind the element thus "r{100}-c{3e-6}r{1e4}" is a 100 Ohm resistor in series with a 3 Microfarad capacitance that is in parralell with  a 3 kOhm resistance.
+To pass circuit element parameters to @PROJECT_NAME@ a format embedded into the strings is preferred. Parameters are passed by adding them in braces behind the element thus "r{100}-c{3e-6}r{1e4}" is a 100 Ohm resistor in series with a 3 Microfarad capacitance that is in parallel with  a 3 kOhm resistance.
 
-When a element takes multiple parameters, those are seperated by a ',' like so: r{5e4}-p{1e-5, 0.8}
+When a element takes multiple parameters, those are separated by a ',' like so: r{5e4}-p{1e-5, 0.8}
 
-Ranges are also supported, here ~ is used as a seperator between the start and the end of a range, thus r{1~1e3} is a resistor with a value in a linear range between 1 and 1000 Ohms. By adding a trailing 'L' the range can be marked as distrobuted logathithmicly in base 10, thus  r{1~1e3L} is sutch a logarithmic range.
+Ranges are also supported, here ~ is used as a separator between the start and the end of a range, thus r{1~1e3} is a resistor with a value in a linear range between 1 and 1000 Ohms. By adding a trailing 'L' the range can be marked as distributed logarithmic in base 10, thus  r{1~1e3L} is such a logarithmic range.
 
 Ranges are used to make @PROJECT_NAME@ generate spectra for all combinations of parameters in the range(s) of the circuit elements.
 
diff --git a/eisgenerator/basicmath.h b/eisgenerator/basicmath.h
index a5b6f4e..b21aab8 100644
--- a/eisgenerator/basicmath.h
+++ b/eisgenerator/basicmath.h
@@ -1,4 +1,5 @@
-/* * eisgenerator - a shared libary and application to generate EIS spectra
+//SPDX-License-Identifier:         LGPL-3.0-or-later
+/* * eisgenerator - a shared library and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
  * This file is part of eisgenerator.
@@ -24,35 +25,35 @@
 namespace eis
 {
 	/**
-	Various math functions perfomed on eisgenerator types
+	Various math functions performed on eisgenerator types
 	* @defgroup MATH Math
 	* @{
 	*/
 
 	/**
-	* @brief Calculates the element wise absolute gradiant at the given point of the data given
+	* @brief Calculates the element wise absolute gradient at the given point of the data given
 	*
-	* @param data the data to calculate the gradiant on
-	* @param index the position in the data to calculate the gradiant at
-	* @return the element wise absolute gradiant abs(re(grad(a)))+abs(im(grad(a)))i
+	* @param data the data to calculate the gradient on
+	* @param index the position in the data to calculate the gradient at
+	* @return the element wise absolute gradient abs(re(grad(a)))+abs(im(grad(a)))i
 	*/
 	std::complex<fvalue> absGrad(const std::vector<eis::DataPoint>& data, size_t index);
 
 	/**
 	* @brief Calculates derivative at the given point of the data given
 	*
-	* @param data the data to calculate the gradiant on
-	* @param index the position in the data to calculate the gradiant at
+	* @param data the data to calculate the gradient on
+	* @param index the position in the data to calculate the gradient at
 	* @return the derivative
 	*/
 	fvalue grad(const std::vector<fvalue>& data, const std::vector<fvalue>& omega, size_t index);
 
 	/**
-	* @brief Calculates the gradiant at the given point of the data given
+	* @brief Calculates the gradient at the given point of the data given
 	*
-	* @param data the data to calculate the gradiant on
-	* @param index the position in the data to calculate the gradiant at
-	* @return the gradiant
+	* @param data the data to calculate the gradient on
+	* @param index the position in the data to calculate the gradient at
+	* @return the gradient
 	*/
 	std::complex<fvalue> grad(const std::vector<eis::DataPoint>& data, size_t index);
 
@@ -98,10 +99,10 @@ namespace eis
 	std::vector<eis::DataPoint> rescale(const std::vector<eis::DataPoint>& data, size_t outputSize);
 
 	/**
-	* @brief Calculates the pearson correlation between the imaginary and the real part of the data
+	* @brief Calculates the Pearson correlation between the imaginary and the real part of the data
 	*
-	* @param data data caluclate the pearson correlation on
-	* @return the pearson correlation coefficent
+	* @param data data to calculate the Pearson correlation on
+	* @return the Pearson correlation coefficient
 	*/
 	fvalue pearsonCorrelation(const std::vector<eis::DataPoint>& data);
 
@@ -110,12 +111,12 @@ namespace eis
 	*
 	* @param data the data to calculate on
 	* @param centroid the centroid to use, if nullptr is passed here, the mean of the data will be used as the centroid
-	* @return the pearson correlation coefficent
+	* @return the Pearson correlation coefficient
 	*/
 	fvalue nyquistAreaVariance(const std::vector<eis::DataPoint>& data, eis::DataPoint* centroid = nullptr);
 
 	/**
-	* @brief Finds the maximum distance between subsiquent points in the data in the nyquist plane
+	* @brief Finds the maximum distance between subsequent points in the data in the nyquist plane
 	*
 	* @param data the data to use
 	* @return the largest distance
@@ -133,7 +134,7 @@ namespace eis
 
 	/**
 	* @brief Removes duplicate data points form the data
-	* duplicates are detected by checking the value of omega for samenes using fvalueEq with the default ulp
+	* duplicates are detected by checking the value of omega for sameness using fvalueEq with the default ulp
 	*
 	* @param data the data to remove duplicates from
 	*/
@@ -144,21 +145,21 @@ namespace eis
 	*
 	* Equality is considered given when the values are within ulp epsilons at the magnitude of the sum of operands.
 	*
-	* @param a the first value to compeare
-	* @param b the second value to compeare
+	* @param a the first value to compare
+	* @param b the second value to compare
 	* @return true if equal, false if unequal
 	*/
 	bool fvalueEq(fvalue a, fvalue b, unsigned int ulp = 4);
 
 	/**
-	* @brief this function resamples, extrapolates and intrapolates to fit the data given to the frequencies also given
+	* @brief this function resamples, extrapolates and interpolates to fit the data given to the frequencies also given
 	*
-	* Data is resampled to the target size, iterpolation for datapoints is performed using linear interpolation
+	* Data is resampled to the target size, interpolation for data points is performed using linear interpolation
 	* extrapolation is performed using linear or base 10 logarithmic extrapolation.
 	*
 	* @param omegas the frequencies to resample the data to
 	* @param data the data to resample
-	* @param linearExtrapolation true if linear extrapolation is to be perfomed, otherwise base 10 logarithmic extrapolation is used
+	* @param linearExtrapolation true if linear extrapolation is to be performed, otherwise base 10 logarithmic extrapolation is used
 	* @return the resampled data
 	*/
 	std::vector<eis::DataPoint> fitToFrequencies(std::vector<fvalue> omegas,
diff --git a/eisgenerator/componant/cap.h b/eisgenerator/componant/cap.h
index 3d40073..50fa9b5 100644
--- a/eisgenerator/componant/cap.h
+++ b/eisgenerator/componant/cap.h
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 /* * eisgenerator - a shared libary and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
diff --git a/eisgenerator/componant/componant.h b/eisgenerator/componant/componant.h
index 330d497..991b849 100644
--- a/eisgenerator/componant/componant.h
+++ b/eisgenerator/componant/componant.h
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 /* * eisgenerator - a shared libary and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
diff --git a/eisgenerator/componant/constantphase.h b/eisgenerator/componant/constantphase.h
index ffc7786..06d4e33 100644
--- a/eisgenerator/componant/constantphase.h
+++ b/eisgenerator/componant/constantphase.h
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 /* * eisgenerator - a shared libary and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
diff --git a/eisgenerator/componant/finitetr.h b/eisgenerator/componant/finitetr.h
index 7c4b7c6..0f94a38 100644
--- a/eisgenerator/componant/finitetr.h
+++ b/eisgenerator/componant/finitetr.h
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 /* * eisgenerator - a shared libary and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
diff --git a/eisgenerator/componant/inductor.h b/eisgenerator/componant/inductor.h
index f6edc98..2638e56 100644
--- a/eisgenerator/componant/inductor.h
+++ b/eisgenerator/componant/inductor.h
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 /* * eisgenerator - a shared libary and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
diff --git a/eisgenerator/componant/paralellseriel.h b/eisgenerator/componant/paralellseriel.h
index 7ce2c79..914e127 100644
--- a/eisgenerator/componant/paralellseriel.h
+++ b/eisgenerator/componant/paralellseriel.h
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 /* * eisgenerator - a shared libary and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
diff --git a/eisgenerator/componant/resistor.h b/eisgenerator/componant/resistor.h
index 0a75fed..2062257 100644
--- a/eisgenerator/componant/resistor.h
+++ b/eisgenerator/componant/resistor.h
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 /* * eisgenerator - a shared libary and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
diff --git a/eisgenerator/componant/warburg.h b/eisgenerator/componant/warburg.h
index 6dc94b3..f0aab46 100644
--- a/eisgenerator/componant/warburg.h
+++ b/eisgenerator/componant/warburg.h
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 /* * eisgenerator - a shared libary and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
diff --git a/eisgenerator/eistype.h b/eisgenerator/eistype.h
index da1d607..020eef1 100644
--- a/eisgenerator/eistype.h
+++ b/eisgenerator/eistype.h
@@ -1,4 +1,5 @@
-/* * eisgenerator - a shared libary and application to generate EIS spectra
+//SPDX-License-Identifier:         LGPL-3.0-or-later
+/* * eisgenerator - a shared library and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
  * This file is part of eisgenerator.
@@ -40,7 +41,7 @@ namespace eis
 */
 
 /**
-* @brief Basic singluar EIS data point
+* @brief Basic singular EIS data point
 */
 class DataPoint
 {
@@ -110,13 +111,13 @@ class Range
 public:
 	fvalue start; /**< Start of the range*/
 	fvalue end; /**< End of the range*/
-	size_t count = 0; /**< Numer of elements in the range*/
+	size_t count = 0; /**< Number of elements in the range*/
 	size_t step = 0; /**< Currently active step*/
 	bool log = false; /**< True if the elements in the range are to be spaced in log10 increments*/
 
 	/**
-	* @brief calculats the distance between elements in the range
-	* will calcuate the log10 of the distance if the range is logarithmic
+	* @brief calculates the distance between elements in the range
+	* will calculate the log10 of the distance if the range is logarithmic
 	*
 	* @return the distance between steps of this range
 	*/
@@ -128,7 +129,7 @@ public:
 	}
 
 	/**
-	* @brief calucates the value of the current step
+	* @brief calculates the value of the current step
 	*
 	* @return the value of the current step
 	*/
@@ -138,7 +139,7 @@ public:
 	}
 
 	/**
-	* @brief calucates the mean of the start and the end values
+	* @brief calculates the mean of the start and the end values
 	*
 	* @return the mean of the start and the end values
 	*/
@@ -148,7 +149,7 @@ public:
 	}
 
 	/**
-	* @brief calucates the value at the given index
+	* @brief calculates the value at the given index
 	*
 	* @return the value at the given index
 	*/
@@ -191,7 +192,7 @@ public:
 	void print(int level) const;
 
 	/**
-	* @brief gets a machine parsable string encodeing this range
+	* @brief gets a machine parseable string encoding this range
 	*
 	* @return the string
 	*/
@@ -199,21 +200,21 @@ public:
 
 	/**
 	* @brief checks if the values of this range are sane
-	* this checks for some common errors like haveing a end < beign
+	* this checks for some common errors like having a end < being
 	*
 	* @return true if sane, false if not
 	*/
 	bool isSane() const;
 
 	/**
-	* @brief this function consturcts a vector that contains all elements of this range
+	* @brief this function constructs a vector that contains all elements of this range
 	*
-	* @return the vector with the elments of this range
+	* @return the vector with the elements of this range
 	*/
 	std::vector<fvalue> getRangeVector() const;
 
 	/**
-	* @brief this function creates a range from the parsable string
+	* @brief this function creates a range from the parseable string
 	*
 	* @throw std::invalid_argument when the string syntax is incorrect
 	* @return the range that was parsed from the string
@@ -221,7 +222,7 @@ public:
 	[[nodiscard]] static Range fromString(std::string str, size_t count);
 
 	/**
-	* @brief this function creates a vector ranges from the parsable parameter array string
+	* @brief this function creates a vector ranges from the parseable parameter array string
 	*
 	* @throw std::invalid_argument when the string syntax is incorrect
 	* @return the vector of ranges that was parsed from the string
@@ -273,8 +274,8 @@ public:
 	* @brief Constructs a EisSpectra
 	*
 	* @param data vector of the data points of the spectra
-	* @param model model descritpion string for this spectra
-	* @param header a freform text that will be inclded in any save of this spectra
+	* @param model model description string for this spectra
+	* @param header a free-form text that will be included in any save of this spectra
 	* @param labels an optional vector of giving the values of the inputs of the model to get this spectra
 	* @param labelNames an optional vector of names describing every input of the model
 	*/
@@ -284,11 +285,11 @@ public:
 
 	/**
 	* @brief Constructs a EisSpectra
-	* this function differes from the above only in the datatype of the label
+	* this function differs from the above only in the datatype of the label
 	*
 	* @param data vector of the data points of the spectra
-	* @param model model descritpion string for this spectra
-	* @param header a freform text that will be inclded in any save of this spectra
+	* @param model model description string for this spectra
+	* @param header a free-form text that will be included in any save of this spectra
 	* @param labels an optional vector of giving the values of the inputs of the model to get this spectra
 	* @param labelNames an optional vector of names describing every input of the model
 	*/
@@ -297,11 +298,11 @@ public:
 
 	/**
 	* @brief Constructs a EisSpectra
-	* this function differes from the above only in the datatype of the label
+	* this function differs from the above only in the datatype of the label
 	*
 	* @param data vector of the data points of the spectra
-	* @param model model descritpion string for this spectra
-	* @param header a freform text that will be inclded in any save of this spectra
+	* @param model model description string for this spectra
+	* @param header a free-from text that will be included in any save of this spectra
 	* @param labels an optional vector of giving the values of the inputs of the model to get this spectra
 	* @param labelNames an optional vector of names describing every input of the model
 	*/
@@ -310,12 +311,12 @@ public:
 
 	/**
 	* @brief Constructs a EisSpectra
-	* this function differes from the above only in the datatype of the label
+	* this function differs from the above only in the datatype of the label
 	*
 	* @param data vector of the data points of the spectra
-	* @param model model descritpion string for this spectra
-	* @param header a freeform text that will be inclded in any save of this spectra
-	* @param label a value corrisponding to all inputs of the model
+	* @param model model description string for this spectra
+	* @param header a free-form text that will be included in any save of this spectra
+	* @param label a value corresponding to all inputs of the model
 	* @param maxLabel the number of inputs of the model
 	*/
 	EisSpectra(const std::vector<DataPoint>& data, const std::string& model, const std::string& header,
@@ -409,15 +410,15 @@ public:
 	/**
 	* @brief Saves the spectra to disk
 	*
-	* @param path a path to the file on disk where the spectra shal be saved
-	* @return true on sucess, false on failure
+	* @param path a path to the file on disk where the spectra shall be saved
+	* @return true on success, false on failure
 	*/
 	bool saveToDisk(const std::filesystem::path& path) const;
 
 	/**
 	 * @brief Saves the spectra in the given stream
 	 *
-	 * @param stream a std::ostream into which the specta will be saved
+	 * @param stream a std::ostream into which the spectra will be saved
 	 */
 	void saveToStream(std::ostream& stream) const;
 };
@@ -450,7 +451,7 @@ fvalue eisDistance(const std::vector<eis::DataPoint>& a, const std::vector<eis::
 
 
 /**
-* @brief Returns the mean distance of the points in a to the linearly interporlated nyquist curve of b
+* @brief Returns the mean distance of the points in a to the linearly interpolated nyquist curve of b
 *
 * This implementation is quite slow
 *
diff --git a/eisgenerator/log.h b/eisgenerator/log.h
index d4240ca..940a601 100644
--- a/eisgenerator/log.h
+++ b/eisgenerator/log.h
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 /**
 * eisgenerator
 * Copyright (C) 2021 Carl Klemm
diff --git a/eisgenerator/model.h b/eisgenerator/model.h
index 8ee13dd..e9fde88 100644
--- a/eisgenerator/model.h
+++ b/eisgenerator/model.h
@@ -1,4 +1,5 @@
-/* * eisgenerator - a shared libary and application to generate EIS spectra
+//SPDX-License-Identifier:         LGPL-3.0-or-later
+/* * eisgenerator - a shared library and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
  * This file is part of eisgenerator.
@@ -40,7 +41,7 @@ struct CompiledObject;
 */
 
 /**
-* @brief The main class of eisgenerator reprisenting a equivalent circuit model
+* @brief The main class of eisgenerator representing a equivalent circuit model
 */
 class Model
 {
@@ -71,7 +72,7 @@ public:
 	* @throws parse_errror
 	* @param str the model string to create a model object for
 	* @param paramSweepCount optionally the number of sweep point to use for parameter sweeps
-	* @param defaultToRange optionally a bool that if true, circut elements not given in str are defaulted to a range instead of a fixed value
+	* @param defaultToRange optionally a bool that if true, circuit elements not given in str are defaulted to a range instead of a fixed value
 	*/
 	Model(const std::string& str, size_t paramSweepCount = 100, bool defaultToRange = true);
 	Model(const Model& in);
@@ -79,7 +80,7 @@ public:
 	~Model();
 
 	/**
-	* @brief Ajusts the sweep count so that the total of spectra that need to be generated in the parameter sweep is close to the given value
+	* @brief Adjusts the sweep count so that the total of spectra that need to be generated in the parameter sweep is close to the given value
 	*
 	* @param totalCount the total number of spectra to target
 	* @return the number of spectra that will be generated by a parameter sweep after calling this function, should be close to, but may not be exactly totalCount
@@ -91,7 +92,7 @@ public:
 	* this method calls resolveSteps
 	*
 	* @param omega the frequency in rad/s to calculate the impedance at
-	* @param index an optional intex to the parameter sweep step at which to calculate the impedance
+	* @param index an optional index to the parameter sweep step at which to calculate the impedance
 	* @return a DataPoint struct containing the result
 	*/
 	DataPoint execute(fvalue omaga, size_t index = 0);
@@ -101,7 +102,7 @@ public:
 	* this method calls resolveSteps
 	*
 	* @param omega the range along which to execute a frequency sweep
-	* @param index an optional intex to the parameter sweep step at which to calculate the impedance
+	* @param index an optional index to the parameter sweep step at which to calculate the impedance
 	* @return a vector of DataPoint structs containing the impedance at every frequency in the sweep
 	*/
 	std::vector<DataPoint> executeSweep(const Range& omega, size_t index = 0);
@@ -109,14 +110,14 @@ public:
 	/**
 	* @brief Executes a frequency sweep with the given omega values
 	*
-	* @param omega a vector of frequencyies in rad/s to calculate the impedance at
-	* @param index an optional intex to the parameter sweep step at which to calculate the impedance
+	* @param omega a vector of frequencies in rad/s to calculate the impedance at
+	* @param index an optional index to the parameter sweep step at which to calculate the impedance
 	* @return a vector of DataPoint structs containing the impedance at every frequency in the sweep
 	*/
 	std::vector<DataPoint> executeSweep(const std::vector<fvalue>& omega, size_t index = 0);
 
 	/**
-	* @brief Executes a frequency sweep with the given omega values for eatch parameter combination in the applied parameter sweep
+	* @brief Executes a frequency sweep with the given omega values for each parameter combination in the applied parameter sweep
 	* this method calls resolveSteps
 	*
 	* @param omega the range along which to execute a frequency sweep
@@ -125,31 +126,31 @@ public:
 	std::vector<std::vector<DataPoint>> executeAllSweeps(const Range& omega);
 
 	/**
-	* @brief Returns the model string corrisponding to this model object, without embeded parameters
+	* @brief Returns the model string corresponding to this model object, without embedded parameters
 	*
-	* @return the model string corrisponding to this model object, without embeded parameters
+	* @return the model string corresponding to this model object, without embedded parameters
 	*/
 	std::string getModelStr() const;
 
 	/**
-	* @brief Returns the model string corrisponding to this model object, with embeded parameters
+	* @brief Returns the model string corresponding to this model object, with embedded parameters
 	* this method calls resolveSteps
 	*
 	* @param index the parameter sweep index for which to embed the parameters
-	* @return the model string corrisponding to this model object, with embeded parameters
+	* @return the model string corresponding to this model object, with embedded parameters
 	*/
 	std::string getModelStrWithParam(size_t index);
 
 	/**
-	* @brief Returns the model string corrisponding to this model object, with embeded parameters
+	* @brief Returns the model string corresponding to this model object, with embedded parameters
 	* the parameter sweep index of the last call to resolveSteps or 0 is used
 	*
-	* @return the model string corrisponding to this model object, with embeded parameters
+	* @return the model string corresponding to this model object, with embedded parameters
 	*/
 	std::string getModelStrWithParam() const;
 
 	/**
-	* @brief Returns a uinique id that is unique for this circut, but not for this object specifically
+	* @brief Returns a unique id that is unique for this circuit, but not for this object specifically
 
 	* @return the uid
 	*/
@@ -157,7 +158,7 @@ public:
 
 	/**
 	* @brief Returns a vector of pointers to the circuit elements in this model
-	* the pointers can only be assumbed to be valid until the next member call to this model object
+	* the pointers can only be assumed to be valid until the next member call to this model object
 	*
 	* @param model for internal use only
 	* @return a vector of the circuit elements in the model
@@ -179,9 +180,9 @@ public:
 	std::vector<Range> getFlatParameterRanges();
 
 	/**
-	* @brief gets the default ranges of the parameters of eatch type of circuit elemen used in the model
+	* @brief gets the default ranges of the parameters of each type of circuit element used in the model
 	*
-	* @return the default ranges of the parameters of eatch type of circuit elemen used in the model
+	* @return the default ranges of the parameters of each type of circuit element used in the model
 	*/
 	std::vector<Range> getDefaultParameters();
 
@@ -202,10 +203,10 @@ public:
 	* This function is slow, but results are cached for the lifetime of process linked to libeisgenerator
 	* so that a circuit has to be compiled only once and can then be used by any number of Model objects.
 	*
-	* This function is only implemented on UNIX, on other platforms this function will allways return false.
-	* This function also requires that gcc be availble in PATH.
+	* This function is only implemented on UNIX, on other platforms this function will always return false.
+	* This function also requires that GCC be available in PATH.
 	*
-	* @return true if compile was sucessfull, false otherwise
+	* @return true if compile was successful, false otherwise
 	*/
 	bool compile();
 
@@ -231,16 +232,16 @@ public:
 	size_t getRequiredStepsForSweeps();
 
 	/**
-	* @brief checks if the model is a sweep (ie has at least one paramter with a range)
+	* @brief checks if the model is a sweep (i.e. has at least one parameter with a range)
 	*
 	* @return true if the model contains a parameter sweep, false otherwise
 	*/
 	bool isParamSweep();
 
 	/**
-	* @brief compiles this model into efficant c++ code corrisponding to the circuit of this model
+	* @brief compiles this model into efficient c++ code corresponding to the circuit of this model
 	*
-	* @return the code or an empty string if compilation was unsucessfull
+	* @return the code or an empty string if compilation was unsuccessfully
 	*/
 	std::string getCode();
 
@@ -248,7 +249,7 @@ public:
 	* @brief compiles this model into TorchScript
 	* to be compiled by torch::jit::compile
 	*
-	* @return the TorchScript code or an empty string if compilation was unsucessfull
+	* @return the TorchScript code or an empty string if compilation was unsuccessful
 	*/
 	std::string getTorchScript();
 
diff --git a/eisgenerator/normalize.h b/eisgenerator/normalize.h
index ee5592e..497ca05 100644
--- a/eisgenerator/normalize.h
+++ b/eisgenerator/normalize.h
@@ -1,4 +1,5 @@
-/* * eisgenerator - a shared libary and application to generate EIS spectra
+//SPDX-License-Identifier:         LGPL-3.0-or-later
+/* * eisgenerator - a shared library and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
  * This file is part of eisgenerator.
@@ -43,7 +44,7 @@ void normalize(std::vector<eis::DataPoint>& data);
 
 /**
 * @brief Reduces the data by removing "uninteresting"  regions
-* Uninteresting regions are detemined by takeing the first and second derivative and removeing the areas where these change very little
+* Uninteresting regions are determined by taking the first and second derivative and removing the areas where these change very little
 *
 * @param data the data to reduce
 * @return the reduced data
@@ -51,9 +52,9 @@ void normalize(std::vector<eis::DataPoint>& data);
 std::vector<eis::DataPoint> reduceRegion(const std::vector<eis::DataPoint>& data, fvalue gradThreshFactor = 0.01, bool useSecondDeiv = false);
 
 /**
-* @brief Removes INF and NAN from the dataset by interpolateing from neighboring points
+* @brief Removes INF and NAN from the dataset by interpolating from neighboring points
 *
-* This function is not availbe when this libary is compiled with fast math enabled
+* This function is not available when this library is compiled with fast math enabled
 *
 * As a side effect, this function caps spikes to +-INF to +-10 maximally
 *
diff --git a/eisgenerator/translators.h b/eisgenerator/translators.h
index 97d0184..464d98f 100644
--- a/eisgenerator/translators.h
+++ b/eisgenerator/translators.h
@@ -1,4 +1,5 @@
-/* * eisgenerator - a shared libary and application to generate EIS spectra
+//SPDX-License-Identifier:         LGPL-3.0-or-later
+/* * eisgenerator - a shared library and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
  * This file is part of eisgenerator.
@@ -55,7 +56,7 @@ std::string relaxisToEis(const std::string& in, const std::vector<double>& param
 std::string eisToRelaxis(const std::string& in);
 
 /**
-* @brief Translates a Boukamp Circut Description Code (CDC) string into the format used by this library
+* @brief Translates a Boukamp Circuit Description Code (CDC) string into the format used by this library
 *
 * @throws parse_errror
 * @param in the CDC string
@@ -64,7 +65,7 @@ std::string eisToRelaxis(const std::string& in);
 std::string cdcToEis(std::string in);
 
 /**
-* @brief Translates a string for this library a Boukamp Circut Description Code (CDC)
+* @brief Translates a string for this library a Boukamp Circuit Description Code (CDC)
 *
 * Note that any parameters embedded into the eisgenerator model string will be striped and
 * not included in the CDC.
@@ -79,8 +80,8 @@ std::string eisToCdc(const std::string& in);
 * @brief Translates a model description string as used by the MADAP library into the format used by this library
 
 * @param in a model description string as used by the MADAP library
-* @param parameters optinally a string containing the parameters of the model in MADAP parameter format
-* @return the eisgenerator model string optinally including embedded parameters
+* @param parameters optionally a string containing the parameters of the model in MADAP parameter format
+* @return the eisgenerator model string optionally including embedded parameters
 */
 std::string madapToEis(const std::string& in, const std::string& parameters = "");
 
diff --git a/eistype.cpp b/eistype.cpp
index c6e4339..5900750 100644
--- a/eistype.cpp
+++ b/eistype.cpp
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 //
 // eisgenerator - a shared libary and application to generate EIS spectra
 // Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
diff --git a/examples/compileing.cpp b/examples/compileing.cpp
index 9f9e9c4..fc1ae37 100644
--- a/examples/compileing.cpp
+++ b/examples/compileing.cpp
@@ -1,22 +1,4 @@
-//
-// eisgenerator - a shared libary and application to generate EIS spectra
-// Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
-//
-// This file is part of eisgenerator.
-//
-// eisgenerator is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// eisgenerator is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with eisgenerator.  If not, see <http://www.gnu.org/licenses/>.
-//
+//SPDX-License-Identifier:        MIT
 
 #include <iostream>
 #include <eisgenerator/model.h>
diff --git a/examples/simple.cpp b/examples/simple.cpp
index 42eab59..8c292ac 100644
--- a/examples/simple.cpp
+++ b/examples/simple.cpp
@@ -1,22 +1,4 @@
-//
-// eisgenerator - a shared libary and application to generate EIS spectra
-// Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
-//
-// This file is part of eisgenerator.
-//
-// eisgenerator is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// eisgenerator is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with eisgenerator.  If not, see <http://www.gnu.org/licenses/>.
-//
+//SPDX-License-Identifier:        MIT
 
 #include <iostream>
 #include <eisgenerator/model.h>
diff --git a/examples/torchscript.cpp b/examples/torchscript.cpp
index 149a3b9..bd1ff65 100644
--- a/examples/torchscript.cpp
+++ b/examples/torchscript.cpp
@@ -1,22 +1,4 @@
-//
-// eisgenerator - a shared libary and application to generate EIS spectra
-// Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
-//
-// This file is part of eisgenerator.
-//
-// eisgenerator is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// eisgenerator is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with eisgenerator.  If not, see <http://www.gnu.org/licenses/>.
-//
+//SPDX-License-Identifier:        MIT
 
 #include <iostream>
 #include <eisgenerator/model.h>
diff --git a/lgpl-3.0.txt b/lgpl-3.0.txt
new file mode 100644
index 0000000..0a04128
--- /dev/null
+++ b/lgpl-3.0.txt
@@ -0,0 +1,165 @@
+                   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/linearregession.cpp b/linearregession.cpp
index 67b51dc..54f0c81 100644
--- a/linearregession.cpp
+++ b/linearregession.cpp
@@ -1,5 +1,6 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 //
-// eisgenerator - a shared libary and application to generate EIS spectra
+// eisgenerator - a shared library and application to generate EIS spectra
 // Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
 //
 // This file is part of eisgenerator.
diff --git a/linearregession.h b/linearregession.h
index 628c027..435dea7 100644
--- a/linearregession.h
+++ b/linearregession.h
@@ -1,4 +1,5 @@
-/* * eisgenerator - a shared libary and application to generate EIS spectra
+//SPDX-License-Identifier:         LGPL-3.0-or-later
+/* * eisgenerator - a shared library and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
  * This file is part of eisgenerator.
diff --git a/log.cpp b/log.cpp
index fc50c58..6843395 100644
--- a/log.cpp
+++ b/log.cpp
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 /**
 * Lubricant Detecter
 * Copyright (C) 2021 Carl Klemm
diff --git a/main.cpp b/main.cpp
index 5ddac9d..baee762 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 //
 // eisgenerator - a shared libary and application to generate EIS spectra
 // Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
diff --git a/model.cpp b/model.cpp
index b55f388..21e0892 100644
--- a/model.cpp
+++ b/model.cpp
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 //
 // eisgenerator - a shared libary and application to generate EIS spectra
 // Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
diff --git a/normalize.cpp b/normalize.cpp
index d772ffe..3a47036 100644
--- a/normalize.cpp
+++ b/normalize.cpp
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 //
 // eisgenerator - a shared libary and application to generate EIS spectra
 // Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
diff --git a/options.h b/options.h
index 27c73a5..ea8b208 100644
--- a/options.h
+++ b/options.h
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 /* * eisgenerator - a shared libary and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
diff --git a/randomgen.cpp b/randomgen.cpp
index de94bf4..f96e6d6 100644
--- a/randomgen.cpp
+++ b/randomgen.cpp
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 //
 // eisgenerator - a shared libary and application to generate EIS spectra
 // Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
diff --git a/randomgen.h b/randomgen.h
index b24c001..37be55d 100644
--- a/randomgen.h
+++ b/randomgen.h
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 /* * eisgenerator - a shared libary and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
diff --git a/strops.cpp b/strops.cpp
index ce5ab26..5fc6644 100644
--- a/strops.cpp
+++ b/strops.cpp
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 //
 // eisgenerator - a shared libary and application to generate EIS spectra
 // Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
diff --git a/strops.h b/strops.h
index 6db5a33..e844c74 100644
--- a/strops.h
+++ b/strops.h
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 /* * eisgenerator - a shared libary and application to generate EIS spectra
  * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
  *
diff --git a/test.cpp b/test.cpp
index c50ac54..5ed71c0 100644
--- a/test.cpp
+++ b/test.cpp
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 //
 // eisgenerator - a shared libary and application to generate EIS spectra
 // Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
diff --git a/translators.cpp b/translators.cpp
index e9c9d8e..8cfee08 100644
--- a/translators.cpp
+++ b/translators.cpp
@@ -1,3 +1,4 @@
+//SPDX-License-Identifier:         LGPL-3.0-or-later
 //
 // eisgenerator - a shared libary and application to generate EIS spectra
 // Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
-- 
GitLab