Open
Conversation
…s. Update uijson and options.
There was a problem hiding this comment.
Pull request overview
Adds support for specifying receiver orientation (via PropertyGroup) across EM drivers, updates synthetics generation to support rotated surveys and optional plate-based mesh refinement, and introduces new integration tests to validate orientation handling.
Changes:
- Add
receivers_orientationsupport to FDEM/TDEM/Tipper options and expose it in corresponding UI JSONs (plus additional FDEM component channel UI fields). - Update synthetics survey generation to support rotation and improve FDEM transmitter offset computation.
- Add integration tests for oriented FEM/TEM receivers and add optional octree refinement around a plate model.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/run_tests/oriented_fem_receiver_test.py | New run-test for FEM forward runs with varying receiver orientations. |
| tests/run_tests/oriented_airborne_tem_receiver_test.py | New run-test for airborne TEM forward runs with varying receiver orientations. |
| simpeg_drivers/utils/synthetics/surveys/frequency_domain/fdem.py | Change transmitter offset computation to follow local line direction. |
| simpeg_drivers/utils/synthetics/surveys/factory.py | Add survey rotation support in synthetic grid generation. |
| simpeg_drivers/utils/synthetics/options.py | Add rotation to SurveyOptions and refine_plate to synthetics options. |
| simpeg_drivers/utils/synthetics/meshes/octrees.py | Add optional octree refinement around a plate model. |
| simpeg_drivers/utils/synthetics/meshes/factory.py | Thread plate refinement option through mesh factory. |
| simpeg_drivers/utils/synthetics/driver.py | Pass plate model into mesh factory when refine_plate is enabled. |
| simpeg_drivers/natural_sources/tipper/options.py | Add receivers_orientation to tipper forward/inversion options. |
| simpeg_drivers/electromagnetics/time_domain/options.py | Add receivers_orientation to TDEM forward/inversion options. |
| simpeg_drivers/electromagnetics/frequency_domain_1d/options.py | Refactor FEM-1D options inheritance and required fields. |
| simpeg_drivers/electromagnetics/frequency_domain/options.py | Add orientation and x/y component toggles/channels to FDEM options. |
| simpeg_drivers/components/factories/survey_factory.py | Plumb local receiver indices into receiver factory builds. |
| simpeg_drivers/components/factories/receiver_factory.py | Compute/override receiver orientations from a provided PropertyGroup. |
| simpeg_drivers-assets/uijson/tipper_inversion.ui.json | Add UI field for receiver orientation selection. |
| simpeg_drivers-assets/uijson/tipper_forward.ui.json | Add UI field for receiver orientation selection. |
| simpeg_drivers-assets/uijson/tdem_inversion.ui.json | Add receiver orientation UI field + explanatory tooltip. |
| simpeg_drivers-assets/uijson/tdem_forward.ui.json | Add receiver orientation UI field + explanatory tooltip. |
| simpeg_drivers-assets/uijson/fdem_inversion.ui.json | Add receiver orientation + x/y channels and updated labels/tooltips. |
| simpeg_drivers-assets/uijson/fdem_forward.ui.json | Add receiver orientation + x/y component toggles and updated labels/tooltips. |
Comments suppressed due to low confidence (1)
simpeg_drivers/electromagnetics/frequency_domain_1d/options.py:79
directivesis defined twice inFDEM1DInversionOptions; this second definition overrides the earlier one (includingsens_wts_threshold=100.0). Remove the duplicate and keep the intended defaults in a singledirectivesfield.
directives: DirectiveOptions = DirectiveOptions()
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| MovingLoopGroundFEMReceivers, | ||
| ) | ||
| from pydantic import field_validator | ||
| from pydantic import AliasChoices, Field, field_validator |
Comment on lines
+37
to
+41
| delta = np.diff(vertices, axis=0) | ||
| delta /= np.linalg.norm(delta, axis=1)[:, None] | ||
| delta = np.vstack([delta, delta[-1, :]]) # Repeat last offset | ||
|
|
||
| tx_vertices = vertices - delta * config["Offset"] |
Comment on lines
+37
to
+41
| delta = np.diff(vertices, axis=0) | ||
| delta /= np.linalg.norm(delta, axis=1)[:, None] | ||
| delta = np.vstack([delta, delta[-1, :]]) # Repeat last offset | ||
|
|
||
| tx_vertices = vertices - delta * config["Offset"] |
Comment on lines
+118
to
+122
| params = FDEMForwardOptions.build( | ||
| geoh5=geoh5, | ||
| title="Forward: Azimuth {azimuth}, Dip {dip}", | ||
| mesh=components.mesh, | ||
| topography_object=components.topography, |
| "main": true, | ||
| "label": "z-imag component", | ||
| "label": "Vertical (imaginary)", | ||
| "tooltip": "Vertical (w) imaginary component of the magnetic data.\\Positive up along the z-axis if no receiver orientation provided", |
Comment on lines
+33
to
+37
| "Receivers orientation provided as 'Dip direction & dip' data group. If not provided, it is assumes: <dl>", | ||
| "<dt>In-line component</dt><dd>Positive towards North (Y).</dd>", | ||
| "<dt>Cross-line component</dt><dd>Positive towards East (X).</dd>", | ||
| "<dt>Vertical component</dt><dd>Positive up (Z).</dd>", | ||
| "</dl>" |
Comment on lines
+34
to
+38
| "Receivers orientation provided as 'Dip direction & dip' data group. If not provided, it is assumes: <dl>", | ||
| "<dt>In-line component</dt><dd>Positive towards North (Y).</dd>", | ||
| "<dt>Cross-line component</dt><dd>Positive towards East (X).</dd>", | ||
| "<dt>Vertical component</dt><dd>Positive up (Z).</dd>", | ||
| "</dl>" |
Comment on lines
+34
to
+38
| "Receivers orientation provided as 'Dip direction & dip' data group. If not provided, it is assumes: <dl>", | ||
| "<dt>In-line component</dt><dd>Positive towards North (Y).</dd>", | ||
| "<dt>Cross-line component</dt><dd>Positive towards East (X).</dd>", | ||
| "<dt>Vertical component</dt><dd>Positive up (Z).</dd>", | ||
| "</dl>" |
| kwargs["data_type"] = "ppm" | ||
|
|
||
| # Overload orientation if provided | ||
| if self.factory_type in ["tdem", "fdem"] and local_indices is not None: |
| survey: Points, | ||
| topography: Surface, | ||
| options: MeshOptions, | ||
| plate: PlateModel, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.