Skip to content

Commit

Permalink
Small fixes to live notebook with forward model (#24)
Browse files Browse the repository at this point in the history
- Remove indentation for LaTeX equation
- Fix cells for mesh creation
  • Loading branch information
santisoler authored Jan 25, 2024
1 parent 5d66234 commit 5feedab
Showing 1 changed file with 10 additions and 58 deletions.
68 changes: 10 additions & 58 deletions live/01-forward-dc-resisitivity-2d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"- Spans over -300m to 300m\n",
"- Has a horizontal resolution of 1m\n",
"- The synthetic elevations are generated with a function:\n",
" $$ y(x) = 4 + 4 \\tanh \\left( \\frac{x}{100} \\right) $$"
"\n",
"$$ y(x) = 4 + 4 \\tanh \\left( \\frac{x}{100} \\right) $$"
]
},
{
Expand Down Expand Up @@ -186,7 +187,14 @@
"\n",
"# Shift top to maximum topography and center of survey line\n",
"y_topo_max = np.max(topo_2d[:, -1])\n",
"mesh.origin = mesh.origin + np.r_[np.mean(end_locations), y_topo_max]"
"mesh.origin = mesh.origin + np.r_[0, y_topo_max]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Once the tree mesh is initialized, we want to refine it close to the electrodes and around the topography"
]
},
{
Expand Down Expand Up @@ -240,62 +248,6 @@
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Once the tree mesh is initialized, we want to refine it close to the electrodes and around the topography"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Plot the mesh\n",
"fig = plt.figure(figsize=(8, 4))\n",
"\n",
"ax1 = fig.add_axes([0.14, 0.17, 0.8, 0.7])\n",
"mesh.plot_grid(ax=ax1, linewidth=1)\n",
"ax1.grid(False)\n",
"ax1.set_xlim(-200, 200)\n",
"ax1.set_ylim(np.max(y_topo) - 200, np.max(y_topo))\n",
"ax1.set_title(\"Mesh\")\n",
"ax1.set_xlabel(\"x (m)\")\n",
"ax1.set_ylabel(\"y (m)\")\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit 5feedab

Please sign in to comment.