Skip to content

Commit b80949e

Browse files
committed
Directional variogram example
1 parent 7f3f996 commit b80949e

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

CHANGELOG.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,18 @@ Changes - from version >= 1.x
4242
* [docs] `CITATION.cff`, citation section in readme has been moved up, bibtex citation has been added
4343
* [docs] corrected broken links to `CONTRIBUTING.md` file in readme and docs
4444
* [setup] links to documentation have been added to `pyproject.toml`
45-
* [docs] docstring examples - all user-facing API endpoints has examples in docstrings, using new input types (values | geometries)
45+
* [docs] docstring examples - all user-facing API endpoints have examples in docstrings, using new input types (values | geometries)
4646
* [docs] updated docstrings (examples) in: `PointSupportDistance`, `core.block_filter`, `pipelines.interpolate`, `pyinterpolate.distance.block.calc_block_to_block_distance`, `validate_kriging`, `metrics` module functions, `inverse_distance_weighting`, `centroid_poisson_kriging`, `area_to_area_pk`, `area_to_point_pk`, `area_to_point_pk`, `area_to_point_pk`, `ordinary_kriging`, `simple_kriging`, `IndicatorKriging`, `UniversalKriging`, `Deconvolution`,
4747
* [enhancement] `ExperimentalVariogram` has new property - `lag_semivariance_array` that returns numpy array with lags and semivariances
4848
* [enhancement] `TheoreticalVariogram` has new property - `lag_yhat_array` that returns numpy array with lags and predicted semivariances
4949
* [api change] `Deviation` class parameters have been renamed to clearly point what is passed as the input
5050
* [tests] `Deviation` class tests and debug (method selection)
5151
* [docs] docstring example for `Deviation`
52-
* [docs] docstring examples for `AggregatedVariogram` and `regularize()`
53-
* [docs] docstring examples for `ExperimentalVariogram` and `build_experimental_variogram()`, `calculate_semivariance()`, used parameters `values` and `geometries`
54-
* [docs] docstring examples for `calculate_covariance()`, used parameters `values` and `geometries`
52+
* [docs] docstring example for `AggregatedVariogram` and `regularize()`
53+
* [docs] docstring example for `ExperimentalVariogram` and `build_experimental_variogram()`, `calculate_semivariance()`, used parameters `values` and `geometries`
54+
* [docs] docstring example for `calculate_covariance()`, used parameters `values` and `geometries`
55+
* [docs] docstring example for `DirectionalVariogram`, used parameters `values` and `geometries`
56+
* [docs]
5557

5658
2025-10-11
5759
----------

src/pyinterpolate/semivariogram/experimental/classes/directional_variogram.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,26 @@ class DirectionalVariogram:
9292
9393
show()
9494
Plot all variograms.
95+
96+
Examples
97+
--------
98+
>>> import numpy as np
99+
>>> from pyinterpolate import DirectionalVariogram
100+
>>>
101+
>>>
102+
>>> ds = np.load('armstrong_data.npy')
103+
>>> step_size = 1.5
104+
>>> max_range = 6
105+
>>> directional_variogram = DirectionalVariogram(
106+
... step_size=STEP_SIZE,
107+
... max_range=MAX_RANGE,
108+
... values=ds[:, -1],
109+
... geometries=ds[:, :-1]
110+
... )
111+
>>> variograms = directional_variogram.get()
112+
>>> print(variograms.keys())
113+
dict_keys(['ISO', 'NS', 'WE', 'NE-SW', 'NW-SE'])
114+
>>> directional_variogram.show() # shows variograms in all directions
95115
"""
96116

97117
def __init__(self,

0 commit comments

Comments
 (0)