Skip to content

Commit

Permalink
Update live notebook with forward model (#28)
Browse files Browse the repository at this point in the history
Update the live notebook to match the latest changes in the full
notebook.
  • Loading branch information
santisoler authored Jan 25, 2024
1 parent eec3bfa commit f458deb
Showing 1 changed file with 33 additions and 8 deletions.
41 changes: 33 additions & 8 deletions live/01-forward-dc-resisitivity-2d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@
"import matplotlib.pyplot as plt\n",
"from matplotlib.colors import LogNorm\n",
"\n",
"mpl.rcParams.update({\"font.size\": 14}) # default font size\n",
"\n",
"write_output = True # Optional"
"# Increase font size of plots\n",
"mpl.rcParams.update({\"font.size\": 14})"
]
},
{
Expand Down Expand Up @@ -121,6 +120,22 @@
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can plot pseudo-locations, like:\n",
"\n",
"<img src=\"https://github.com/geoscixyz/gpg/raw/main/content/DC_resistivity/images/Pseudo_PDP_East.gif\" width=\"80%\" align=\"center\"/>"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -139,6 +154,15 @@
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can get information from the survey:\n",
"- the total number of data values,\n",
"- the electrodes locations"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -368,21 +392,22 @@
"metadata": {},
"outputs": [],
"source": [
"# Generate a mapping to ignore inactive cells in plot\n",
"plotting_map = maps.InjectActiveCells(mesh, active_cells, np.nan)\n",
"\n",
"fig = plt.figure(figsize=(10, 3))\n",
"fig = plt.figure(figsize=(10, 4.5))\n",
"\n",
"norm = LogNorm(vmin=1e1, vmax=1e3)\n",
"\n",
"ax1 = fig.add_axes([0.14, 0.17, 0.68, 0.7])\n",
"mesh.plot_image(\n",
" plotting_map * resistivity_model,\n",
" ax=ax1,\n",
" grid=False,\n",
" pcolor_opts={\"norm\": norm, \"cmap\": mpl.cm.RdYlBu_r},\n",
" grid=True,\n",
" pcolor_opts={\"norm\": norm, \"cmap\": mpl.cm.RdYlBu_r, \"linewidth\": 0.5},\n",
")\n",
"ax1.set_xlim(-70, 70)\n",
"ax1.set_ylim(y_topo_max - 50, y_topo_max)\n",
"ax1.set_xlim(-50, 50)\n",
"ax1.set_ylim(np.max(topo_2d[:, -1]) - 50, np.max(topo_2d[:, -1]))\n",
"ax1.set_title(\"Electrical Resistivity (Active Cells)\")\n",
"ax1.set_xlabel(\"x (m)\")\n",
"ax1.set_ylabel(\"y (m)\")\n",
Expand Down

0 comments on commit f458deb

Please sign in to comment.