Skip to content

Commit

Permalink
Should not be here
Browse files Browse the repository at this point in the history
  • Loading branch information
Sosnowsky committed Jan 28, 2025
1 parent 04e08d2 commit ccbe7c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
3 changes: 0 additions & 3 deletions blobmodel/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
-------
Expand Down
19 changes: 6 additions & 13 deletions examples/blob_tilting.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# velocities
vx = 1
vy = 1
vy = 0

# sizes
wx = 3
Expand All @@ -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(
Expand All @@ -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)

0 comments on commit ccbe7c6

Please sign in to comment.