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

3D Velocity Model Format #49

Open
taranye96 opened this issue Jun 24, 2024 · 2 comments
Open

3D Velocity Model Format #49

taranye96 opened this issue Jun 24, 2024 · 2 comments

Comments

@taranye96
Copy link

Hi Malcom,

I'd like to use this software to perform ray tracing through a 3D velocity model. I found your example 1D velocity model IASP91.csv. If I want to create a 3D model, should the file still be formatted the same way, just with extra rows for the spatially varying velocity? And if so, does it matter how the rows are ordered (or in other words, whether the depth or horizontal distance is varied first)?

Thanks!
Tara

@malcolmw
Copy link
Owner

malcolmw commented Jun 25, 2024

Hi, @taranye96,

For tracing rays through a 3-D model, suggest using the PointSourceSolver class. See the brief example here: https://malcolmw.github.io/pykonal-docs/examples/point_source_solver.html for using the PointSourceSolver in spherical coordinates. Note that the PointSourceSolver also implements Cartesian coordinates if you are working at local scales.

Take a look at the example and let me know if you have any questions about it. Keep in mind that spherical coordinates are defined according to the "physics" convention ($\rho, \theta, \phi$ = radial dstance, polar angle, azimuthal angle) with angles specified in radians. Also, because the gradient operator is not defined at $\rho=0$, one must not place a grid node at the center of the Earth when working in spherical coordinates.

To initialize your velocity model, you need to populate a NumPy array with shape n_rho, n_theta, n_phi where n_rho, n_theta, n_phi are the number of nodes in the $\rho, \theta,$ and $\phi$ directions, respectively.

After calling solver.solve(), you can call solver.trace_rays() to trace your ray paths.

Let me know how it goes.

Cheers,
Malcolm

@taranye96
Copy link
Author

taranye96 commented Jul 8, 2024 via email

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

No branches or pull requests

2 participants