gemseo.post.animation_settings module#

Settings for post-processing.

Settings Animation_Settings(*, save=True, show=False, file_path='', directory_path='', file_name='', file_extension='', fig_size=(11.0, 11.0), frame_rate=1, first_iteration=-1, time_step=100, n_repetitions=0, temporary_database_path='', gif_file_path='animated_gif', remove_frames=True, post_processing, post_processing_settings)[source]#

Bases: BasePostSettings

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • save (bool) --

    By default it is set to True.

  • show (bool) --

    By default it is set to False.

  • file_path (Path | str) --

    By default it is set to "".

  • directory_path (Path | str) --

    By default it is set to "".

  • file_name (str) --

    By default it is set to "".

  • file_extension (str) --

    By default it is set to "".

  • fig_size (tuple[Annotated[float, Gt(gt=0)], Annotated[float, Gt(gt=0)]]) --

    By default it is set to (11.0, 11.0).

  • frame_rate (Annotated[int, Gt(gt=0)]) --

    By default it is set to 1.

  • first_iteration (int) --

    By default it is set to -1.

  • time_step (Annotated[float, Gt(gt=0)]) --

    By default it is set to 100.

  • n_repetitions (Annotated[int, Ge(ge=0)]) --

    By default it is set to 0.

  • temporary_database_path (str | Path) --

    By default it is set to "".

  • gif_file_path (str | Path) --

    By default it is set to "animated_gif".

  • remove_frames (bool) --

    By default it is set to True.

  • post_processing (BasePost[Any])

  • post_processing_settings (BasePostSettings)

Return type:

None

first_iteration: int = -1#

The iteration to begin the animation.

frame_rate: PositiveInt = 1#

The number of iterations per time step.

Constraints:
  • gt = 0

gif_file_path: str | Path = 'animated_gif'#

The path to the GIF file.

n_repetitions: NonNegativeInt = 0#

The number of times the animation is played. If 0, play infinitely.

Constraints:
  • ge = 0

post_processing: BasePost[Any] [Required]#

The post processing object.

post_processing_settings: BasePostSettings [Required]#

The settings for the post processing object.

remove_frames: bool = True#

Whether to remove the frame images after the GIF generation.

temporary_database_path: str | Path = ''#

The path to a temporary database to avoid deepcopy memory errors.If empty, deepcopy is used instead.

time_step: PositiveFloat = 100#

The time step between two frames in milliseconds.

Constraints:
  • gt = 0

model_post_init(context, /)#

We need to both initialize private attributes and call the user-defined model_post_init method.

Parameters:
  • self (BaseModel)

  • context (Any)

Return type:

None