Skip to content

Commit

Permalink
SumModel: sum models have a constant rescale factor of 1 since they a…
Browse files Browse the repository at this point in the history
…re derived from correlation not cor
  • Loading branch information
MuellerSeb committed Aug 19, 2024
1 parent e7838cf commit 0e35a22
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/gstools/covmodel/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,7 @@ class SumModel(CovModel):
An empty sum represents a pure Nugget model.
Resetting the total variance or the total length scale will evenly
scale the variances or length scales of the sub models.
Sum models will have a constant rescale factor of one.
Parameters
----------
Expand Down Expand Up @@ -1235,12 +1236,6 @@ class SumModel(CovModel):
If given, ``len_scale`` will be ignored and recalculated,
so that the integral scale of the model matches the given one.
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 conversion or rescaling the length scale
to coincide with e.g. the integral scale.
Will be set by each model individually.
Default: :any:`None`
latlon : :class:`bool`, optional
Whether the model is describing 2D fields on earths surface described
by latitude and longitude. When using this, the model will internally
Expand Down Expand Up @@ -1364,7 +1359,6 @@ def __init__(self, *models, **kwargs):
self._sft = None
self.dim = kwargs.get("dim", self.models[0].dim if self.models else 3)
# prepare parameters (they are checked in dim setting)
self._rescale = 1.0
anis = kwargs.get("anis", self.models[0].anis if self.models else 1)
angles = kwargs.get(
"angles", self.models[0].angles if self.models else 0
Expand Down Expand Up @@ -1477,6 +1471,11 @@ def models(self):
""":class:`tuple`: The summed models."""
return self._models

@property
def rescale(self):
""":class:`float`: SumModel has a constant rescale factor of one."""
return 1.0

@property
def geo_scale(self):
""":class:`float`: Geographic scaling for geographical coords."""
Expand Down

0 comments on commit 0e35a22

Please sign in to comment.