From 84010f51523241794c8b286bc32e2b8056980fc9 Mon Sep 17 00:00:00 2001 From: Feda Curic Date: Mon, 31 Jul 2023 09:53:59 +0200 Subject: [PATCH] Remove unused cell that creates animations --- notebooks/ES_2D_Heat_Equation.py | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/notebooks/ES_2D_Heat_Equation.py b/notebooks/ES_2D_Heat_Equation.py index 4bc297a..1560113 100644 --- a/notebooks/ES_2D_Heat_Equation.py +++ b/notebooks/ES_2D_Heat_Equation.py @@ -113,24 +113,6 @@ def sample_prior_perm(N): u_t = pde.heat_equation(u_init, alpha_t, dx, dt, k_start, k_end, rng=rng, scale=scale) -# %% [markdown] -# # How-to create animation (Press `y` to convert from markdown to code) -# -# import matplotlib.animation as animation -# from matplotlib.animation import FuncAnimation -# -# fig, ax = plt.subplots() -# p = ax.pcolormesh(u[0], cmap=plt.cm.jet) -# fig.colorbar(p) -# -# def animate(k): -# return p.set_array(u[k]) -# -# anim = animation.FuncAnimation( -# fig, animate, interval=1, frames=k_end, repeat=False -# ) -# anim.save("heat_equation_solution.gif", writer="imagemagick") - # %% [markdown] # ## Plot every cells' heat transfer coefficient, i.e., the parameter field @@ -169,7 +151,6 @@ def interactive_truth(k): # ## Define placement of sensors and generate synthetic observations based on the true temperature field # %% -# Heat sources are kind of like injection wells # We can think about heat sources as injection wells. # Sensors would then typically be placed where we have production wells. # We'll place the sensors close to heat-sources because the plate cools of quite quickly. @@ -214,7 +195,9 @@ def interactive_truth(k): ax.invert_yaxis() ax.set_title("True temperature field with sensor placement") utils.colorbar(p) -ax.plot([i + 0.5 for i in x], [j + 0.5 for j in y], "s", color="white", markersize=5) +_ = ax.plot( + [i + 0.5 for i in x], [j + 0.5 for j in y], "s", color="white", markersize=5 +) # %% [markdown] # # Ensemble Smoother (ES)