gstools.field.generator.Generator
- class gstools.field.generator.Generator(model, **kwargs)[source]
Bases:
ABC
Abstract generator class.
- Parameters
model (
CovModel
) – Covariance model**kwargs – Placeholder for keyword-args
- Attributes
name
str
: Name of the generator.value_type
str
: Type of the field values (scalar, vector).
Methods
__call__
(pos[, add_nugget])Generate the field.
get_nugget
(shape)Generate normal distributed values for the nugget simulation.
update
([model, seed])Update the model and the seed.
- abstract __call__(pos, add_nugget=True)[source]
Generate the field.
- Parameters
pos ((d, n),
numpy.ndarray
) – the position tuple with d dimensions and n points.add_nugget (
bool
) – Whether to add nugget noise to the field.
- Returns
the random modes
- Return type
- abstract get_nugget(shape)[source]
Generate normal distributed values for the nugget simulation.
- Parameters
shape (
tuple
) – the shape of the summed modes- Returns
nugget – the nugget in the same shape as the summed modes
- Return type