From 4ec7940c06de956bdc149594bf8d68399bedf1e1 Mon Sep 17 00:00:00 2001 From: Ryan Russell Date: Sun, 14 Aug 2022 10:56:12 -0500 Subject: [PATCH 1/3] doc: `whether` readability fixes Signed-off-by: Ryan Russell --- src/gstools/krige/base.py | 8 ++++---- src/gstools/krige/methods.py | 18 +++++++++--------- src/gstools/normalizer/tools.py | 10 +++++----- src/gstools/variogram/variogram.py | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/gstools/krige/base.py b/src/gstools/krige/base.py index 90d5f8c3..c85eb712 100755 --- a/src/gstools/krige/base.py +++ b/src/gstools/krige/base.py @@ -110,10 +110,10 @@ class Krige(Field): you can pass a callable which takes a matrix and returns the inverse. Default: `"pinv"` fit_normalizer : :class:`bool`, optional - Wheater to fit the data-normalizer to the given conditioning data. + Whether to fit the data-normalizer to the given conditioning data. Default: False fit_variogram : :class:`bool`, optional - Wheater to fit the given variogram model to the data. + Whether to fit the given variogram model to the data. This is done by using isotropy settings of the given model, assuming the sill to be the data variance and with the standard bins provided by the :any:`standard_bins` routine. @@ -490,10 +490,10 @@ def set_condition( The "exact=True" variant only works with "cond_err='nugget'". Default: "nugget" fit_normalizer : :class:`bool`, optional - Wheater to fit the data-normalizer to the given conditioning data. + Whether to fit the data-normalizer to the given conditioning data. Default: False fit_variogram : :class:`bool`, optional - Wheater to fit the given variogram model to the data. + Whether to fit the given variogram model to the data. This is done by using isotropy settings of the given model, assuming the sill to be the data variance and with the standard bins provided by the :any:`standard_bins` routine. diff --git a/src/gstools/krige/methods.py b/src/gstools/krige/methods.py index c41c24a8..4853e7e8 100644 --- a/src/gstools/krige/methods.py +++ b/src/gstools/krige/methods.py @@ -74,10 +74,10 @@ class Simple(Krige): you can pass a callable which takes a matrix and returns the inverse. Default: `"pinv"` fit_normalizer : :class:`bool`, optional - Wheater to fit the data-normalizer to the given conditioning data. + Whether to fit the data-normalizer to the given conditioning data. Default: False fit_variogram : :class:`bool`, optional - Wheater to fit the given variogram model to the data. + Whether to fit the given variogram model to the data. This is done by using isotropy settings of the given model, assuming the sill to be the data variance and with the standard bins provided by the :any:`standard_bins` routine. @@ -168,10 +168,10 @@ class Ordinary(Krige): you can pass a callable which takes a matrix and returns the inverse. Default: `"pinv"` fit_normalizer : :class:`bool`, optional - Wheater to fit the data-normalizer to the given conditioning data. + Whether to fit the data-normalizer to the given conditioning data. Default: False fit_variogram : :class:`bool`, optional - Wheater to fit the given variogram model to the data. + Whether to fit the given variogram model to the data. This is done by using isotropy settings of the given model, assuming the sill to be the data variance and with the standard bins provided by the :any:`standard_bins` routine. @@ -272,10 +272,10 @@ class Universal(Krige): you can pass a callable which takes a matrix and returns the inverse. Default: `"pinv"` fit_normalizer : :class:`bool`, optional - Wheater to fit the data-normalizer to the given conditioning data. + Whether to fit the data-normalizer to the given conditioning data. Default: False fit_variogram : :class:`bool`, optional - Wheater to fit the given variogram model to the data. + Whether to fit the given variogram model to the data. This is done by using isotropy settings of the given model, assuming the sill to be the data variance and with the standard bins provided by the :any:`standard_bins` routine. @@ -373,10 +373,10 @@ class ExtDrift(Krige): you can pass a callable which takes a matrix and returns the inverse. Default: `"pinv"` fit_normalizer : :class:`bool`, optional - Wheater to fit the data-normalizer to the given conditioning data. + Whether to fit the data-normalizer to the given conditioning data. Default: False fit_variogram : :class:`bool`, optional - Wheater to fit the given variogram model to the data. + Whether to fit the given variogram model to the data. This is done by using isotropy settings of the given model, assuming the sill to be the data variance and with the standard bins provided by the :any:`standard_bins` routine. @@ -467,7 +467,7 @@ class Detrended(Krige): you can pass a callable which takes a matrix and returns the inverse. Default: `"pinv"` fit_variogram : :class:`bool`, optional - Wheater to fit the given variogram model to the data. + Whether to fit the given variogram model to the data. This is done by using isotropy settings of the given model, assuming the sill to be the data variance and with the standard bins provided by the :any:`standard_bins` routine. diff --git a/src/gstools/normalizer/tools.py b/src/gstools/normalizer/tools.py index ed528be6..2d28bef9 100644 --- a/src/gstools/normalizer/tools.py +++ b/src/gstools/normalizer/tools.py @@ -71,9 +71,9 @@ def apply_mean_norm_trend( Value type of the field. Either "scalar" or "vector". The default is "scalar". check_shape : :class:`bool`, optional - Wheather to check pos and field shapes. The default is True. + Whether to check pos and field shapes. The default is True. stacked : :class:`bool`, optional - Wheather the field is stacked or not. The default is False. + Whether the field is stacked or not. The default is False. Returns ------- @@ -144,11 +144,11 @@ def remove_trend_norm_mean( Value type of the field. Either "scalar" or "vector". The default is "scalar". check_shape : :class:`bool`, optional - Wheather to check pos and field shapes. The default is True. + Whether to check pos and field shapes. The default is True. stacked : :class:`bool`, optional - Wheather the field is stacked or not. The default is False. + Whether the field is stacked or not. The default is False. fit_normalizer : :class:`bool`, optional - Wheater to fit the data-normalizer to the given (detrended) field. + Whether to fit the data-normalizer to the given (detrended) field. Default: False Returns diff --git a/src/gstools/variogram/variogram.py b/src/gstools/variogram/variogram.py index 7acce928..d3928f94 100644 --- a/src/gstools/variogram/variogram.py +++ b/src/gstools/variogram/variogram.py @@ -221,7 +221,7 @@ def vario_estimate( If no normalizer is applied, this behaves equal to 'mean'. The default is None. fit_normalizer : :class:`bool`, optional - Wheater to fit the data-normalizer to the given (detrended) field. + Whether to fit the data-normalizer to the given (detrended) field. Default: False Returns From f2224f10b1148311697c8170ed0d635eff4b0edb Mon Sep 17 00:00:00 2001 From: Ryan Russell Date: Sun, 14 Aug 2022 10:56:55 -0500 Subject: [PATCH 2/3] doc: `signature` readability fix Signed-off-by: Ryan Russell --- src/gstools/krige/base.py | 2 +- src/gstools/krige/methods.py | 10 +++++----- src/gstools/tools/misc.py | 2 +- src/gstools/variogram/variogram.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gstools/krige/base.py b/src/gstools/krige/base.py index c85eb712..2b7917fb 100755 --- a/src/gstools/krige/base.py +++ b/src/gstools/krige/base.py @@ -72,7 +72,7 @@ class Krige(Field): Normalizer to be applied to the input data to gain normality. The default is None. trend : :any:`None` or :class:`float` or :any:`callable`, optional - A callable trend function. Should have the signiture: f(x, [y, z, ...]) + A callable trend function. Should have the signature: f(x, [y, z, ...]) This is used for detrended kriging, where the trended is subtracted from the conditions before kriging is applied. This can be used for regression kriging, where the trend function diff --git a/src/gstools/krige/methods.py b/src/gstools/krige/methods.py index 4853e7e8..280e6811 100644 --- a/src/gstools/krige/methods.py +++ b/src/gstools/krige/methods.py @@ -40,7 +40,7 @@ class Simple(Krige): Normalizer to be applied to the input data to gain normality. The default is None. trend : :any:`None` or :class:`float` or :any:`callable`, optional - A callable trend function. Should have the signiture: f(x, [y, z, ...]) + A callable trend function. Should have the signature: f(x, [y, z, ...]) This is used for detrended kriging, where the trended is subtracted from the conditions before kriging is applied. This can be used for regression kriging, where the trend function @@ -134,7 +134,7 @@ class Ordinary(Krige): Normalizer to be applied to the input data to gain normality. The default is None. trend : :any:`None` or :class:`float` or :any:`callable`, optional - A callable trend function. Should have the signiture: f(x, [y, z, ...]) + A callable trend function. Should have the signature: f(x, [y, z, ...]) This is used for detrended kriging, where the trended is subtracted from the conditions before kriging is applied. This can be used for regression kriging, where the trend function @@ -238,7 +238,7 @@ class Universal(Krige): Normalizer to be applied to the input data to gain normality. The default is None. trend : :any:`None` or :class:`float` or :any:`callable`, optional - A callable trend function. Should have the signiture: f(x, [y, z, ...]) + A callable trend function. Should have the signature: f(x, [y, z, ...]) This is used for detrended kriging, where the trended is subtracted from the conditions before kriging is applied. This can be used for regression kriging, where the trend function @@ -339,7 +339,7 @@ class ExtDrift(Krige): Normalizer to be applied to the input data to gain normality. The default is None. trend : :any:`None` or :class:`float` or :any:`callable`, optional - A callable trend function. Should have the signiture: f(x, [y, z, ...]) + A callable trend function. Should have the signature: f(x, [y, z, ...]) This is used for detrended kriging, where the trended is subtracted from the conditions before kriging is applied. This can be used for regression kriging, where the trend function @@ -439,7 +439,7 @@ class Detrended(Krige): cond_val : :class:`numpy.ndarray` the values of the conditions (nan values will be ignored) trend_function : :any:`callable` - The callable trend function. Should have the signiture: f(x, [y, z]) + The callable trend function. Should have the signature: f(x, [y, z]) exact : :class:`bool`, optional Whether the interpolator should reproduce the exact input values. If `False`, `cond_err` is interpreted as measurement error diff --git a/src/gstools/tools/misc.py b/src/gstools/tools/misc.py index 43c8edc8..301da075 100755 --- a/src/gstools/tools/misc.py +++ b/src/gstools/tools/misc.py @@ -78,7 +78,7 @@ def eval_func( ---------- func_val : :any:`callable` or :class:`float` or :any:`None` Function to be called or single value to be filled. - Should have the signiture f(x, [y, z, ...]) in case of callable. + Should have the signature f(x, [y, z, ...]) in case of callable. In case of a float, the field will be filled with a single value and in case of None, this value will be set to 0. pos : :class:`list` diff --git a/src/gstools/variogram/variogram.py b/src/gstools/variogram/variogram.py index d3928f94..4d710aa6 100644 --- a/src/gstools/variogram/variogram.py +++ b/src/gstools/variogram/variogram.py @@ -217,7 +217,7 @@ def vario_estimate( Normalizer to be applied to the input data to gain normality. The default is None. trend : :any:`None` or :class:`float` or :any:`callable`, optional - A callable trend function. Should have the signiture: f(x, [y, z, ...]) + A callable trend function. Should have the signature: f(x, [y, z, ...]) If no normalizer is applied, this behaves equal to 'mean'. The default is None. fit_normalizer : :class:`bool`, optional From 5562b85b87c8f0f3fcb479165ecfb3a3f903af06 Mon Sep 17 00:00:00 2001 From: Ryan Russell Date: Sun, 14 Aug 2022 11:10:42 -0500 Subject: [PATCH 3/3] refactor: readability improvements in docstrings and comments Signed-off-by: Ryan Russell --- src/gstools/covmodel/base.py | 14 +++++++------- src/gstools/covmodel/fit.py | 6 +++--- src/gstools/covmodel/models.py | 2 +- src/gstools/covmodel/plot.py | 2 +- src/gstools/covmodel/tools.py | 6 +++--- src/gstools/field/base.py | 2 +- src/gstools/field/cond_srf.py | 2 +- src/gstools/field/generator.py | 6 +++--- src/gstools/field/srf.py | 2 +- src/gstools/field/tools.py | 4 ++-- src/gstools/field/upscaling.py | 2 +- src/gstools/krige/base.py | 4 ++-- src/gstools/normalizer/base.py | 4 ++-- src/gstools/random/tools.py | 2 +- src/gstools/tools/special.py | 8 ++++---- src/gstools/transform/array.py | 2 +- src/gstools/transform/field.py | 2 +- src/gstools/variogram/variogram.py | 10 +++++----- 18 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/gstools/covmodel/base.py b/src/gstools/covmodel/base.py index 1a1ea23e..192caf87 100644 --- a/src/gstools/covmodel/base.py +++ b/src/gstools/covmodel/base.py @@ -89,7 +89,7 @@ class CovModel: Default: :any:`None` rescale : :class:`float` or :any:`None`, optional Optional rescaling factor to divide the length scale with. - This could be used for unit convertion or rescaling the length scale + This could be used for unit conversion or rescaling the length scale to coincide with e.g. the integral scale. Will be set by each model individually. Default: :any:`None` @@ -569,14 +569,14 @@ def fit_variogram( **para_select, ): """ - Fiting the variogram-model to an empirical variogram. + Fitting the variogram-model to an empirical variogram. Parameters ---------- x_data : :class:`numpy.ndarray` The bin-centers of the empirical variogram. y_data : :class:`numpy.ndarray` - The messured variogram + The measured variogram If multiple are given, they are interpreted as the directional variograms along the main axis of the associated rotated coordinate system. @@ -601,7 +601,7 @@ def fit_variogram( If variance is deselected, it needs to be less than the sill, otherwise a ValueError comes up. Same for nugget. - If sill=False, it will be deslected from estimation + If sill=False, it will be deselected from estimation and set to the current sill of the model. Then, the procedure above is applied. Default: None @@ -680,7 +680,7 @@ def fit_variogram( Returns ------- fit_para : :class:`dict` - Dictonary with the fitted parameter values + Dictionary with the fitted parameter values pcov : :class:`numpy.ndarray` The estimated covariance of `popt` from :any:`scipy.optimize.curve_fit`. @@ -734,7 +734,7 @@ def set_arg_bounds(self, check_args=True, **kwargs): ---------- check_args : bool, optional Whether to check if the arguments are in their valid bounds. - In case not, a propper default value will be determined. + In case not, a proper default value will be determined. Default: True **kwargs Parameter name as keyword ("var", "len_scale", "nugget", ) @@ -772,7 +772,7 @@ def var_bounds(self, bounds): @property def len_scale_bounds(self): - """:class:`list`: Bounds for the lenght scale. + """:class:`list`: Bounds for the length scale. Notes ----- diff --git a/src/gstools/covmodel/fit.py b/src/gstools/covmodel/fit.py index 8880ed43..b50dad94 100755 --- a/src/gstools/covmodel/fit.py +++ b/src/gstools/covmodel/fit.py @@ -47,7 +47,7 @@ def fit_variogram( x_data : :class:`numpy.ndarray` The bin-centers of the empirical variogram. y_data : :class:`numpy.ndarray` - The messured variogram + The measured variogram If multiple are given, they are interpreted as the directional variograms along the main axis of the associated rotated coordinate system. @@ -72,7 +72,7 @@ def fit_variogram( If variance is deselected, it needs to be less than the sill, otherwise a ValueError comes up. Same for nugget. - If sill=False, it will be deslected from estimation + If sill=False, it will be deselected from estimation and set to the current sill of the model. Then, the procedure above is applied. Default: None @@ -149,7 +149,7 @@ def fit_variogram( Returns ------- fit_para : :class:`dict` - Dictonary with the fitted parameter values + Dictionary with the fitted parameter values pcov : :class:`numpy.ndarray` The estimated covariance of `popt` from :any:`scipy.optimize.curve_fit`. diff --git a/src/gstools/covmodel/models.py b/src/gstools/covmodel/models.py index 668c6eb3..102467e2 100644 --- a/src/gstools/covmodel/models.py +++ b/src/gstools/covmodel/models.py @@ -357,7 +357,7 @@ def cor(self, h): ) * sps.kv(self.nu, np.sqrt(self.nu) * h_gz) # if nu >> 1 we get errors for the farfield, there 0 is approached res[np.logical_not(np.isfinite(res))] = 0.0 - # covariance is positiv + # covariance is positive res = np.maximum(res, 0.0) return res diff --git a/src/gstools/covmodel/plot.py b/src/gstools/covmodel/plot.py index 9dc40392..535c872f 100644 --- a/src/gstools/covmodel/plot.py +++ b/src/gstools/covmodel/plot.py @@ -236,7 +236,7 @@ def plot_cor_axis( def plot_spectrum( model, x_min=0.0, x_max=None, fig=None, ax=None, **kwargs ): # pragma: no cover - """Plot specturm of a given CovModel.""" + """Plot spectrum of a given CovModel.""" fig, ax = get_fig_ax(fig, ax) if x_max is None: x_max = 3 / model.len_scale diff --git a/src/gstools/covmodel/tools.py b/src/gstools/covmodel/tools.py index bbea182c..cfc58636 100644 --- a/src/gstools/covmodel/tools.py +++ b/src/gstools/covmodel/tools.py @@ -166,7 +166,7 @@ def set_opt_args(model, opt_arg): "Or you made a Typo... hehe.", AttributeWarning, ) - # add the default vaules if not specified + # add the default values if not specified for def_arg in default: if def_arg not in opt_arg: opt_arg[def_arg] = default[def_arg] @@ -400,7 +400,7 @@ def set_arg_bounds(model, check_args=True, **kwargs): The covariance model in use. check_args : bool, optional Whether to check if the arguments are in their valid bounds. - In case not, a propper default value will be determined. + In case not, a proper default value will be determined. Default: True **kwargs Parameter name as keyword ("var", "len_scale", "nugget", ) @@ -438,7 +438,7 @@ def set_arg_bounds(model, check_args=True, **kwargs): setattr(model, arg, [def_arg] * (model.dim - 1)) else: setattr(model, arg, def_arg) - # set var last like allways + # set var last like always if var_bnds: model.var_bounds = var_bnds if check_args and check_arg_in_bounds(model, "var") > 0: diff --git a/src/gstools/field/base.py b/src/gstools/field/base.py index 690042af..e5dfaec7 100755 --- a/src/gstools/field/base.py +++ b/src/gstools/field/base.py @@ -228,7 +228,7 @@ def mesh( of the given mesh. Default: "centroids" direction : :class:`str` or :class:`list`, optional - Here you can state which direction should be choosen for + Here you can state which direction should be chosen for lower dimension. For example, if you got a 2D mesh in xz direction, you have to pass "xz". By default, all directions are used. One can also pass a list of indices. diff --git a/src/gstools/field/cond_srf.py b/src/gstools/field/cond_srf.py index 88b58279..139c579a 100644 --- a/src/gstools/field/cond_srf.py +++ b/src/gstools/field/cond_srf.py @@ -78,7 +78,7 @@ def __call__( the position tuple, containing main direction and transversal directions seed : :class:`int`, optional - seed for RNG for reseting. Default: keep seed from generator + seed for RNG for resetting. Default: keep seed from generator mesh_type : :class:`str` 'structured' / 'unstructured' post_process : :class:`bool`, optional diff --git a/src/gstools/field/generator.py b/src/gstools/field/generator.py index 31cc7eea..6c8c905b 100644 --- a/src/gstools/field/generator.py +++ b/src/gstools/field/generator.py @@ -97,10 +97,10 @@ def __init__( ): if kwargs: warnings.warn("gstools.RandMeth: **kwargs are ignored") - # initialize atributes + # initialize attributes self._mode_no = int(mode_no) self._verbose = bool(verbose) - # initialize private atributes + # initialize private attributes self._model = None self._seed = None self._rng = None @@ -237,7 +237,7 @@ def reset_seed(self, seed=np.nan): self._z_2 = self._rng.random.normal(size=self._mode_no) # sample uniform on a sphere sphere_coord = self._rng.sample_sphere(self.model.dim, self._mode_no) - # sample radii acording to radial spectral density of the model + # sample radii according to radial spectral density of the model if self.sampling == "inversion" or ( self.sampling == "auto" and self.model.has_ppf ): diff --git a/src/gstools/field/srf.py b/src/gstools/field/srf.py index e6a5a313..e8896138 100644 --- a/src/gstools/field/srf.py +++ b/src/gstools/field/srf.py @@ -119,7 +119,7 @@ def __call__( the position tuple, containing main direction and transversal directions seed : :class:`int`, optional - seed for RNG for reseting. Default: keep seed from generator + seed for RNG for resetting. Default: keep seed from generator point_volumes : :class:`float` or :class:`numpy.ndarray` If your evaluation points for the field are coming from a mesh, they are probably representing a certain element volume. diff --git a/src/gstools/field/tools.py b/src/gstools/field/tools.py index 86f3fee1..019f2e58 100644 --- a/src/gstools/field/tools.py +++ b/src/gstools/field/tools.py @@ -109,7 +109,7 @@ def generate_on_mesh( of the given mesh. Default: "centroids" direction : :class:`str` or :class:`list`, optional - Here you can state which direction should be choosen for + Here you can state which direction should be chosen for lower dimension. For example, if you got a 2D mesh in xz direction, you have to pass "xz". By default, all directions are used. One can also pass a list of indices. @@ -119,7 +119,7 @@ def generate_on_mesh( cell_data. If to few names are given, digits will be appended. Default: "field" **kwargs - Keyword arguments forwareded to `Field.__call__`. + Keyword arguments forwarded to `Field.__call__`. Notes ----- diff --git a/src/gstools/field/upscaling.py b/src/gstools/field/upscaling.py index e4ce910e..bbcf12c7 100644 --- a/src/gstools/field/upscaling.py +++ b/src/gstools/field/upscaling.py @@ -71,7 +71,7 @@ def var_coarse_graining(model, point_volumes=0.0): warnings.warn( "var_coarse_graining: non-zero nugget will violate upscaling!" ) - # interprete volume as a hypercube and calculate the edge length + # interpret volume as a hypercube and calculate the edge length edge = point_volumes ** (1.0 / model.dim) var_factor = ( model.len_scale**2 / (model.len_scale**2 + edge**2 / 4) diff --git a/src/gstools/krige/base.py b/src/gstools/krige/base.py index 2b7917fb..b1e7a766 100755 --- a/src/gstools/krige/base.py +++ b/src/gstools/krige/base.py @@ -44,7 +44,7 @@ class Krige(Field): A Swiss Army knife for kriging. A Kriging class enabling the basic kriging routines: - Simple-, Ordinary-, Univseral-, External Drift- + Simple-, Ordinary-, Universal-, External Drift- and detrended/regression-Kriging as well as Kriging the Mean [Wackernagel2003]_. @@ -335,7 +335,7 @@ def _get_krige_vecs( # set points to limit of the covariance to only get the mean res[: self.cond_no, :] = 0 else: - # get correct covarinace functions (depending on exact values) + # get correct covariance functions (depending on exact values) cf = self.model.cov_nugget if self.exact else self.model.covariance res[: self.cond_no, :] = cf( self._get_dists(self._krige_pos, pos, chunk_slice) diff --git a/src/gstools/normalizer/base.py b/src/gstools/normalizer/base.py index 884b0c90..e8bb0a50 100644 --- a/src/gstools/normalizer/base.py +++ b/src/gstools/normalizer/base.py @@ -198,7 +198,7 @@ def fit(self, data, skip=None, **kwargs): data : array_like Input data to fit the transformation to in order to gain normality. skip : :class:`list` of :class:`str` or :any:`None`, optional - Names of parameters to be skiped in fitting. + Names of parameters to be skipped in fitting. The default is None. **kwargs Keyword arguments passed to :any:`scipy.optimize.minimize_scalar` @@ -207,7 +207,7 @@ def fit(self, data, skip=None, **kwargs): Returns ------- :class:`dict` - Optimal paramters given by names. + Optimal parameters given by names. """ skip = [] if skip is None else skip all_names = sorted(self.default_parameter) diff --git a/src/gstools/random/tools.py b/src/gstools/random/tools.py index f64d2898..831b1f6a 100644 --- a/src/gstools/random/tools.py +++ b/src/gstools/random/tools.py @@ -57,7 +57,7 @@ def dist_gen(pdf_in=None, cdf_in=None, ppf_in=None, **kwargs): Parameters ---------- pdf_in : :any:`callable` or :any:`None`, optional - Proprobability distribution function of the given distribution, that + Probability distribution function of the given distribution, that takes a single argument Default: ``None`` cdf_in : :any:`callable` or :any:`None`, optional diff --git a/src/gstools/tools/special.py b/src/gstools/tools/special.py index f5bb3857..b5cd6bd6 100644 --- a/src/gstools/tools/special.py +++ b/src/gstools/tools/special.py @@ -178,7 +178,7 @@ def tplstable_cor(r, len_scale, hurst, alpha): def tpl_exp_spec_dens(k, dim, len_scale, hurst, len_low=0.0): r""" - Spectal density of the TPLExponential covariance model. + Spectral density of the TPLExponential covariance model. Parameters ---------- @@ -197,7 +197,7 @@ def tpl_exp_spec_dens(k, dim, len_scale, hurst, len_low=0.0): Returns ------- :class:`float` - spectal density of the TPLExponential model + spectral density of the TPLExponential model """ if np.isclose(len_low, 0.0): k = np.asarray(k, dtype=np.double) @@ -217,7 +217,7 @@ def tpl_exp_spec_dens(k, dim, len_scale, hurst, len_low=0.0): def tpl_gau_spec_dens(k, dim, len_scale, hurst, len_low=0.0): r""" - Spectal density of the TPLGaussian covariance model. + Spectral density of the TPLGaussian covariance model. Parameters ---------- @@ -236,7 +236,7 @@ def tpl_gau_spec_dens(k, dim, len_scale, hurst, len_low=0.0): Returns ------- :class:`float` - spectal density of the TPLExponential model + spectral density of the TPLExponential model """ if np.isclose(len_low, 0.0): k = np.asarray(k, dtype=np.double) diff --git a/src/gstools/transform/array.py b/src/gstools/transform/array.py index 65bcd204..e1b88ac6 100644 --- a/src/gstools/transform/array.py +++ b/src/gstools/transform/array.py @@ -56,7 +56,7 @@ def array_discrete( the thresholds, where the value classes are separated possible values are: * "arithmetic": the mean of the 2 neighbouring values - * "equal": devide the field into equal parts + * "equal": divide the field into equal parts * an array of explicitly given thresholds Default: "arithmetic" mean : :class:`float`or :any:`None` diff --git a/src/gstools/transform/field.py b/src/gstools/transform/field.py index 5d3533b7..795ed2a1 100644 --- a/src/gstools/transform/field.py +++ b/src/gstools/transform/field.py @@ -307,7 +307,7 @@ def discrete( the thresholds, where the value classes are separated possible values are: * "arithmetic": the mean of the 2 neighbouring values - * "equal": devide the field into equal parts + * "equal": divide the field into equal parts * an array of explicitly given thresholds Default: "arithmetic" field : :class:`str`, optional diff --git a/src/gstools/variogram/variogram.py b/src/gstools/variogram/variogram.py index 4d710aa6..fc65d8c9 100644 --- a/src/gstools/variogram/variogram.py +++ b/src/gstools/variogram/variogram.py @@ -117,14 +117,14 @@ def vario_estimate( being the bins. The Cressie estimator is more robust to outliers [Webster2007]_. - By provding `direction` vector[s] or angles, a directional variogram + By providing `direction` vector[s] or angles, a directional variogram can be calculated. If multiple directions are given, a set of variograms will be returned. - Directional bining is controled by a given angle tolerance (`angles_tol`) + Directional bining is controlled by a given angle tolerance (`angles_tol`) and an optional `bandwidth`, that truncates the width of the search band around the given direction[s]. - To reduce the calcuation time, `sampling_size` could be passed to sample + To reduce the calculation time, `sampling_size` could be passed to sample down the number of field points. Parameters @@ -167,13 +167,13 @@ def vario_estimate( Default: False direction : :class:`list` of :class:`numpy.ndarray`, optional directions to evaluate a directional variogram. - Anglular tolerance is given by `angles_tol`. + Angular tolerance is given by `angles_tol`. bandwidth to cut off how wide the search for point pairs should be is given by `bandwidth`. You can provide multiple directions at once to get one variogram for each direction. For a single direction you can also use the `angles` parameter, - to provide the direction by its spherical coordianates. + to provide the direction by its spherical coordinates. Default: :any:`None` angles : :class:`numpy.ndarray`, optional the angles of the main axis to calculate the variogram for in radians