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

Small fixes to live notebook with forward model #24

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading