Skip to content

Commit

Permalink
Merge pull request #15 from simpeg-research/updates_MM
Browse files Browse the repository at this point in the history
Minor notebook refinements
  • Loading branch information
micmitch authored Oct 31, 2024
2 parents 98463c4 + e2bf6f5 commit 4d90fe0
Show file tree
Hide file tree
Showing 9 changed files with 2,254 additions and 959 deletions.
1,322 changes: 1,266 additions & 56 deletions notebooks/simpeg/1_3d_forward_modelling.ipynb

Large diffs are not rendered by default.

408 changes: 299 additions & 109 deletions notebooks/simpeg/2_2d_forward_modelling.ipynb

Large diffs are not rendered by default.

26 changes: 8 additions & 18 deletions notebooks/simpeg/3_1d_forward_modelling.ipynb

Large diffs are not rendered by default.

102 changes: 41 additions & 61 deletions notebooks/simpeg/4_1d_parametric_inversion.ipynb

Large diffs are not rendered by default.

159 changes: 85 additions & 74 deletions notebooks/simpeg/5_1d_fixed_layer_inversion_synthetic.ipynb

Large diffs are not rendered by default.

699 changes: 390 additions & 309 deletions notebooks/simpeg/6_1d_fixed_layer_inversion_field_data.ipynb

Large diffs are not rendered by default.

124 changes: 58 additions & 66 deletions notebooks/simpeg/7_2d_inversion_synthetic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 1,
"id": "ecd430f1",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -98,9 +98,17 @@
" return mesh"
]
},
{
"cell_type": "markdown",
"id": "9d36ac36-1d1a-41a6-b593-994f9b860c67",
"metadata": {},
"source": [
"## How does changing the station spacing and the number of frequencies impact the recovered model?"
]
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 25,
"id": "168aad96",
"metadata": {
"iooxa": {
Expand All @@ -118,41 +126,21 @@
"output_type": "stream",
"text": [
"\n",
" TensorMesh: 4,012 cells\n",
" TensorMesh: 1,088 cells\n",
"\n",
" MESH EXTENT CELL WIDTH FACTOR\n",
" dir nC min max min max max\n",
" --- --- --------------------------- ------------------ ------\n",
" x 118 -162,330.08 162,330.08 1,000.00 38,443.36 1.50\n",
" x 32 -205,859.38 205,859.38 5,000.00 56,953.12 1.50\n",
" y 34 -260,778.01 5,242.03 265.00 43,683.84 1.50\n",
"\n",
"\n",
"Rx\n",
"[[-50000. 0.]\n",
" [-46000. 0.]\n",
" [-42000. 0.]\n",
" [-38000. 0.]\n",
" [-34000. 0.]\n",
" [-30000. 0.]\n",
" [-26000. 0.]\n",
" [-22000. 0.]\n",
" [-18000. 0.]\n",
" [-14000. 0.]\n",
" [-10000. 0.]\n",
" [ -6000. 0.]\n",
" [ -2000. 0.]\n",
" [ 2000. 0.]\n",
" [ 6000. 0.]\n",
" [ 10000. 0.]\n",
" [ 14000. 0.]\n",
" [ 18000. 0.]\n",
" [ 22000. 0.]\n",
" [ 26000. 0.]\n",
" [ 30000. 0.]\n",
" [ 34000. 0.]\n",
" [ 38000. 0.]\n",
" [ 42000. 0.]\n",
" [ 46000. 0.]\n",
" [ 50000. 0.]]\n",
"Freqs\n",
"[1.00000000e-02 1.12883789e-01 1.27427499e+00 1.43844989e+01]\n"
Expand Down Expand Up @@ -201,7 +189,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 26,
"id": "a21d3b29",
"metadata": {
"iooxa": {
Expand Down Expand Up @@ -260,7 +248,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 27,
"id": "0025b53a",
"metadata": {},
"outputs": [],
Expand All @@ -274,7 +262,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 28,
"id": "86aec87c",
"metadata": {},
"outputs": [],
Expand All @@ -284,7 +272,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 29,
"id": "bf7ccccb",
"metadata": {
"iooxa": {
Expand All @@ -306,7 +294,7 @@
"output_type": "stream",
"text": [
"\n",
"Running inversion with SimPEG v0.22.2.dev6+g67b3e9f1c\n",
"Running inversion with SimPEG v0.22.2\n",
"\n",
" simpeg.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.\n",
" ***Done using same Solver, and solver_opts as the Simulation2DMagneticField problem***\n",
Expand All @@ -316,25 +304,21 @@
" # beta phi_d phi_m f |proj(x-g)-x| LS Comment \n",
"-----------------------------------------------------------------------------\n",
"x0 has any nan: 0\n",
" 0 1.59e+02 1.22e+06 0.00e+00 1.22e+06 1.56e+05 0 \n",
" 1 7.94e+01 1.72e+05 1.41e+00 1.72e+05 2.37e+04 0 \n",
" 2 3.97e+01 3.44e+04 2.67e+01 3.55e+04 5.09e+03 0 Skip BFGS \n",
" 3 1.98e+01 6.55e+03 6.10e+01 7.76e+03 1.11e+03 0 Skip BFGS \n",
" 4 9.92e+00 2.37e+03 8.48e+01 3.21e+03 2.29e+02 0 \n",
" 5 4.96e+00 1.25e+03 1.19e+02 1.84e+03 1.03e+02 0 \n",
" 6 2.48e+00 7.53e+02 1.64e+02 1.16e+03 7.30e+01 0 Skip BFGS \n",
" 7 1.24e+00 5.51e+02 2.06e+02 8.07e+02 6.34e+01 0 Skip BFGS \n",
" 8 6.20e-01 4.45e+02 2.48e+02 5.98e+02 4.03e+01 0 Skip BFGS \n",
" 9 3.10e-01 4.16e+02 2.68e+02 4.99e+02 3.63e+01 0 \n",
" 0 2.91e+00 1.31e+05 0.00e+00 1.31e+05 1.90e+04 0 \n",
" 1 1.45e+00 1.81e+04 6.40e+00 1.81e+04 3.19e+03 0 \n",
" 2 7.27e-01 2.66e+03 3.24e+01 2.68e+03 5.16e+02 0 Skip BFGS \n",
" 3 3.64e-01 5.34e+02 1.24e+02 5.79e+02 1.50e+02 0 \n",
" 4 1.82e-01 2.49e+02 1.66e+02 2.79e+02 2.01e+02 0 \n",
" 5 9.09e-02 1.04e+02 1.79e+02 1.20e+02 8.81e+01 0 \n",
"------------------------- STOP! -------------------------\n",
"1 : |fc-fOld| = 0.0000e+00 <= tolF*(1+|f0|) = 1.2219e+05\n",
"0 : |xc-x_last| = 3.3759e+00 <= tolX*(1+|x0|) = 2.7039e-28\n",
"0 : |proj(x-g)-x| = 3.6256e+01 <= tolG = 1.0000e-01\n",
"0 : |proj(x-g)-x| = 3.6256e+01 <= 1e3*eps = 1.0000e-02\n",
"0 : maxIter = 30 <= iter = 10\n",
"1 : |fc-fOld| = 0.0000e+00 <= tolF*(1+|f0|) = 1.3100e+04\n",
"0 : |xc-x_last| = 3.2308e+00 <= tolX*(1+|x0|) = 1.4129e-28\n",
"0 : |proj(x-g)-x| = 8.8091e+01 <= tolG = 1.0000e-01\n",
"0 : |proj(x-g)-x| = 8.8091e+01 <= 1e3*eps = 1.0000e-02\n",
"0 : maxIter = 30 <= iter = 6\n",
"------------------------- DONE! -------------------------\n",
"CPU times: user 5min 48s, sys: 39.3 s, total: 6min 27s\n",
"Wall time: 43.1 s\n"
"CPU times: user 2min 34s, sys: 8.52 s, total: 2min 43s\n",
"Wall time: 52.9 s\n"
]
}
],
Expand Down Expand Up @@ -426,17 +410,17 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 30,
"id": "0075e60e-6d40-4c2c-8a87-b0e3b75cce01",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"416"
"96"
]
},
"execution_count": 16,
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -447,7 +431,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 31,
"id": "61460e61",
"metadata": {},
"outputs": [],
Expand All @@ -467,7 +451,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 32,
"id": "f15772bf",
"metadata": {},
"outputs": [],
Expand All @@ -492,19 +476,19 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 33,
"id": "edcc7a0b",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0b4f87c5521e4ff0a407da75f797f8be",
"model_id": "69e905dfbe1f47b9968ccd05a6a905a2",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"interactive(children=(IntSlider(value=10, description='iteration', max=10, min=1), RadioButtons(description='s"
"interactive(children=(IntSlider(value=6, description='iteration', max=6, min=1), RadioButtons(description='sca"
]
},
"metadata": {},
Expand All @@ -522,7 +506,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 34,
"id": "96321432",
"metadata": {},
"outputs": [],
Expand All @@ -536,7 +520,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 35,
"id": "5d342691",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -573,19 +557,19 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 36,
"id": "1b7cc244",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "49cf28b4e1294cbf914d647166f63f09",
"model_id": "253cae3476e1427d9633a085d450c999",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"interactive(children=(IntSlider(value=10, description='iteration', max=10, min=1), Output()), _dom_classes=('w"
"interactive(children=(IntSlider(value=6, description='iteration', max=6, min=1), Output()), _dom_classes=('wid"
]
},
"metadata": {},
Expand All @@ -601,7 +585,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 20,
"id": "07c67555",
"metadata": {},
"outputs": [],
Expand All @@ -612,7 +596,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 21,
"id": "46301f08",
"metadata": {},
"outputs": [],
Expand All @@ -623,7 +607,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 22,
"id": "794519b9",
"metadata": {},
"outputs": [],
Expand All @@ -649,7 +633,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 23,
"id": "9fb3b538",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -681,14 +665,14 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 24,
"id": "20fb9d8a",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2b966229f9a6405f916e6e7bf34815e3",
"model_id": "df9857dec47b458384dff18b755dc773",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -706,6 +690,14 @@
" irx=widgets.IntSlider(min=0, max=int(n_rx)-1, value=0),\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "19665d31-120e-4e1c-9328-9f03d0675e90",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -731,7 +723,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.12.7"
}
},
"nbformat": 4,
Expand Down
127 changes: 55 additions & 72 deletions notebooks/simpeg/7a_2d_inversion_yellowstone.ipynb

Large diffs are not rendered by default.

246 changes: 52 additions & 194 deletions notebooks/simpeg/8_3d_inversion_synthetic_meta.ipynb

Large diffs are not rendered by default.

0 comments on commit 4d90fe0

Please sign in to comment.