pangeo_fish.helpers.render_distributions

pangeo_fish.helpers.render_distributions#

pangeo_fish.helpers.render_distributions(*, data: Dataset, time_step=3, frames_dir='frames', output_path='states', extension='gif', fps=10, remove_frames=True, storage_options: dict = None, **kwargs)#

Render a video of a dataset resulting from the merging of emission and the states distributions.

Parameters:
  • data (xarray.Dataset) – A dataset that contains the emission and states variables

  • time_step (int, default: 3) – Time step to sample data from data

  • frames_dir (str, default: "frames") – Name of the folder to save the images to

  • output_path (str, default: "states") – Path to save the video. In case of an AWS S3 uri, the video is first saved locally, and then send to the bucket

  • extension (str, default: "gif") – Name of the file extension of the video Either “gif” or “mp4”. In the latter case, make sure to have installed imageio[ffmpeg]

  • fps (int, default: 10) – Number of frames per second.

  • remove_frames (bool, default: True) – Whether to delete the frames

  • storage_options (dict, optional) – Dictionary containing storage options for connecting to the S3 bucket

Returns:

video_fn (str) – Local path to the video

See also

pangeo_fish.helpers.open_distributions.