From b96f844862e3f2f33139e67c2e554f119e8bb6c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Mon, 12 Jun 2023 12:20:28 +0200 Subject: [PATCH] vario: forward kwargs to standard_bins routine --- src/gstools/variogram/variogram.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gstools/variogram/variogram.py b/src/gstools/variogram/variogram.py index e179dc28..8c5785c6 100644 --- a/src/gstools/variogram/variogram.py +++ b/src/gstools/variogram/variogram.py @@ -94,6 +94,7 @@ def vario_estimate( trend=None, fit_normalizer=False, geo_scale=RADIAN_SCALE, + **std_bins, ): r""" Estimates the empirical variogram. @@ -230,6 +231,9 @@ def vario_estimate( Can be set to :any:`EARTH_RADIUS` to have units in km or :any:`DEGREE_SCALE` to have units in degree. Default: :any:`RADIAN_SCALE` + **std_bins + Optional arguments that are forwarded to the :any:`standard_bins` routine + if no bins are given (bin_no, max_dist). Returns ------- @@ -341,7 +345,9 @@ def vario_estimate( pos = pos[:, sampled_idx] # create bining if not given if bin_edges is None: - bin_edges = standard_bins(pos, dim, latlon, geo_scale=geo_scale) + bin_edges = standard_bins( + pos, dim, latlon, geo_scale=geo_scale, **std_bins + ) bin_center = (bin_edges[:-1] + bin_edges[1:]) / 2.0 if latlon: # internally we always use radians