Closed makeabhishek closed 1 year ago
Regarding the above issue, if I create a parametric mesh, it eliminate the error. Below is the set of lines I added after generating the mesh. But I wondering what is the function parametric mesh
?
# Create the parametric mesh that only reflect the domain geometry
paraMesh = mt.createMesh(c0, q=34.0, smooth=[1, 10])
paraMesh.scale(10.0)
Furthermore, the inverted results are not as close if I follow the petrophysical inversion example.
May I seek your advise?
Regards AB
Using the same mesh for forward calculation for inversion is considered an "inverse crime" in general. In your special case, you are already providing the information about the velocity distribution in the two given regions, so an inversion does not make much sense. You should rather create a new mesh for inversion as you already do in your second post.
For some methods (like ERT) you need a background region to account for boundary conditions. If more than one region is used for inversion, the one with the lowest marker is used as background, which is indeed a very bad default for traveltime tomography that should be avoided by default, at least for traveltime. The paraMesh
returns the mesh, where inversion is done.
Yeah, that make sense. Thanks for the explanation.
However, when I'm trying to use field data with 16 # shot/geophone points. It is giving me same error. Although, as I followed the field data example and read that the mesh is generated by coordinates. Here is the error I'm getting,
- pyGIMLi - ERROR - <class 'pygimli.physics.traveltime.TravelTimeManager.TravelTimeManager'>.checkError(TravelTimeManager.py:93)
DataContainer has no "err" values. Fallback to 3%
18/04/23 - 11:59:22 - pyGIMLi - INFO - Create constant starting model: 347.45950000000005
18/04/23 - 11:59:22 - pyGIMLi - INFO - Created startmodel from forward operator: 35 [347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005, 347.45950000000005]
18/04/23 - 11:59:22 - pyGIMLi - INFO - Starting inversion.
18/04/23 - 11:59:22 - Core - ERROR - There are cells with marker -1. Did you define a boundary region? (This is not needed).
As, I'm considering circular geometry, do i need to define the geometry separately? Furthermore, How can I create a initial velocity model, as I found that pygimli is considering arbitrary initial model.
What does pg.show(mesh, markers=True)
show? Are there cells with marker -1?
/I have not created any mesh for field data. It was mentioned in the petrophysics example that "Finally, we call the invert method and plot the result.The mesh is created based on the sensor positions on-the-fly."
However, when i create a mesh its generating a non-close circular geometry. I'm expecting a circular geometry.
import pygimli as pg
from pygimli.physics import TravelTimeManager
import pygimli.physics.traveltime as tt
#data = tt.load("srtfieldline1.dat")
data = pg.load("traveltimeTestData.sgt")
mgr = TravelTimeManager(data)
mesh=mgr.createMesh(data,quality=34)
sm = tt.createGradientModel2D(data, mesh, vTop=200,vBot=1000)
pg.show(mesh, data=1/sm, label=pg.unit('vel'), showMesh=True, markers=True)
Here are the co-ordinates in .sgt file ``
I also realized that for circular geometry, the coordinate sequence is changing the mesh.
mt.createMesh
is intended to work for surface sensors but not circular geometries. Please have a look at the examples with circular geometry (e.g. petrophysical joint inversion) and use mt.createPolygon(data.sensors(), isClosed=True)
instead.
Thanks for your advise. May I also know, how to create an initial model with a given velocity for inversion of field data? Is this the correct way to initialise the starting model?
TT.invert(data, mesh=paraMesh, lam=100, useGradient=0, zWeight=1.0, secNodes=2,
startModel=1500)
For traveltime tomography in a circular geometry, you can start with a homogeneous velocity derived from the mean value of apparent velocities. For seismic refraction on the Earths surface, one usually starts with a gradient model, for which upper and lower velocity can be specified in the traveltime manager.
So to start with a homogeneous velocity, do I need to define the apparent velocity explicitly or it’s automatically obtain from data? If need to define explicitly, is this the correct code line
TT.invert(data, mesh=paraMesh, lam=100, useGradient=0, zWeight=1.0, secNodes=2,
startModel=1500)
Yes, the starting model can be specified by TT.invert(..., startModel=
or by TT.startModel=
, however, you will have to specify slowness instead of velocity, i.e. 1/1500.
I don't understand why you deleted a significant part of your comment, the one with the image enclosed.
A main purpose of these issues is to help other users solving their problems by finding solutions of previous problems, thus avoiding to repeat ourselves. Please keep this in mind.
Actually the image was not showing in my computer, I thought there is a glitch in uploading. So I removed that.
There was a problem with backquotes, but I had edited your comment to make it visible. Klick on "Edited" button to see the versions.
Traveltime tomography
I'm trying to invert a model with circular geometry. I have created a mesh with two regions and assign the markers to each. However, while running the inversion it is giving the error
Core - ERROR - There are cells with marker -1. Did you define a boundary region? (This is not needed).
Operating system: Linux Python version: Python 3.9.16 pyGIMLi version: 1.3.1
Steps to reproduce
Error