isotopylog.fit_Arrhenius¶
-
isotopylog.fit_Arrhenius(T, lnk, lnk_std=None, p0=[150, -7], Tref=inf, zero_int=False)¶ Determines the activation energy by fitting an Arrhenius plot. Can accept a reference temperature for calculating a reference k rather than using k0, the value at the x intercept in 1/T space.
Parameters: - T (array-like) – Array of temperature values at which rate data exist, in Kelvin. Of
length
nT. - lnk (array-like) – Array of corresponding natural logged rate data, in units of inverse
time. Of length
nT. - lnk_std (None or array-like) – Array of corresponding uncertainty in natural logged rate data. If not
None, then must be of lengthnT. Defaults toNonefor an unweighted fit (technically, will make an array of 1e-10 of lengthnTfor lnk_std). - p0 (array-like) – Array of paramter guess to initialize the fitting algorithm, in the
order [E, ln(kref)]. Defaults to
[150, -7]. - Tref (int or Float) – The reference temperature, in Kelvin. Following Passey and Henkes
(2012), Tref can be inputted in order to minimize intercept parameter
uncertainty (i.e., to avoid large extrapolations in 1/T space). Can
pass
np.inffor a “traditional” Arrhenius fit; that is, kref = k0 = x intercept. Defaults tonp.inf. - zero_int (boolean) – Tells the function whether or not to force the intercept to zero. This is used for calculating sig_E in the ‘HH21’ model and ln([p0]/[peq]) for the ‘SE15’ model, both of which are expected to have zero intercept in ln(k) vs. 1/T space.
Returns: - params (np.ndarray) – Array of resulting parameter values, in the order [E, ln(kref)].
- params_cov (np.ndarray) – Covariance matrix associated with the resulting parameter values, of
shape [2 x 2]. The +/- 1 sigma uncertainty for each parameter can be
calculated as
np.sqrt(np.diag(params_cov)) - rmse (float) – Root Mean Square Error (in lnk units) of the model fit.
Notes
Changing Tref will have no impact on resulting activation energy value or corresponding uncertainty. Only the uncertainty in the intercept will be affected.
If uncertainty is passed but some entires are equal to zero, uncertainty for those entries is set to be equal to the mean value of all other entries.
See also
isotopylog.EDistribution()- The class for performing all activation energy based calculations.
Examples
Basic implementation, assuming some rate values have been calculated over some temperature range:
#import modules import isotopylog as ipl #assume T and lnk exist results = ipl.fit_Arrhenius(T, lnk)
References
[1] Passey and Henkes (2012) Earth Planet. Sci. Lett., 351, 223–236.
- T (array-like) – Array of temperature values at which rate data exist, in Kelvin. Of
length