tikhonovrelaxationspectra
Generate relaxation spectra from transient stress relaxation data via Tikhonov regularization.
https://github.com/supramolecular-polymer-chemistry/tikhonovrelaxationspectra
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.8%) to scientific vocabulary
Repository
Generate relaxation spectra from transient stress relaxation data via Tikhonov regularization.
Basic Info
- Host: GitHub
- Owner: Supramolecular-Polymer-Chemistry
- License: gpl-3.0
- Language: Python
- Default Branch: main
- Size: 808 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Tikhonov Relaxation Spectra Analysis

Purpose
This Python script analyzes time-dependent relaxation data to identify relaxation modes using Tikhonov regularization. It includes automated selection of the regularization parameter through L-curve analysis. The script is adapted from established numerical methods and is intended for use by experimental researchers without prior coding experience.
The Python script that was made for this work is built in such a manner that settings can be changed intuitively when an integrated development environment (IDE) is used. For operation of the script, no prior knowledge is required about Python or the underlying algorithms.
For more background information on the method and especially the limits of this script, refer to the associated article and its supporting information:
Wink, R. et al. "Title of the Paper." Journal Name, Volume(Issue), Year. [DOI or URL]
Requirements
- Python 3.x (Anaconda recommended)
- Spyder IDE (or any Python IDE of choice)
- Required packages:
- numpy
- matplotlib
- scipy
All required packages are included by default in the Anaconda distribution.
Spyder can be downloaded via the website.
File Structure
Download the tikhonov_relaxation_spectrum.py script from this GitHub, and place the script and data files in a structured folder layout. For example:
your_project_folder/
├── tikhonov_relaxation_spectrum.py
├── data/
│ └── input_data.txt
The script uses relative file paths, meaning file locations are interpreted with respect to the folder where the script is run.
Usage Instructions
- Open the script in Spyder.
- At the top of the script, modify only the following settings:
```python datainput = 'data\inputdata.txt' dataoutput = 'data\outputdata.txt'
export_lcurve = True ```
data_input: Path to the input file (TXT format with two columns; see below).data_output: Path where the output (relaxation spectrum) will be saved.export_lcurve: Set toTrueto also export the L-curve data and selected regularization parameter. Otherwise, set toFalse
Note that any name could be used for the names of the files, to the user's discretion.
- Run the script (press F5 or use the Run button).
Input Format
The input file should be a plain text file with two columns:
- First column: time values (e.g. in seconds)
- Second column: corresponding experimental data
Data columns should be separated by whitespace or tabs. If the user prefers a different delimiter, one could chage the code to define one, in line 502:
python
import_file = np.loadtxt(data_input, delimiter=',')
No header row should be included.
Output
The plots will appear in the Spyder plot viewer. No images are exported unless manually saved.
- A plot of the computed relaxation spectrum
- A plot of the L-curve with the selected corner
- Output text file containing the relaxation spectrum (data_output; in the example above output_data.txt). This contains two columns, the relaxation times and their respective relaxation strengths. Note that the relaxation times will be in the same unit as the provided time data.
- If enabled, a second file with the L-curve data will be created containing three columns (in the example above output_data_lcurve.txt). This contains:
- On the first line: the optimal regression parameter, the residual- and the solution norm at the corner of the L-curve.
- The rest of the file: all 200 tested regularization parameters, and the found residual- and the solution norms.
- The optimal regularization parameter and the peak in relaxation time are also printed to the console.
Notes
- The script uses singular value decomposition and Tikhonov regularization. Familiarity with these methods is not required, but it is helpful for interpreting the results.
- Make sure the input data is properly formatted and does not contain missing or malformed values. Initial measurement noise (e.g. due to step-raise) must be deleted. The script is agnostic against normalization of the data. Example input- and output data can be found in the data folder.
Author
Roy Wink, 2025\ Eindhoven University of Technology\ Department of Chemical Engineering & Chemistry\ Laboratory of Supramolecular Polymer Chemistry
License
This project is licensed under the GNU General Public License v3.0.
You are free to use, study, share and modify the code under the following conditions:
- Any distributed version of the software must also be licensed under GPL v3.
- If you modify the code and distribute it, you must also share the source code.
- The original copyright notice and license must be preserved.
For the full license text, see the LICENCE.md file, or
https://www.gnu.org/licenses/gpl-3.0.html
Users of the code are kindly requested to cite the associated article when employing the code in scientific work.
Owner
- Name: Supramolecular Polymer Chemistry
- Login: Supramolecular-Polymer-Chemistry
- Kind: organization
- Website: https://sijbesmalab.nl/
- Repositories: 1
- Profile: https://github.com/Supramolecular-Polymer-Chemistry
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "YOUR_NAME_HERE" given-names: "YOUR_NAME_HERE" orcid: "https://orcid.org/0000-0000-0000-0000" - family-names: "Lisa" given-names: "Mona" orcid: "https://orcid.org/0000-0000-0000-0000" title: "TikhonovRelaxationSpectra" version: 1.0.0 doi: 10.5281/zenodo.1234 date-released: 2025-04-17 url: "https://github.com/Supramolecular-Polymer-Chemistry/TikhonovRelaxationSpectra"
GitHub Events
Total
- Push event: 2
- Public event: 1
- Create event: 2
Last Year
- Push event: 2
- Public event: 1
- Create event: 2