rampedpyrox.EnergyComplex

class rampedpyrox.EnergyComplex(E, p=None)[source]

Class for inputting and storing Ramped PryOx activation energy distributions.

Parameters:
  • E (array-like) – Array of activation energy, in kJ/mol. Length nE.
  • p (None or array-like) – Array of the regularized pdf of the E distribution, p(0,E). Length nE. Defaults to None.
Raises:

ArrayError – If the any value in E is negative.

See also

Daem
rp.Model subclass used to generate the Laplace transform for RPO data and translate between time- and E-space.
RpoThermogram
rp.TimeData subclass containing the time and fraction remaining data used for the inversion.

Examples

Generating a bare-bones energy complex containing only E and p:

#import modules
import rampedpyrox as rp
import numpy as np

#generate arbitrary Gaussian data
E = np.arange(50, 350)

def Gaussian(x, mu, sig):
        scalar = (1/np.sqrt(2*np.pi*sig**2))*
        y = scalar*np.exp(-(x-mu)**2/(2*sig**2))
        return y

p = Gaussian(E, 150, 10)

#create the instance
ec = rp.EnergyComplex(E, p = p)

Or, insteand run the inversion to generate an energy complex using an rp.RpoThermogram instance, tg, and an rp.Daem instance, daem:

#keeping defaults, not combining any peaks
ec = rp.EnergyComplex(
        daem,
        tg,
        lam = 'auto')

Plotting the resulting regularized energy complex:

#import additional modules
import matplotlib.pyplot as plt

#create figure
fig, ax = plt.subplots(1,1)

#plot resulting E pdf, p(0,E)
ax = ec.plot(ax = ax)

Attributes

E : np.ndarray
Array of activation energy, in kJ/mol. Length nE.
nE : int
Number of E points.
ec_info : pd.Series

Series containing the observed EnergyComplex summary info:

E_max (kJ/mol),

E_mean (kJ/mol),

E_std (kJ/mol),

p0E_max

lam : float
Tikhonov regularization weighting factor.
p : np.ndarray
Array of the pdf of the E distribution, p0E. Length nE.
resid : float
The RMSE between the measured thermogram data and the estimated thermogram using the p (ghat). Used for determining the best-fit lambda value.
rgh :
The roughness RMSE. Used for determining best-fit lambda value.

References

[1] B. Cramer (2004) Methane generation from coal during open system
pyrolysis investigated by isotope specific, Gaussian distributed reaction kinetics. Organic Geochemistry, 35, 379-392.
[2] D.C. Forney and D.H. Rothman (2012) Common structure in the
heterogeneity of plant-matter decay. Journal of the Royal Society Interface, rsif.2012.0122.
[3] D.C. Forney and D.H. Rothman (2012) Inverse method for calculating
respiration rates from decay time series. Biogeosciences, 9, 3601-3612.

Methods

input_estimated([lam, resid, rgh]) Inputs estimated rate data into the rp.EnergyComplex instance and calculates statistics.
inverse_model(model, timedata[, lam]) Generates an energy complex by inverting an rp.TimeData instance using a given rp.Model instance.
plot([ax]) Plots the pdf of E, p(0,E), against E.