Skip to content

Commit

Permalink
Merge branch 'main' into contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
santisoler authored Jan 29, 2024
2 parents 11f94ac + 673076d commit 3a2fc19
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 16 deletions.
56 changes: 41 additions & 15 deletions live/02-inversion-dc-resistivity-2d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
"## Step 0: Importing Modules"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -170,7 +177,7 @@
"outputs": [],
"source": [
"topo_url = \"https://github.com/simpeg/agrogeo24/raw/main/data/topo_2d.txt\"\n",
"topo_hash = \"1B2DAC5C46E48AB1C5606BB14621279C0A86DFD7790674A9FAAD83F3595E7030\"\n",
"topo_hash = \"09EE57B1687E9D17801993F048D7981C1F75B7D6A0F9D702927C9F6BCAA73B13\"\n",
"\n",
"topo_filename = pooch.retrieve(topo_url, known_hash=topo_hash)"
]
Expand All @@ -181,11 +188,11 @@
"metadata": {},
"outputs": [],
"source": [
"if survey_type == 'dipole-dipole':\n",
"if survey_type == \"dipole-dipole\":\n",
" data_url = \"https://github.com/simpeg/agrogeo24/raw/main/data/dipole_dipole.obs\"\n",
" data_hash = \"41ad436c6f3ce9f76aff95e4b6e50c85c851bb674e0c36ed0150b655c1534eb2\"\n",
" data_filename = pooch.retrieve(data_url, known_hash=data_hash)\n",
"elif survey_type == 'pole-dipole':\n",
"elif survey_type == \"pole-dipole\":\n",
" data_url = \"https://github.com/simpeg/agrogeo24/raw/main/data/pole_dipole.obs\"\n",
" data_hash = \"43be6078cb782f468e1feb21e42f23f33e2c3bb1b766d4038490c071e1c9db15\"\n",
" data_filename = pooch.retrieve(data_url, known_hash=data_hash)\n",
Expand Down Expand Up @@ -226,6 +233,13 @@
"dc_data = read_dcip2d_ubc(data_filename, \"volt\", \"general\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -398,6 +412,13 @@
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -748,7 +769,7 @@
"\n",
"### <span style=\"color:darkgreen\">Exercise (beginner):</span>\n",
"\n",
"Use the [BaseInvProblem](https://docs.simpeg.xyz/content/api/generated/SimPEG.inverse_problem.BaseInvProblem.html) class to fully define the inverse problem that is solved at each beta (trade-off parameter) iteration. Use the variable name **inv_prob**. Instantiation requires the following as input arguments:\n",
"Use the [inverse_problem.BaseInvProblem](https://docs.simpeg.xyz/content/api/generated/SimPEG.inverse_problem.BaseInvProblem.html) class to fully define the inverse problem that is solved at each beta (trade-off parameter) iteration. Use the variable name **inv_prob**. Instantiation requires the following as input arguments:\n",
"\n",
"* **dmis** (the data misfit object)\n",
"* **reg** (the regularization object)\n",
Expand Down Expand Up @@ -874,6 +895,13 @@
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -1088,13 +1116,12 @@
"metadata": {},
"outputs": [],
"source": [
"if survey_type == 'dipole-dipole':\n",
"\n",
"if survey_type == \"dipole-dipole\":\n",
" air_resistivity = 1e8\n",
" background_resistivity = 1e2\n",
" block_resistivity = 1e3\n",
" basement_resistivity = 1e1\n",
" \n",
"\n",
" true_resistivity = background_resistivity * np.ones(mesh.n_cells)\n",
"\n",
" ind_basement = mesh.cell_centers[:, -1] < -16.0\n",
Expand All @@ -1106,14 +1133,13 @@
" true_resistivity[ind_block] = block_resistivity\n",
"\n",
" true_resistivity = true_resistivity[active_cells]\n",
" \n",
"elif survey_type == 'pole-dipole':\n",
" \n",
"\n",
"elif survey_type == \"pole-dipole\":\n",
" air_resistivity = 1e8\n",
" background_resistivity = 2e2\n",
" aquifer_resistivity = 2e1\n",
" basement_resistivity = 1e3\n",
" \n",
"\n",
" true_resistivity = background_resistivity * np.ones(mesh.n_cells)\n",
"\n",
" ind_aquifer = mesh.cell_centers[:, -1] < -12\n",
Expand Down Expand Up @@ -1179,11 +1205,11 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": []
"source": [
"**Save notebook to drive so we can reuse tomorrow!**"
]
}
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion notebooks/02-inversion-dc-resistivity-2d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"outputs": [],
"source": [
"topo_url = \"https://github.com/simpeg/agrogeo24/raw/main/data/topo_2d.txt\"\n",
"topo_hash = \"1B2DAC5C46E48AB1C5606BB14621279C0A86DFD7790674A9FAAD83F3595E7030\"\n",
"topo_hash = \"09EE57B1687E9D17801993F048D7981C1F75B7D6A0F9D702927C9F6BCAA73B13\"\n",
"\n",
"topo_filename = pooch.retrieve(topo_url, known_hash=topo_hash)"
]
Expand Down

0 comments on commit 3a2fc19

Please sign in to comment.