supersolids.Animation.MayaviAnimation¶
Functions for Potential and initial wave function \(\psi_0\)
Module Contents¶
Classes¶
Functions¶
|
|
- supersolids.Animation.MayaviAnimation.get_supersolids_version()¶
- supersolids.Animation.MayaviAnimation.get_legend(System, frame, supersolids_version, mu_rel=None)¶
- supersolids.Animation.MayaviAnimation.axes_style()¶
- class supersolids.Animation.MayaviAnimation.MayaviAnimation(Anim, slice_indices=[0, 0, 0], dir_path=Path.home().joinpath('supersolids', 'results'), offscreen=False)¶
Bases:
supersolids.Animation.Animation.Animation- mayavi_counter :int = 0¶
- create_movie(self, dir_path=None, input_data_file_pattern='*.png', delete_input=True)¶
Creates movie filename with all matching pictures from input_data_file_pattern. By default deletes all input pictures after creation of movie to save disk space.
- Parameters
dir_path (pathlib.Path) – Path where to look for old directories (movie data)
input_data_file_pattern (str) – Regex pattern to find all input data
delete_input (bool) – Condition if the input pictures should be deleted, after creation the creation of the animation as e.g. mp4
- Return type
pathlib.Path
- prepare(self, System)¶
- Parameters
System (supersolids.Schroedinger.Schroedinger) –
- animate_npz(self, dir_path = None, dir_name = None, filename_schroedinger = f'schroedinger.pkl', filename_steps = f'step_', steps_format = '%06d', steps_per_npz = 10, frame_start = 0, arg_slices = False, azimuth = 0.0, elevation = 0.0)¶
- Parameters
dir_path (pathlib.Path) –
dir_name (str) –
filename_schroedinger (str) –
filename_steps (str) –
steps_format (str) –
steps_per_npz (int) –
frame_start (int) –
arg_slices (bool) –
azimuth (float) –
elevation (float) –
- animate(self, System, accuracy=10 ** - 6, interactive=True)¶
Animates solving of the Schroedinger equations of System with mayavi in 3D. Animation is limited to System.max_timesteps or the convergence according to accuracy.
- Parameters
System (supersolids.Schroedinger.Schroedinger) – Schrödinger equations for the specified system
accuracy (float) – Convergence is reached when relative error of mu is smaller than accuracy, where \(\mu = - \log(\psi_{normed}) / (2 dt)\)
slice_indices – Numpy array with indices of grid points in the directions x, y, z (in terms of System.x, System.y, System.z) to produce a slice/plane in mayavi, where \(\psi_{prob}\) = \(|\psi|^2\) is used for the slice Max values is for e.g. System.Res.x - 1.
interactive (bool) – Condition for interactive mode. When camera functions are used, then interaction is not possible. So interactive=True turn the usage of camera functions off.