anim.anim.animate#

anim.anim.animate(f_plot, workFolder, fps, compute=None, max_frames=None, savefig_kwargs={}, client=None, force=False, nprocess=0, only_convert=False, no_convert=False, max_memory_ds=1000000.0, ffmpeg_log=False)[source]#

create images in parallel and then combine them in a video

Parameters:
  • f_plot (callable) – function used to build the image. See Note for more infos

  • workFolder (str) – path where all the images and video will be created

  • fps (int) – frame per seconds for the video

  • compute (callable, optional) – function which yield data to be used by f_plot. See Note for more infos. By default None

  • max_frames (int, optional) – maximum of images to build, by default None

  • savefig_kwargs (_type_, optional) – options to pass to fig.savefig(…), by default dict()

  • client (dask.Client or callable, optional) – dask client used for building images. You can pass a function which return a dask.Client. by default None

  • force (bool, optional) – if True, force regeneration of all images. if False, image already computed and saved on disk won’t be computed. By default False

  • nprocess (int, optional) – number of cpu to use when not providing a dask.Client. If not provided, use all cpus

  • only_convert (bool, optional) – if True, don’t generate images at all. We only build the video, by default False

  • no_convert (bool, optional) – if True, don’t generate a video at all. We only build the images

  • max_memory_ds (int, optional) – if data provided by compute exceed max_memory_ds, it will be compressed in zarr to minimise ram usage. By default 1e6

  • ffmpeg_log (bool, optional) – print all ffmpeg logs. If not specified, run ffmpeg with `-loglevel quiet

Returns:

return the video name

Return type:

str