gerg_plotting.plotting_classes.animator ======================================= .. py:module:: gerg_plotting.plotting_classes.animator Module Contents --------------- .. py:class:: Animator A class for creating animations (GIFs) from a sequence of images generated by a plotting function. This class handles both in-memory and disk-based frame generation depending on the number of frames, optimizing memory usage for larger animations. Parameters ---------- image_dpi : int, optional Resolution (dots per inch) for saved images, default is 300 Attributes ---------- plotting_function : Callable Function used to generate each frame param_list : list[dict] List of parameter dictionaries for each frame num_iterations : int Total number of frames to generate duration : int | float Duration of each frame in milliseconds frames : list List to store generated frames in memory gif_filename : Path Output path for the generated GIF images_path : Path Directory for temporary image storage image_files : list List of generated image file paths function_kwargs : dict Additional arguments for the plotting function .. py:method:: animate(plotting_function, param_dict, gif_filename: str, fps=24, **kwargs) -> None Create and save a GIF animation. Parameters ---------- plotting_function : Callable Function that generates each frame param_dict : dict Dictionary of parameters for frame generation gif_filename : str Output path for the GIF fps : int, optional Frames per second, default is 24 ``**kwargs`` Additional arguments passed to plotting_function .. py:attribute:: duration :type: int | float .. py:attribute:: frames :type: list .. py:attribute:: function_kwargs :type: dict .. py:attribute:: gif_filename :type: pathlib.Path .. py:attribute:: image_dpi :type: int .. py:attribute:: image_files :type: list .. py:attribute:: images_path :type: pathlib.Path .. py:attribute:: iteration_param :type: str .. py:attribute:: num_iterations :type: int .. py:attribute:: param_list :type: list[dict] .. py:attribute:: plotting_function :type: Callable