From ccbe7c6912f5127d606e9e28aa898b4a47a38904 Mon Sep 17 00:00:00 2001 From: Sosnowsky Date: Tue, 28 Jan 2025 15:00:21 +0100 Subject: [PATCH] Should not be here --- blobmodel/plotting.py | 3 --- examples/blob_tilting.py | 19 ++++++------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/blobmodel/plotting.py b/blobmodel/plotting.py index ee9c61c..6d2492b 100644 --- a/blobmodel/plotting.py +++ b/blobmodel/plotting.py @@ -14,7 +14,6 @@ def show_model( interval: int = 100, gif_name: Union[str, None] = None, fps: int = 10, - initial_time: float = 0, ) -> None: """ Creates an animation that shows the evolution of a specific variable over time. @@ -31,8 +30,6 @@ def show_model( If not None, save the animation as a GIF and name it acoridingly. fps : int, optional Set the frames per second for the saved GIF (default: 10). - initial_time : float, optional - Initial time at which the GIF starts Returns ------- diff --git a/examples/blob_tilting.py b/examples/blob_tilting.py index 1dcfdaa..e696e25 100644 --- a/examples/blob_tilting.py +++ b/examples/blob_tilting.py @@ -3,7 +3,7 @@ # velocities vx = 1 -vy = 1 +vy = 0 # sizes wx = 3 @@ -18,14 +18,14 @@ vx_parameter=vx, wx_parameter=wx, wy_parameter=wy, - blob_alignment=True, # Blobs are aligned + blob_alignment=False, ) # blob tilting theta = np.pi / 4 -# Using a lambda function to set the tilt angle theta, allows us to set a distribution for tilt angles if desired. -# In this case we use a degenerate distribution. -bf.set_theta_setter(lambda: theta) +bf.set_theta_setter( + lambda: theta +) # If you want to stochasticity in the angle theta, you can do this thanks to the lambda # create data bm = Model( @@ -40,14 +40,7 @@ num_blobs=100, t_drain=1e10, blob_factory=bf, - t_init=10, ) ds = bm.make_realization(speed_up=True, error=1e-2) # show animation and save as gif -show_model( - dataset=ds, - interval=100, - gif_name="blob_alignment_true.gif", - fps=10, - initial_time=10, -) +show_model(dataset=ds, interval=100, gif_name="2d_animation.gif", fps=10)