Skip to content

Commit

Permalink
Run autoformatters on notebooks (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
santisoler authored Jan 26, 2024
1 parent 1313b79 commit d1159dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion notebooks/01-forward-dc-resisitivity-2d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@
"\n",
" # Write out data at their original electrode locations (not shifted)\n",
" data_obj = data.Data(survey_original, dobs=dobs, standard_deviation=std)\n",
" if survey_type == 'dipole-dipole':\n",
" if survey_type == \"dipole-dipole\":\n",
" fname = dir_path + \"dipole_dipole.obs\"\n",
" else:\n",
" fname = dir_path + \"pole_dipole.obs\"\n",
Expand Down
24 changes: 12 additions & 12 deletions notebooks/02-inversion-dc-resistivity-2d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
"metadata": {},
"outputs": [],
"source": [
"survey_type = 'pole-dipole'"
"survey_type = \"pole-dipole\""
]
},
{
Expand All @@ -192,11 +192,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 @@ -831,7 +831,7 @@
" active_cells=active_cells,\n",
" reference_model=starting_model,\n",
" length_scale_x=10,\n",
" length_scale_y=10\n",
" length_scale_y=10,\n",
")"
]
},
Expand Down Expand Up @@ -1158,7 +1158,9 @@
"ax2b = ax2a.twinx()\n",
"\n",
"ax1a.plot(\n",
" iteration, target_misfit.chifact * dc_data.survey.nD * np.ones_like(iteration), \"k--\",\n",
" iteration,\n",
" target_misfit.chifact * dc_data.survey.nD * np.ones_like(iteration),\n",
" \"k--\",\n",
")\n",
"ax1a.plot(iteration, phi_d, \"b-o\")\n",
"ax1b.plot(iteration, phi_m, \"r-o\")\n",
Expand Down Expand Up @@ -1360,13 +1362,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 @@ -1378,14 +1379,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

0 comments on commit d1159dd

Please sign in to comment.