Skip to content

perturbation.SphericalGaussian

Import path: earth2studio.perturbation.SphericalGaussian

View source on GitHub

Documentation

Gaussian random field on the sphere with Matern covariance peturbation method output to a lat lon grid

Warning

Presently this method generates noise on equirectangular grid of size [N, 2N] when N is even or [N+1, 2N] when N is odd.

Parameters:

  • noise_amplitude (float | Tensor, default: 0.05 ) –

    Noise amplitude, by default 0.05. If a tensor, this must be broadcastable with the input data.

  • alpha (float, default: 2.0 ) –

    Regularity parameter. Larger means smoother, by default 2.0

  • tau (float, default: 3.0 ) –

    Length-scale parameter. Larger means more scales, by default 3.0

  • sigma (Union[float, None], default: None ) –

    Scale parameter. If None, sigma = tau(0.5(2alpha - 2.0)), by default None

__call__

__call__(
    x: Tensor, coords: CoordSystem
) -> tuple[Tensor, CoordSystem]

Apply perturbation method

Parameters:

  • x (Tensor) –

    Input tensor intended to apply perturbation on

  • coords (CoordSystem) –

    Ordered dict representing coordinate system that describes the tensor, must contain "lat" and "lon" coordinates

Returns:

  • tuple[torch.Tensor, CoordSystem]: –

    Output tensor and respective coordinate system dictionary

Examples using earth2studio.perturbation.SphericalGaussian