pangeo_fish.helpers.compute_acoustic_pdf

pangeo_fish.helpers.compute_acoustic_pdf#

pangeo_fish.helpers.compute_acoustic_pdf(*, emission_ds: Dataset, tag: DataTree, receiver_buffer: Quantity, chunk_time=24, dims: list[str] = ['cells'], plot=False, save=False, target_root='.', storage_options: dict = None, **kwargs)#

Compute a emission probability distribution from (acoustic) detection data.

Parameters:
  • emission_ds (xarray.Dataset) – A dataset that must have the variables time, mask and cell_ids

  • tag (xarray.DataTree) – The tag data. It must have the datasets acoustic and stations

  • receiver_buffer (pint.Quantity) – Maximum allowed detection distance for acoustic receivers

  • chunk_time (int, default: 24) – Chunk size for the time dimension

  • dims (list of str, default: [``”cells”:py:class:`]`) -- The list of the dimensions. Either ``["x", "y"] or ["cells"].

  • plot (bool, default: False) – Whether to return a plot of the dataset

  • save (bool, default: False) – Whether to save the dataset

  • target_root (str, default: ".") – Root of the folder to save the .zarr array (under {target_root}/acoustic.zarr). Only used if save=True

  • storage_options (mapping, optional) – Dictionary containing storage options for connecting to the S3 bucket. Only used if save=True

Returns:

  • acoustic_pdf (xarray.Dataset) – The acoustic emission pdf

  • figure (plt.Figure or None) – The plot of acoustic_pdf, or None if plot=False