pangeo_fish.helpers.normalize_pdf

Contents

pangeo_fish.helpers.normalize_pdf#

pangeo_fish.helpers.normalize_pdf(*, ds: Dataset, chunks: dict, dims=None, plot=False, **kwargs)#

Normalize a probability distributions (pdf).

Parameters:
  • ds (xarray.Dataset) – Dataset of emission probabilities. It must have a variable pdf.

  • chunks (mapping) – How to chunk the data

  • dims (mapping, optional) – Spatial dimensions to transpose the combined dataset. Relevant in case of a 2D, such as [“x”, “y”] or [“y”, “x”]

  • plot (bool, default: False) – Whether to plot the sum of the distributions along the time dimension.

Returns:

  • combined (xarray.Dataset) – The combined pdf

  • figure (plt.Figure, or None if ``plot=False``)