From 1ad4ad107ab8c2707354f625c5c0b8e664c6e052 Mon Sep 17 00:00:00 2001 From: Romain Hugonnet Date: Mon, 18 Mar 2024 15:59:22 -0800 Subject: [PATCH] Increase sample size of empirical variograms in advanced examples for clearer plots (#492) --- examples/advanced/plot_standardization.py | 2 +- examples/advanced/plot_variogram_estimation_modelling.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/advanced/plot_standardization.py b/examples/advanced/plot_standardization.py index 34fbe26d..f7864749 100644 --- a/examples/advanced/plot_standardization.py +++ b/examples/advanced/plot_standardization.py @@ -128,7 +128,7 @@ df_vgm = xdem.spatialstats.sample_empirical_variogram( values=z_dh.data.squeeze(), gsd=dh.res[0], - subsample=300, + subsample=1000, n_variograms=10, estimator="dowd", random_state=42, diff --git a/examples/advanced/plot_variogram_estimation_modelling.py b/examples/advanced/plot_variogram_estimation_modelling.py index a32eddfa..3a03deea 100644 --- a/examples/advanced/plot_variogram_estimation_modelling.py +++ b/examples/advanced/plot_variogram_estimation_modelling.py @@ -78,9 +78,7 @@ # conveniently by :func:`xdem.spatialstats.sample_empirical_variogram`: # Dowd's variogram is used for robustness in conjunction with the NMAD (see :ref:`robuststats-corr`). -df = xdem.spatialstats.sample_empirical_variogram( - values=dh.data, gsd=dh.res[0], subsample=100, n_variograms=10, estimator="dowd", random_state=42 -) +df = xdem.spatialstats.sample_empirical_variogram(values=dh, subsample=1000, n_variograms=10, estimator="dowd", random_state=42) # %% # *Note: in this example, we add a* ``random_state`` *argument to yield a reproducible random sampling of pixels within