Skip to content

How to set the sensor position in a manully defined rectangular mesh for ERT inversion? #601

Answered by halbmy
lwang19-ai asked this question in Q&A
Discussion options

You must be logged in to vote

A geometry (PLC) is a geometric description that is eventually used to create a mesh. If you want a rectangular mesh, you get a mesh straight away by mt.createGrid(x, y). So if you need to have sensors as nodes, you could make sure the positions are contained in the x and y vectors. In your case it seems like you just want to add topography, e.g. by

grid = mt.createGrid(x, y)
mt = np.interp(pg.x(grid), tx, ty)  # topography contained in tx/ty pairs
for i, n in enumerate(grid.nodes()):
    n.setPosition([n.x(), n.y()+mt[i]])

mt.createGrid could take a topography keyword so that it is done automatically.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by halbmy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants