foscat.xarray.statistics#

Functions#

backend_to_dict(backend)

construct_backend(backend, kwargs)

stack_other_dims(arr, spatial_dim, batch_dim)

reference_statistics(arr, *, parameters[, ...])

reference statistics for a single image

cross_statistics(arr1, arr2, *, parameters[, ...])

cross statistics between two images

Module Contents#

foscat.xarray.statistics.backend_to_dict(backend)#
foscat.xarray.statistics.construct_backend(backend, kwargs)#
foscat.xarray.statistics.stack_other_dims(arr, spatial_dim, batch_dim)#
foscat.xarray.statistics.reference_statistics(arr, *, parameters, spatial_dim='cells', variances=False, mask=None, norm=None, jmax=None)#

reference statistics for a single image

Parameters:
  • arr (xarray.DataArray) – Input image. For now, only 1D healpix is supported. Every dimension other than the spatial dimension (see spatial_dim) will be stacked.

  • parameters (Parameters) – The parameters for the scattering covariance transform.

  • spatial_dim (str, default: "cells") – The spatial dimension.

  • variances (bool, default: False) – Whether to compute the variances of the statistic values.

  • mask (xarray.DataArray, optional) – Mask out certain regions. Not implemented yet.

  • norm ({"auto", "self"} or None, default: None) – Normalization method: - None: no normalization - “auto”: normalize by the reference S2 - “self”: normalize by the current S2

foscat.xarray.statistics.cross_statistics(arr1, arr2, *, parameters, spatial_dim='cells', variances=False, mask=None, norm=None)#

cross statistics between two images

Parameters:
  • arr1, arr2 (xarray.DataArray) – Input images. Must align exactly. For now, only 1D healpix is supported. Every dimension other than the spatial dimension (see spatial_dim) will be stacked.

  • parameters (Parameters) – The parameters for the scattering covariance transform.

  • spatial_dim (str, default: "cells") – The spatial dimension.

  • variances (bool, default: False) – Whether to compute the variances of the statistic values.

  • mask (xarray.DataArray, optional) – Mask out certain regions. Not implemented yet.

  • norm ({"auto", "self"} or None, default: None) – Normalization method: - None: no normalization - “auto”: normalize by the reference S2 - “self”: normalize by the current S2