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

Plot 2D improvement for models with complex topographies #137

Merged
merged 1 commit into from
Oct 14, 2022

Conversation

rdno
Copy link
Contributor

@rdno rdno commented Oct 7, 2022

Hi Bryant,

This patch adds plot_2d_image function and uses it in seisflows.tools.specfem.Model

It adds NaN values to the top edge of the model before interpolation to the regular grid. In order to fix the representation issue with complex topographies. I have also tested with flat topography, it didn't cause problems.

I couldn't it make it work tricontourf. Feel free to explore similar fix for it. plot_2d_image might be slower than plot_2d_contour since it uses imshow which requires a interpolated regular grid.

Comparison image for the simple_topography_and_also_a_simple_fluid_layer specfem2D model.

from seisflows.tools.specfem import Model
m = Model("DATA")
m.plot2d(parameter="vs")

topo_plots

plot_2d_image adds NaN values to the top edge of the model before
interpolation to the regular grid. In order to, fix the representation
issue with complex topographies.
@bch0w bch0w merged commit fd66e90 into adjtomo:devel Oct 14, 2022
@bch0w
Copy link
Member

bch0w commented Oct 14, 2022

Thanks Ridvan! The new figure looks great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants