Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gauss-Newton solving visualization #67

Merged
merged 3 commits into from
Oct 3, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Updated to pass blackd pipeline
  • Loading branch information
ChabaneAmaury committed Oct 1, 2022
commit 92ff6631c8f2efb45c3deaa9a2df8151dc8bfcaa
12 changes: 9 additions & 3 deletions examples/eit_static_jac.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 60,19 @@

# Real time update version
colorbar = None
for ds in eit.gn(v1, lamb_decay=0.1, lamb_min=1e-5, maxiter=20, verbose=True, generator=True):
for ds in eit.gn(
v1, lamb_decay=0.1, lamb_min=1e-5, maxiter=20, verbose=True, generator=True
):
im = ax.tripcolor(xx, yy, tri, np.real(ds), alpha=1.0, cmap="viridis")
if colorbar is not None: # Update the colorbar as the min and max values are changing
if (
colorbar is not None
): # Update the colorbar as the min and max values are changing
colorbar.remove()
colorbar = fig.colorbar(im)
fig.canvas.draw() # Update the canvas
fig.canvas.flush_events() # Flush the drawing queue

# fig.savefig('../doc/images/demo_static.png', dpi=96)
plt.show(block=True) # Very important when using the generator version, otherwise the program exits automatically
plt.show(
block=True
) # Very important when using the generator version, otherwise the program exits automatically