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

Improve code style of notebooks #45

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions notebooks/03-gravity/fwd_gravity_anomaly_3d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
},
"outputs": [],
"source": [
"import os\n",
"\n",
"# SimPEG functionality\n",
"from simpeg.potential_fields import gravity\n",
"from simpeg.utils import plot2Ddata, model_builder\n",
Expand All @@ -89,11 +91,9 @@
"import numpy as np\n",
"from scipy.interpolate import LinearNDInterpolator\n",
"import matplotlib as mpl\n",
"\n",
"mpl.rcParams.update({\"font.size\": 14})\n",
"import matplotlib.pyplot as plt\n",
"import os\n",
"\n",
"mpl.rcParams.update({\"font.size\": 14})\n",
"save_output = False # Optional"
]
},
Expand Down
3 changes: 1 addition & 2 deletions notebooks/03-gravity/fwd_gravity_gradiometry_3d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,9 @@
"import numpy as np\n",
"from scipy.interpolate import LinearNDInterpolator\n",
"import matplotlib as mpl\n",
"\n",
"mpl.rcParams.update({\"font.size\": 14})\n",
"import matplotlib.pyplot as plt\n",
"\n",
"mpl.rcParams.update({\"font.size\": 14})\n",
"save_output = False # Optional"
]
},
Expand Down
6 changes: 3 additions & 3 deletions notebooks/04-magnetics/fwd_magnetics_induced_3d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
},
"outputs": [],
"source": [
"import os\n",
"\n",
"# SimPEG functionality\n",
"from simpeg.potential_fields import magnetics\n",
"from simpeg.utils import plot2Ddata, model_builder\n",
Expand All @@ -90,11 +92,9 @@
"import numpy as np\n",
"from scipy.interpolate import LinearNDInterpolator\n",
"import matplotlib as mpl\n",
"\n",
"mpl.rcParams.update({\"font.size\": 14})\n",
"import matplotlib.pyplot as plt\n",
"import os\n",
"\n",
"mpl.rcParams.update({\"font.size\": 14})\n",
"save_output = False # Optional"
]
},
Expand Down
3 changes: 1 addition & 2 deletions notebooks/04-magnetics/fwd_magnetics_mvi_3d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,9 @@
"from scipy.interpolate import LinearNDInterpolator\n",
"from scipy.constants import mu_0\n",
"import matplotlib as mpl\n",
"\n",
"mpl.rcParams.update({\"font.size\": 14})\n",
"import matplotlib.pyplot as plt\n",
"\n",
"mpl.rcParams.update({\"font.size\": 14})\n",
"save_output = False # Optional"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@
" covariance_type=\"diag\", # diagonal covariances\n",
")\n",
"# required: initialization with fit\n",
"# fake random samples, size of the mesh, number of physical properties: 2 (density and mag.susc)\n",
"# fake random samples, size of the mesh,\n",
"# number of physical properties: 2 (density and mag.susc)\n",
"rng = np.random.default_rng(seed=518936)\n",
"gmmref.fit(rng.normal(size=(nactv, 2)))\n",
"# set parameters manually\n",
Expand Down
Loading