Extract continuous and discrete relaxation spectra from G(t)

Overview

pyReSpect-time

Extract continuous and discrete relaxation spectra from stress relaxation modulus G(t). The papers which describe the method and test cases are:

  • Shanbhag, S., "pyReSpect: A Computer Program to Extract Discrete and Continuous Spectra from Stress Relaxation Experiments", Macromolecular Theory and Simulations, 2019, 1900005 [doi: 10.1002/mats.201900005].
  • Takeh, A. and Shanbhag, S. "A computer program to extract the continuous and discrete relaxation spectra from dynamic viscoelastic measurements", Appl. Rheol. 2013, 23, 24628.

Files

Code Files

This repository contains two python modules contSpec.py discSpec.py. They extract the continuous and discrete relaxation spectra from a stress relaxation data. (t versus G(t) experiment or simulation).

It containts a third module common.py which contains utilities required by both contSpec.py and discSpec.py.

In addition to the python modules, a jupyter notebook interactContSpec.ipynb is also provisionally included. This allows the user to experiment with parameter settings interactively.

Input Files

The user is expected to supply two files:

  • inp.dat is used to control parameters and settings
  • Gt.dat which contains two columns of data t and G(t)

Output Files

Text files containting output from the code are stored in a directory output/. These include a fit of the data, the spectra, and other files relevant to the continuous or discrete spectra calculation.

Graphical and onscreen output can be suppressed by appropriate flags in inp.dat.

Test Files

A bunch of test files are supplied in the folder tests/. These data are described in the paper: Shanbhag, S., "pyReSpect: A Computer Program to Extract Discrete and Continuous Spectra from Stress Relaxation Experiments" which will appear in Macromolecular Theory and Simulations in 2019.

Usage

Once inp.dat and Gt.dat are furnished, running the code is simple.

To get the continuous spectrum:

python3 contSpec.py

The continuous spectrum must be extracted before the discrete spectrum is computed. The discrete spectrum can then be calculated by

python3 discSpec.py

Interactive Mode

The interactive mode offers a "GUI" for exploring parameter settings. To launch use jupyter notebook interactContSpec.ipynb.

Pre-requisites

The numbers in parenthesis show the version this has been tested on.

python3 (3.5.2) numpy (1.14.2) scipy (1.0.1)

For interactive mode:

jupyter (4.3) ipywidgets (6.0.0)

History

The code is based on the Matlab program ReSpect, which extract the continuous and discrete relaxation spectra from frequency data, G*(w). Work was supported by National Science Foundation DMR grants number 0953002 and 1727870.

Major Upgrade: March-April 2019

  • added ability to infer plateau modulus G0; modified all python routines and reorganized inp.dat
  • use a Bayesian formulation to infer uncertainty in the continuous spectrum
  • currently keeping old method to determine critical lambda, but using a far more efficient method (3-4x savings in compute time)
  • made discSpec.py compliant with G0

Major Upgrade: December 2018

  • moved all common imports and definitions to common; made completely visible
  • in discSpec(): added a NLLS routine to optimize tau; use previous optima as initial guesses for final tau; this greatly improved the quality of fits.

Major Upgrade: August 2018

Continuous Spectrum

  • orignal program with n = 100 and lambda = 20 pts with clean 1 mode data took ~33s.
  • prestore kernMat: evaluation of kernel (meshgrid S, T, and hs) by prestoring kernMat ~12.5s (~3x speed gain)
  • improved least_squares setting by incorporating jacobianLM; ~6s (2x gain)
  • lcurve coarser (auto) mesh, robust criterion, and interpolation ~3.5s (~1.75x gain)
  • Total gain in speed as a consequence of these improvements is 33s -> 3.5s a nearly 10x gain!
  • making jupyter interact compliant

Discrete Spectrum

  • AutoMagic Mode: need only par verbose and plotting flags; auto Nopt
  • switching to nnls as default fitting engine
  • changed older MaxwellModes and LLS -> nnls
  • some printing modifications
  • hardcoding prune = True everywhere; doesn't seem to be use case otherwise
  • making jupyter interact compliant
Laurence Billingham 1 Feb 16, 2022
A complete python calculator with 2 modes Float and Int numbers.

Python Calculator This program is made for learning purpose. Getting started This Program runs using python, install it via terminal or from thier ofi

Felix Sanchez 1 Jan 18, 2022
Prometheus exporter for Spigot accounts

SpigotExporter Prometheus exporter for Spigot accounts What it provides SpigotExporter will output metrics for each of your plugins and a cumulative d

Jacob Bashista 5 Dec 20, 2021
Doom o’clock is a website/project that features a countdown of “when will the earth end” and a greenhouse gas effect emission prediction that’s predicted

Doom o’clock is a website/project that features a countdown of “when will the earth end” and a greenhouse gas effect emission prediction that’s predicted

shironeko(Hazel) 4 Jan 01, 2022
Recreating my first CRUD in python, but now more professional

Recreating my first CRUD in python, but now more professional

Ricardo Deo Sipione Augusto 2 Nov 27, 2021
An awesome script to convert the University Of Oviedo web calendar to Google or Outlook calendars.

autoUniCalendar Un script en Python para convertir el calendario de la intranet de la Universidad de Oviedo en un calendario de Outlook o Google Calen

Bimo99B9 14 Sep 28, 2022
A napari plugin to inspect data within a cisTEM project

napari-cistem A plugin to inspect data within a cisTEM project This napari plugin was generated with Cookiecutter using with @napari's cookiecutter-na

Johannes Elferich 1 Nov 07, 2021
A toolkit for developing and deploying serverless Python code in AWS Lambda.

Python-lambda is a toolset for developing and deploying serverless Python code in AWS Lambda. A call for contributors With python-lambda and pytube bo

Nick Ficano 1.4k Jan 03, 2023
BlackIP-Rep is a tool designed to gather the reputation and information of Bulk IP's.

BlackIP-Rep is a tool designed to gather the reputation and information of Bulk IP's. Focused on increasing the workflow of Security Operations(SOC) team during investigation.

0LiVEr 6 Dec 12, 2022
An awesome list of AI for art and design - resources, and popular datasets and how we may apply computer vision tasks to art and design.

Awesome AI for Art & Design An awesome list of AI for art and design - resources, and popular datasets and how we may apply computer vision tasks to a

Margaret Maynard-Reid 20 Dec 21, 2022
CALPHAD tools for designing thermodynamic models, calculating phase diagrams and investigating phase equilibria.

CALPHAD tools for designing thermodynamic models, calculating phase diagrams and investigating phase equilibria.

pycalphad 189 Dec 13, 2022
Removes all archived super productivity tasks. Just run the python script.

delete-archived-sp-tasks.py Removes all archived super productivity tasks. Just run the python script. This is helpful to do a cleanup every 3-6 month

Ben Herbst 1 Jan 09, 2022
A random cat fact python module

A random cat fact python module

Fayas Noushad 4 Nov 28, 2021
Expression interpreter written in Python

Calc Interpreter An interpreter modeled after a calculator implemented in Python 3. The program currently only supports basic mathematical expressions

1 Oct 17, 2021
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

18.6k Jan 02, 2023
Submission from Team OMR for the TRI-NIT Hackathon

Submission from Team OMR for the TRI-NIT Hackathon

0 Feb 01, 2022
Security-related flags and options for C compilers

Getting the maximum of your C compiler, for security

135 Nov 11, 2022
Decentralized intelligent voting application.

DiVA Decentralized intelligent voting application. Hack the North 2021. Inspiration Following the previous US election, many voters were fearful that

Ali Shariatmadari 4 Jun 05, 2022
A lightweight solution for local Particle development.

neopo A lightweight solution for local Particle development. Features Builds Particle projects locally without any overhead. Compatible with Particle

Nathan Robinson 19 Jan 01, 2023
Contain the customization I made for my Linux rice.

dotfiles Contain the customization I made for my Linux rice. Credit and Respect Polybar Autohide Fulltime Rofi by adi1090x (only include my personal r

sora 3 Apr 04, 2022