fedoo.MultiFrameDataSet.write_movie
- MultiFrameDataSet.write_movie(filename: str = 'test', field: str | None = None, component: int | str = 0, data_type: str | None = None, scale: float = 1, show_edges: bool = True, clim: list[float | None] | None = [None, None], show_nodes: bool | float = False, **kargs)
Generate a video of the MultiFrameDataSet object by loading iteratively every frame.
- Parameters:
filename (str) – Name of the videofile to write.
field (str (optional)) – Name of the field to plot
component (int, str (default = 0)) – The data component to plot in case of vector data
data_type (str in {'Node', 'Element' or 'GaussPoint'}, optional) – Type of the data. By default, the data_type is determined automatically by scanning the data arrays.
scale (scalar (default = 1)) – The scale factor used for the nodes displacement, using the ‘Disp’ vector field
show_edges (bool (default = True)) – if True, the mesh edges are shown
clim (sequence[float|None] or None) – Sequence of two float to define data boundaries for color bar. If clim is None, clim change at each iteration with the min and max. If one of the boundary is set to None, the value is replace by the min or max. of data for the all iterations sequence. Defaults to minimum and maximum of data for the all iterations sequence (clim =[None,None]).
show_nodes (bool|float (default = False)) – Plot the nodes. If True, the nodes are shown with a default size. If float, show_nodes is the required size.
**kargs (dict) – Other optional parameters (see notes below)
Notes
Many options are available as keyword args. Some of these options are directly related to pyvista options (for instance in the pyvista.plotter.add_mesh method). Please, refer to the documentation of pyvista for more details.
Available keyword arguments are:
- framerateint (default = 24)
Number of frames per second
- qualityint between 1 and 10 (default = 5)
Define the quality of the writen movie. Higher is better but take more place.
- azimuth: scalar (default = 30)
Angle of azimuth (degree) at the begining of the video.
- elevation: scalar (default = 15)
Angle of elevation (degree) at the begining of the video.
- rot_azimuthscalar (default = 0)
Angle of azimuth rotation that is made at each new frame. Used to make easy video with camera moving around the scene.
- rot_elevationscalar (default = 0)
Angle of elevation rotation that is made at each new frame. Used to make easy video with camera moving around the scene.
- scalar_bar_args’ :
dict containing the arguments related to scalar bar.
- window_sizelist of int (default = [1024, 768])
Size of the video in pixel