pangeo_fish.helpers.compute_emission_pdf

pangeo_fish.helpers.compute_emission_pdf#

pangeo_fish.helpers.compute_emission_pdf(*, diff_ds: Dataset, events_ds: Dataset, differences_std: float, initial_std: float, recapture_std: float, chunk_time: int = 24, dims: list[str] = ['cells'], plot=False, save=False, target_root='.', storage_options: dict = None, **kwargs)#

Compute the temporal emission matrices given a dataset and tagging events.

Parameters:
  • diff_ds (xarray.Dataset) – A dataset that must have the variables diff and ocean_mask

  • events_ds (xarray.Dataset) – The tagging events. It must have the coordinate event_name and values release and fish_death. Hint: given a tag model, it corresponds to tag["tagging_events"].ds

  • differences_std (float) – Standard deviation that is applied to the data (passed to scipy.stats.norm.pdf). It’d express the estimated certainty of the field of difference

  • initial_std (float) – Covariance for the initial event. It should reflect the certainty of the initial release area

  • recapture_std (float) – Covariance for the recapture event. It should reflect the certainty of the final recapture area

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

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

  • 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}/emission.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:

  • emission_pdf (xarray.Dataset) – The emission pdf

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