Closed jcmefra closed 1 day ago
I don't understand your mesh generation
grid = pg.createGrid(x=np.linspace(start_x, end_x, 64),
y=np.linspace(0, depth, 64))
mesh = mt.createMesh(world, quality=34, grid=grid)
The createMesh
function does not have an argument grid
, and it always creates a triangular mesh. You can directly use grid, or append a triangular boundary around it.
Thank you for the answer. I tried to just use grid but it outputs something like this:
I want to output something like the image I uploaded in the issue, but with a squared mesh so each node has a resistivity value and I can convert it to a matrix. Is that possible? Thank you!
You mean you would like to populate the grid with markers (and then resistivities) like above?
for c in grid.cells():
if c.center().y() > -20:
c.setMarker(1)
elif if c.center().y() > -30:
c.setMarker(2)
...
pg.show(grid, markers=True)
Closing due to inactivity.
Problem description
Hello, I want the synthetic data generated with a Custom mesh but the example of ERT only shows how to use the custom mesh in the inversion, I want my synthetic model to be with a custom mesh as well. Thanks in advance.
Your environment
Please provide the output of
print(pygimli.Report())
here. If that does not work, please give provide some additional information on your:Operating system: e.g. Windows, Linux or Mac? Python version: e.g. 3.9, 3.10, etc.? pyGIMLi version: Output of
print(pygimli.__version__)
Way of installation: e.g. Conda package, manual compilation from source, etc.Steps to reproduce
I'm building an iterable to create diverse random synthetic models:
I think the part of interest is:
Expected behavior
My synthetic models to have a 64x64 squared grid
Actual behavior
Grid is triangular: