rampedpyrox.Daem.calc_L_curve¶
-
Daem.
calc_L_curve
(timedata, ax=None, nOm=150, om_max=100.0, om_min=0.001, plot=False)¶ Function to calculate the L-curve for a given model and timedata instance in order to choose the best-fit smoothing parameter, omega.
Parameters: - timedata (rp.TimeData) –
rp.TimeData
instance containing the time and fraction remaining arrays to use in L curve calculation. - ax (None or matplotlib.axis) – Axis to plot on. If None and
plot = True
, automatically creates amatplotlip.axis
instance to return. Defaults to None. - nOm (int) – Number of omega values to consider. Defaults to 150.
- om_max (float or int) – Maximum omega value to search. Defaults to 1e2.
- om_min (float or int) – Minimum omega value to search. Defaults to 1e-3.
- plot (Boolean) – Tells the method to plot the resulting L curve or not. Defaults to False.
Returns: - om_best (float) – The calculated best-fit omega value.
- axis (None or matplotlib.axis) –
If
plot = True
, returns an updated axis handle with plot.
Raises: ScalarError
– If om_max or om_min are not scalar.ScalarError
– If nOm is not int.
See also
calc_L_curve()
- Package-level method for
calc_L_curve
.
References
- [1] D.C. Forney and D.H. Rothman (2012) Inverse method for calculating
- respiration rates from decay time series. Biogeosciences, 9, 3601-3612.
- [2] P.C. Hansen (1987) Rank-deficient and discrete ill-posed problems:
- Numerical aspects of linear inversion (monographs on mathematical modeling and computation). Society for Industrial and Applied Mathematics.
- [3] P.C. Hansen (1994) Regularization tools: A Matlab package for
- analysis and solution of discrete ill-posed problems. Numerical* Algorithms*, **6, 1-35.
- timedata (rp.TimeData) –