eitcom / pyEIT

Python based toolkit for Electrical Impedance Tomography
Other
169 stars 96 forks source link

Gauss-Newton solving visualization #67

Closed ChabaneAmaury closed 1 year ago

ChabaneAmaury commented 1 year ago

I added a small bit of code to the Gauss-Newton solving function to enable the visualization of the process in real time. There is also a demo in the example, and I made sure not to erase the original code. The function is backward-compatible as it is optionnal to enable it, and only take a flag to be put to True.

I thought it would be nice to be implemented, since I use it personnally during debugging and solving (makes the solving process a bit less boring and annoying to look at for very long solving times).

liubenyuan commented 1 year ago

I am not familiar with this generator syntax. I think the comment in the example might be moved to avoid black formatting, i.e.,

plt.show(
    block=True
)  # Very important when using the generator version, otherwise the program exits automatically

changed with

# Very important when using the generator version, otherwise the program exits automatically
plt.show(block=True)

Also withe the colorbar.remove() lines above.