pangeo_fish.helpers.optimize_pdf

Contents

pangeo_fish.helpers.optimize_pdf#

pangeo_fish.helpers.optimize_pdf(*, ds: Dataset, earth_radius: Quantity, adjustment_factor: float, truncate: float, maximum_speed: Quantity, tolerance: float, dims: list[str] = ['cells'], save_parameters=False, storage_options: dict = None, target_root='.', **kwargs) dict#

Optimize a temporal probability distribution.

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

  • earth_radius (pint.Quantity) – Radius of the Earth used for distance calculations

  • adjustment_factor (float) – Factor value for the maximum fish’s displacement

  • truncate (float) – Truncating factor for convolution process

  • maximum_speed (pint.Quantity) – Maximum fish’s velocity

  • tolerance (float) – Tolerance level for the optimised parameter search computation

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

  • save_parameters (bool, default: False) – Whether to save the results under {target_root}/parameters.json

  • target_root (str, default: ".") – Root of the folder to save the results as a json file parameters.json Only used if save_parameters=True

  • storage_options (dict, optional) – Dictionary containing storage options for connecting to the S3 bucket. Only used if save_parameters=True and that the saving is done on a S3 bucket.

Returns:

params (dict) – A dictionary containing the optimization results (mainly, the sigma value of the Brownian movement model)