Variogram ¶
Nugget plus nested structures sharing one anisotropy. rotation is one
azimuth, dip, rake triple in degrees for the whole model, where angles
(as in LocalAnisotropy) holds one per location; ratios are
semi-major/major and minor/major range ratios.
fit
staticmethod
¶
fit(
experimental,
model=Ellipsis,
*,
weighting="count",
nugget=None,
sills=None,
ranges=None,
)
Weighted least-squares fit of a nugget plus one to three nested structures.
Every parameter is free (None), fixed (a float) or bounded (a
(low, high) pair). For given ranges the nugget and sills are solved
exactly; the ranges are searched on a grid and refined, deterministically.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
experimental
|
ExperimentalVariogram
|
|
required |
model
|
str or sequence of str
|
One shape per structure, shortest range first: fitted ranges increase in this order. |
Ellipsis
|
weighting
|
(count, uniform, count / gamma, count / distance)
|
Least-squares weight per lag: N(h), 1, N(h)/γ(h)² or N(h)/h². |
"count"
|
nugget
|
float or (float, float)
|
|
None
|
sills
|
sequence of (None, float or (float, float))
|
Partial sill and range of each structure, one entry per model. |
None
|
ranges
|
sequence of (None, float or (float, float))
|
Partial sill and range of each structure, one entry per model. |
None
|
Returns:
| Type | Description |
|---|---|
Variogram
|
Isotropic; one free structure with a free nugget reproduces the single-structure fit. |
fit_directional
staticmethod
¶
fit_directional(
experimentals,
directions,
model=Ellipsis,
*,
weighting="count",
nugget=None,
sills=None,
ranges=None,
rotation=None,
ratios=None,
)
One anisotropic model fitted jointly to experimental variograms in several directions.
The structures share the anisotropy; their ranges are major-axis
ranges. Nugget, sills and ranges are free, fixed or bounded as in
Variogram.fit, and so is each angle and range ratio. Free ranges stay
within the largest lag; bound them, e.g. ranges=[None, (50, 300)],
to go further. The search is deterministic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
experimentals
|
sequence of ExperimentalVariogram
|
|
required |
directions
|
sequence of (float, float)
|
Azimuth and dip in degrees of each experimental variogram. |
required |
model
|
As in |
Ellipsis
|
|
weighting
|
As in |
Ellipsis
|
|
nugget
|
As in |
Ellipsis
|
|
sills
|
As in |
Ellipsis
|
|
ranges
|
As in |
Ellipsis
|
|
rotation
|
sequence of (None, float or (float, float))
|
Azimuth, dip and rake in degrees; free angles are returned with azimuth and rake in [0, 180). |
None
|
ratios
|
sequence of (None, float or (float, float))
|
Semi-major/major and minor/major range ratios, in (0, 1] when free. When every direction is horizontal, dip and rake default to 0 and the minor ratio to 1: the fit is two-dimensional. |
None
|
Returns:
| Type | Description |
|---|---|
Variogram
|
|
from_json
staticmethod
¶
from_json(text)
Reads to_json output; raises InvalidInput on another class's JSON
or a newer format.
gamma_between
method descriptor
¶
gamma_between(a, b)
γ between paired rows of a and b, honoring anisotropy.
standardized
method descriptor
¶
standardized(*, sill=1.0)
The same shape with total sill sill, e.g. a fitted variogram scaled
for normal scores; models, ranges and anisotropy are kept, the unit of
the values is dropped.
with_anisotropy
method descriptor
¶
with_anisotropy(rotation, ratios)
Same structures with a new anisotropy.
used in