Skip to content

Commit

Permalink
Improved documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernard Giroux committed Nov 15, 2023
1 parent 4db3a23 commit 73a6d9d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/example5.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"source": [
"# Example 5 - anisotropy\n",
"\n",
"Anisotropy has been implemented for the Shortest-Path method\n",
"Anisotropy has been implemented for the Shortest-Path method, for 2D grids and meshes. This notebook shows two examples.\n",
"\n",
"### 5.1 Elliptical anisotropy on a rectilinear grid\n",
"\n",
Expand Down Expand Up @@ -196,11 +196,11 @@
"id": "1ea6ea4f",
"metadata": {},
"source": [
"### 5.2 Weakly anelliptical anisotropy\n",
"### 5.2 Weakly anelliptical anisotropy on triangular meshes\n",
"\n",
"In this section, we are looking at the formulation of Björn Rommel (https://github.com/bjornrommel/steinkauz/tree/master/project/ambiguity).\n",
"\n",
"We will build a model as the one used to produce Fig 7 of the paper."
"Using gmsh, we will build a model as the one used to produce Fig 7 of the paper. The model properties were obtained for Björn's GitHub repo. A fourth layer was added with arbitrary properties."
]
},
{
Expand Down Expand Up @@ -487,7 +487,8 @@
"r4[physical_model == 2] = TARGET['rrr4']\n",
"r4[physical_model == 3] = BEDROCK['rrr4']\n",
"\n",
"mesh.set_slowness(1/V)\n",
"mesh.set_slowness(1/V) # With this implementation of weakly anelliptical anisotropy,\n",
" # we must use slowness in the vertical direction\n",
"mesh.set_r2(r2)\n",
"mesh.set_r4(r4)\n",
"\n",
Expand Down
7 changes: 7 additions & 0 deletions src/ttcrpy/rgrid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1845,6 +1845,13 @@ cdef class Grid2d:
tt_from_rp : bool
compute traveltime using raypaths (available for FSM and DSPM only)
(default is False)
Notes
-----
For raytracing in anisotropic media, the convention for inputting slowness depends
on the model. For elliptical anisotropy, the method `set_slowness` is used to input
horizontal slowness, while for weakly anelliptical anisotropy, the method is used
to input vertical slowness.
"""
cdef vector[double] _x
cdef vector[double] _z
Expand Down
7 changes: 7 additions & 0 deletions src/ttcrpy/tmesh.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,13 @@ cdef class Mesh2d:
length multiplied by this factor (default is 2)
tt_from_rp : bool
compute traveltimes using raypaths (default is False)
Notes
-----
For raytracing in anisotropic media, the convention for inputting slowness depends
on the model. For elliptical anisotropy, the method `set_slowness` is used to input
horizontal slowness, while for weakly anelliptical anisotropy, the method is used
to input vertical slowness.
"""
cdef bool cell_slowness
cdef bool process_obtuse
Expand Down

0 comments on commit 73a6d9d

Please sign in to comment.