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 variablesdiffandocean_maskevents_ds (
xarray.Dataset) – The tagging events. It must have the coordinateevent_nameand valuesreleaseandfish_death. Hint: given a tag model, it corresponds totag["tagging_events"].dsdifferences_std (
float) – Standard deviation that is applied to the data (passed toscipy.stats.norm.pdf). It’d express the estimated certainty of the field of differenceinitial_std (
float) – Covariance for the initial event. It should reflect the certainty of the initial release arearecapture_std (
float) – Covariance for the recapture event. It should reflect the certainty of the final recapture areadims (
listofstr, default:[``”cells”:py:class:`]`) -- The list of the dimensions. Either ``["x", "y"]or["cells"].chunk_time (
int, default:24) – Chunk size for the time dimensionplot (
bool, default:False) – Whether to return a plot of the datasettarget_root (
str, default:".") – Root of the folder to save the.zarrarray (under{target_root}/emission.zarr). Only used ifsave=Truestorage_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 pdffigure (
plt.FigureorNone) – The plot ofemission_pdf, or None ifplot=False