pangeo_fish.helpers.combine_pdfs

Contents

pangeo_fish.helpers.combine_pdfs#

pangeo_fish.helpers.combine_pdfs(*, emission_ds: Dataset, acoustic_ds: Dataset, chunks: dict, dims=None, plot=False, **kwargs)#

Combine and normalize 2 probability distributions (pdfs).

Parameters:
  • emission_ds (xarray.Dataset) – Dataset of emission probabilities

  • acoustic_ds (xarray.Dataset) – Dataset of acoustic probabilities

  • 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``)