ds.rst.random_field() or Raster.random_field()#
- RasterBase.random_field(error_structure, *, predictors=None, n_fields=1, random_state=None, chunksizes=None, mp_config=None, backend='gpytorch', gpytorch_inducing_points='auto')[source]#
Generate one or more error fields across this raster.
- Parameters:
error_structure (
ErrorStructure) – Error model defined by magnitude and correlation components.predictors (
Mapping[str,Any] |None) – Named magnitude predictors aligned with this raster.n_fields (
int) – Number of independent fields.random_state (
int|Generator|None) – Seed or generator used for reproducible fields.chunksizes (
tuple[int,int] |None) – Lazy output chunk size for an Xarray raster. Every chunk uses the same seed for a component.mp_config (
MultiprocConfig|None) – Worker, tile and output file settings for a Raster.backend (
Literal['gstools','gpytorch']) – Library used to draw correlated errors. Chunked GPyTorch fields use an inducing grid.gpytorch_inducing_points (
int|Literal['auto'] |None) – Target grid size for approximate GPyTorch fields. “auto” uses 256 points for eager and chunked rasters; None requests an exact eager draw.
- Return type:
RasterType|list[RasterType]- Returns:
One result of the same raster type, or a list when n_fields is greater than one.