Skip to content

Commit

Permalink
Fix some cross-references in notebooks (#39)
Browse files Browse the repository at this point in the history
Replace `myst:` prefix for `xref:`. Solve wrong cross-references that
were still using `SimPEG` instead of `simpeg`, and some minor typos.
  • Loading branch information
santisoler authored Nov 19, 2024
1 parent 4febfcf commit 291f8a1
Show file tree
Hide file tree
Showing 24 changed files with 433 additions and 433 deletions.
28 changes: 14 additions & 14 deletions notebooks/03-gravity/fwd_gravity_anomaly_3d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"\n",
"</br>\n",
"\n",
"**Summary:** Here we use the module [simpeg.potential_fields.gravity](myst:simpeg#simpeg.potential_fields.gravity) to simulate gravity anomaly data for a synthetic density contrast model. We use the [3D integral formulation](myst:simpeg#simpeg.potential_fields.gravity.Simulation3DIntegral) and carry out the forward simulation on a tensor mesh.\n",
"**Summary:** Here we use the module [simpeg.potential_fields.gravity](xref:simpeg#simpeg.potential_fields.gravity) to simulate gravity anomaly data for a synthetic density contrast model. We use the [3D integral formulation](xref:simpeg#simpeg.potential_fields.gravity.Simulation3DIntegral) and carry out the forward simulation on a tensor mesh.\n",
"\n",
"</br>\n",
"\n",
Expand All @@ -59,7 +59,7 @@
"source": [
"## Import Modules\n",
"\n",
"Here, we import all of the functionality required to run the notebook for the tutorial exercise. All of the functionality specific to simulating gravity data are imported from [simpeg.potential_fields.gravity](myst:simpeg#simpeg.potential_fields.gravity). We also import some useful utility functions from [simpeg.utils](myst:simpeg#simpeg.utils). To simulate gravity data, we need to define our problem geometry on a numerical grid (or mesh).\n",
"Here, we import all of the functionality required to run the notebook for the tutorial exercise. All of the functionality specific to simulating gravity data are imported from [simpeg.potential_fields.gravity](xref:simpeg#simpeg.potential_fields.gravity). We also import some useful utility functions from [simpeg.utils](xref:simpeg#simpeg.utils). To simulate gravity data, we need to define our problem geometry on a numerical grid (or mesh).\n",
"To generate the mesh, we used the [discretize](https://discretize.simpeg.xyz/en/main) package."
]
},
Expand Down Expand Up @@ -103,7 +103,7 @@
"source": [
"## Define the Topography\n",
"\n",
"Surface topography is defined as an (N, 3) [numpy.ndarray](myst:numpy#numpy.ndarray) for 3D simulations.\n",
"Surface topography is defined as an (N, 3) [numpy.ndarray](xref:numpy#numpy.ndarray) for 3D simulations.\n",
"Here, we create basic topography for the forward simulation.\n",
"For user-specific simulations, you may load topography from an XYZ file."
]
Expand Down Expand Up @@ -192,12 +192,12 @@
"\n",
"Surveys within SimPEG generally require the user to create and connect three types of objects:\n",
"\n",
"- [receivers](myst:simpeg#simpeg.potential_fields.gravity.receivers.Point): which define the locations of field measurements and type of data being measured.\n",
"- [sources](myst:simpeg#simpeg.potential_fields.gravity.sources.SourceField): the passive or active sources responsible for generating geophysical responses, and their associated receivers.\n",
"- [survey](myst:simpeg#simpeg.potential_fields.gravity.survey.Survey): the object which stores and organizes all of the sources and receivers.\n",
"- [receivers](xref:simpeg#simpeg.potential_fields.gravity.receivers.Point): which define the locations of field measurements and type of data being measured.\n",
"- [sources](xref:simpeg#simpeg.potential_fields.gravity.sources.SourceField): the passive or active sources responsible for generating geophysical responses, and their associated receivers.\n",
"- [survey](xref:simpeg#simpeg.potential_fields.gravity.survey.Survey): the object which stores and organizes all of the sources and receivers.\n",
"\n",
"Here, we define the survey that will be used for the forward simulation. Gravity\n",
"surveys are simple to create. The user only needs an (N, 3) [numpy.ndarray](myst:numpy#numpy.ndarray) to define\n",
"surveys are simple to create. The user only needs an (N, 3) [numpy.ndarray](xref:numpy#numpy.ndarray) to define\n",
"the xyz locations of the observation locations, and a list of field components\n",
"which are to be measured. For the tutorial simulation, the receivers are located 5 m\n",
"above the surface topography and spaced 10 m apart."
Expand Down Expand Up @@ -304,7 +304,7 @@
"## Design a (Tensor) Mesh\n",
"\n",
"Meshes are designed using the [discretize](https://discretize.simpeg.xyz/en/main) package. See the [discretize user tutorials](https://discretize.simpeg.xyz/en/main/tutorials/mesh_generation/index.html) to learn more about creating meshes.\n",
"Here, the forward simulation is computed for a [tensor mesh](myst:discretize#discretize.TensorMesh). If you wanted to generate a [tree mesh](myst:discretize#discretize.TreeMesh) instead, you can use the code snippet from the [3D Forward Simulation of Gravity Gradiometry Data](fwd_gravity_gradiometry_3d.ipynb) tutorial.\n",
"Here, the forward simulation is computed for a [tensor mesh](xref:discretize#discretize.TensorMesh). If you wanted to generate a [tree mesh](xref:discretize#discretize.TreeMesh) instead, you can use the code snippet from the [3D Forward Simulation of Gravity Gradiometry Data](fwd_gravity_gradiometry_3d.ipynb) tutorial.\n",
"\n",
"The integral formulation for gravity essentially sums the independent gravity anomaly contribution for every voxel cell in the mesh. Since the kernel function that computes the contribution for a single cell is an analytic solution, small cells are not required to accurately compute the contributions from coarse structures with constant density (e.g. a rectangular prism). For complex structures however, or to define surface topography more accurately, finer cells may be needed. Furthermore, cells do not need to be cubic.\n",
"\n",
Expand Down Expand Up @@ -385,7 +385,7 @@
"## Define the Active Cells\n",
"\n",
"Whereas cells below the Earth's surface contribute towards the simulated gravity anomaly, air cells do not.\n",
"The set of mesh cells used in the forward simulation are referred to as 'active cells'. Unused cells (air cells) are 'inactive cells'. Here, the discretize [active_from_xyz](myst:discretize#discretize.utils.active_from_xyz) utility function is used to find the indices of the active cells using the mesh and surface topography. The output quantity is a ``bool`` array."
"The set of mesh cells used in the forward simulation are referred to as 'active cells'. Unused cells (air cells) are 'inactive cells'. Here, the discretize [active_from_xyz](xref:discretize#discretize.utils.active_from_xyz) utility function is used to find the indices of the active cells using the mesh and surface topography. The output quantity is a ``bool`` array."
]
},
{
Expand All @@ -411,7 +411,7 @@
"source": [
"## Mapping from the Model to Active Cells\n",
"\n",
"In SimPEG, the term 'model' is not synonymous with the physical property values defined on the mesh. For example, the model may be defined as the logarithms of the physical property values, or be parameters defining a layered Earth. When simulating gravity anomaly data using the integral formulation, we must define a mapping from the set of model parameters to the active cells in the mesh. Mappings are created using the [simpeg.maps](myst:simpeg#simpeg.maps.IdentityMap) module. For the tutorial exercise, the model is the density contrast values for all active cells. As such, our mapping is an identity mapping, whose dimensions are equal to the number of active cells."
"In SimPEG, the term 'model' is not synonymous with the physical property values defined on the mesh. For example, the model may be defined as the logarithms of the physical property values, or be parameters defining a layered Earth. When simulating gravity anomaly data using the integral formulation, we must define a mapping from the set of model parameters to the active cells in the mesh. Mappings are created using the [simpeg.maps](xref:simpeg#simpeg.maps.IdentityMap) module. For the tutorial exercise, the model is the density contrast values for all active cells. As such, our mapping is an identity mapping, whose dimensions are equal to the number of active cells."
]
},
{
Expand Down Expand Up @@ -441,11 +441,11 @@
"\n",
"Here, we create the model that will be used to predict gravity anomaly data.\n",
"Recall that our model is the density constrast values for all active mesh cells.\n",
"So the model is a 1D [numpy.ndarray](myst:numpy#numpy.ndarray) whose length is\n",
"So the model is a 1D [numpy.ndarray](xref:numpy#numpy.ndarray) whose length is\n",
"equal to the number of model parameters.\n",
"**In SimPEG, density contrast values are defined in units of g/cc**.\n",
"Here, the model consists of a less dense block and a more dense sphere.\n",
"We plot the model using the [plot_slice](myst:discretize#discretize.TensorMesh.plot_slice) method."
"We plot the model using the [plot_slice](xref:discretize#discretize.TensorMesh.plot_slice) method."
]
},
{
Expand Down Expand Up @@ -578,7 +578,7 @@
"## Define the Forward Simulation\n",
"\n",
"In SimPEG, the physics of the forward simulation is defined by creating an instance of an appropriate simulation class.\n",
"In this case, we use the simulation class for the [3D integral formulation](myst:simpeg#simpeg.potential_fields.gravity.Simulation3DIntegral). To fully define the forward simulation, we need to connect the simulation object to:\n",
"In this case, we use the simulation class for the [3D integral formulation](xref:simpeg#simpeg.potential_fields.gravity.Simulation3DIntegral). To fully define the forward simulation, we need to connect the simulation object to:\n",
"\n",
"- the survey\n",
"- the mesh\n",
Expand Down Expand Up @@ -628,7 +628,7 @@
"source": [
"## Simulate Gravity Anomaly Data\n",
"\n",
"Once any simulation within SimPEG has been properly constructed, simulated data for a given model vector can be computed using the [dpred](myst:simpeg#simpeg.simulation.BaseSimulation.dpred) method. **SimPEG uses a right-handed coordinate system to simulate gravity anomaly data where Z is positive upward!!!** Please be aware of this when using gravity anomaly data to infer the locations of more and less dense structures. E.g. above a more dense block, a negative gravity anomaly is observed because gravity is stronger in the -ve Z direction. In SimPEG, gravity anomaly values are in **units mGal.**"
"Once any simulation within SimPEG has been properly constructed, simulated data for a given model vector can be computed using the [dpred](xref:simpeg#simpeg.simulation.BaseSimulation.dpred) method. **SimPEG uses a right-handed coordinate system to simulate gravity anomaly data where Z is positive upward!!!** Please be aware of this when using gravity anomaly data to infer the locations of more and less dense structures. E.g. above a more dense block, a negative gravity anomaly is observed because gravity is stronger in the -ve Z direction. In SimPEG, gravity anomaly values are in **units mGal.**"
]
},
{
Expand Down
Loading

0 comments on commit 291f8a1

Please sign in to comment.