supersolids.Animation.MatplotlibAnimation¶
Implements an Animation with matplotlib (for Systems in 1D or 2D).
Module Contents¶
Classes¶
Functions¶
|
|
|
|
|
|
|
- class supersolids.Animation.MatplotlibAnimation.MatplotlibAnimation(Anim)¶
Bases:
supersolids.Animation.Animation.Animation- Parameters
- set_limits(self, row, col, x_min, x_max, y_min, y_max)¶
Sets the plot limits appropriate, even if the initial wave function \(\psi_0\) is not normalized.
- Parameters
row (int) – row of the subplot for the animation
col (int) – column of the subplot for the animation
x_min (float) – minimum x value of subplot
x_max (float) – maximum x value of subplot
y_min (float) – minimum y value of subplot
y_max (float) – maximum y value of subplot
- set_limits_smart(self, row, col, System)¶
Sets the plot limits appropriate, even if the initial wave function \(\psi_0\) is not normalized.
- Parameters
row (int) – row of the subplot for the animation
col (int) – column of the subplot for the animation
System (supersolids.Schroedinger.Schroedinger) – Defines the Schroedinger equation for a given problem
- get_V_plot_values(self, i, j, System, reserve=1.0)¶
- Parameters
i (int) –
j (int) –
System (supersolids.Schroedinger.Schroedinger) –
reserve (float) –
- animate(self, frame_index, System, accuracy=10 ** - 6)¶
Sets the plot limits appropriate, even if the initial wave function \(\psi_0\) is not normalized.
- Parameters
frame_index (int) – Current index of frame
System (supersolids.Schroedinger.Schroedinger) – Defines the Schroedinger equation for a given problem
accuracy (float) – Convergence is reached when relative error of mu is smaller than accuracy, where \(\mu = - \log(\psi_{normed}) / (2 dt)\)
- start(self, System, accuracy=10 ** - 6)¶
Sets the plot limits appropriate, even if the initial wave function \(\psi_0\) is not normalized
- Parameters
accuracy (float) – Convergence is reached when relative error of mu is smaller than accuracy, where \(\mu = - \log(\psi_{normed}) / (2 dt)\)
System (supersolids.Schroedinger.Schroedinger) – Defines the Schroedinger equation for a given problem
- supersolids.Animation.MatplotlibAnimation.plot_2d(resolution=32, x_lim=(- 1, 1), y_lim=(- 1, 1), z_lim=(0, 1), alpha=[0.6], **kwargs)¶
- Parameters
resolution – number of grid points in one direction
x_lim (Tuple[float, float]) – Limits of plot in x direction
y_lim (Tuple[float, float]) – Limits of plot in y direction
z_lim (Tuple[float, float]) – Limits of plot in z direction
alpha (List[float]) – alpha value for plot transparency
- supersolids.Animation.MatplotlibAnimation.round_z_to_0(pos, func, tol=1e-05)¶
- Parameters
tol (float) –
- supersolids.Animation.MatplotlibAnimation.crop_pos_to_limits(ax, pos, func, func_val=None)¶
- supersolids.Animation.MatplotlibAnimation.get_V_plot_values(ax, pos, V, resolution, reserve=1.0)¶
- Parameters
resolution (int) –
reserve (float) –