unsatfit

Fitting functions of soil hydraulic properties

View the Project on GitHub or PyPI

View user manual on arXiv

Reference

It is all about Fit class of unsatfit.

Methods

For optimization.

set_model(model, const=[])
Set hydraulic model for model with constant parameters of const.
optimize()
Optimize parameteres.
f_ht(p, x)
Water retention function with free parameters p and pressure heads x. To be accessed after set_model.
f_hk(p, x)
Hydraulic conductivity with free parameters p and pressure heads x. To be accessed after set_model.
get_init()
Get initial estimate of water retention parameters except qs and qr. To be accessed after set_model. See models for function names by specifying a model.
get_wrf()
Get water retention parameters. To be accessed after set_model. See models for function names by specifying a model.
modified_model(hs)
Change the hydraulic model to modified model with hs value by Vogel et al. (2000).

For figures etc.

plot()
Plot a figure.
add_curve()
Add a curve for plot.
clear_curves()
Clear curves.
contour(x,y)
Draw contour of RMSE for x and y in parameter name.
test()
Test integrity of the code for development.

Properties for settings

swrc
(h, θ) dataset; h and θ as list respectively
unsat
(h, K) dataset (optimize only WRF when empty list [] is provided)
ini
Initial parameters. When it is a list (or tuple) of parameters, such as [a, b, c], the set of parameters is used as initial parameters. When it is a nested list, such as [[a1, a2, a3], [b1, b2]], all combination of the initial parameters is used.

For specifying font in figures, FontProperties object can be set as self.fp. For example, set font_path as the absolute path to a font file and

import unsatfit
from matplotlib.font_manager import FontProperties
f = unsatfit.Fit()
f.fp = FontProperties(fname=font_path, size=9)

It can be used for using Japanese font.

Properties for return values of optimize()

fitted
Fitted parameters
message
Return message
success
True if optimization succeeded
mse_ht, mse_ln_hk
Mean squared error for θ and ln(K), respectively
se_ht, se_ln_hk
Standard error σ for θ and ln(K), respectively
r2_ht, r2_ln_hk
Coefficient of determination (R2) for θ and ln(K), respectively
aic_ht, aic_ln_hk
AIC = 2n ln(σ) + 2k for θ and ln(K), respectively
aicc_ht, aicc_ln_hk
Corrected AIC = AIC + 2k(k+1)/(n-k-1) for θ and ln(K), respectively
jac
Modified Jacobian matrix. For WRF only.
perr
1 σ uncertainty on fitted parameters. For WRF only.
cor
Correlation matrix. For WRF only.