-
Couldn't load subscription status.
- Fork 1
[ENH] Add magnetic forward modeling for Total Magnetic Intensity (TMI) calculation #39
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
Merged
Conversation
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
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Introduce new test cases to validate the forthcoming magnetics implementation: - Add analytical benchmark test comparing induced-only TMI against analytical solutions for a spherical anomaly. - Add symmetry benchmark test to verify induced-only TMI spatial accuracy along a line profile. Also include a placeholder magnetics gradient computation module (`magnetic_gradient.py`) with core physics for initial testing.
Introduce functionality for induced-only TMI anomaly computation using precomputed voxel-based TMI kernels and geologic unit susceptibilities. Updates include: - `compute_tmi`: Core TMI calculation logic based on magnetics kernel and voxel susceptibilities in `fw_magnetic.py`. - Extended `GeophysicsInput` to include magnetics-specific fields such as `mag_kernel`, `susceptibilities`, and `igrf_params`. - Modified `model_api.py` to integrate magnetics into geophysics workflows alongside gravity computations. - Updated `solutions.py` to include magnetics in forward modeling outputs. Ensures magnetics functionality remains optional without impacting gravity workflows.
- Updated `model_api.py` to make gravity computations conditional, enabling workflows without gravity inputs. - Modified `GeophysicsInput` to allow `tz` and `densities` as optional fields for magnetics-only workflows. - Added `tmi` alias property in `solutions.py` for Total Magnetic Intensity outputs. - Improved formatting in geophysics README for better readability.
…hts, unit handling, and output sign - Adjust `observation_heights` for improved test consistency. - Fix `units_nT` parameter to ensure correct unit handling in TMI computation. - Correct output sign for numerical TMI results to align with analytical expectations.
- Introduced parametrized cases for directional cosines, path equivalence, and kernel decay. - Added edge case tests for zero and negative susceptibilities. - Validated kernel symmetry and kernel reusability with different IGRF configurations. - Enhanced `CenteredGrid` with methods for voxel calculations.
…s and symmetry checks - Adjust grid dimensions to account for resolution changes and ensure shape consistency. - Add assertions for expected voxel counts to validate kernel reshaping. - Update symmetry check orientation from slices to a more accurate coordinate axis.
…lidation - Refined `test_kernel_decay_with_distance` to enhance clarity and correctness of magnetic anomaly decay behavior. - Updated grid scaling and observation point handling for better volume coverage. - Adjust
…edge cases and symmetry validation - Introduced new test file `test_magnetic_benchmark_II.py` covering multiple scenarios: - Symmetry checks for TMI profiles. - Edge cases for zero and negative susceptibilities. - Observation distance decay validation. - Kernel property tests for symmetry and resolution. - Enhanced and streamlined existing tests in `test_magnetic_benchmark.py`: - Adjusted formatting for clearer readability. - Updated comments and formulas for analytical benchmarks to improve documentation consistency.
04bd7db to
60c5121
Compare
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.

Add magnetics (TMI) forward modeling to geophysics workflows
Introduce functionality for induced-only TMI anomaly computation using precomputed voxel-based TMI kernels and geologic unit susceptibilities. Updates include:
compute_tmi: Core TMI calculation logic based on magnetics kernel and voxel susceptibilities infw_magnetic.py.GeophysicsInputto include magnetics-specific fields such asmag_kernel,susceptibilities, andigrf_params.model_api.pyto integrate magnetics into geophysics workflows alongside gravity computations.solutions.pyto include magnetics in forward modeling outputs.Ensures magnetics functionality remains optional without impacting gravity workflows.
Additional changes
model_api.pyto make gravity computations conditional, enabling workflows without gravity inputs.GeophysicsInputto allowtzanddensitiesas optional fields for magnetics-only workflows.tmialias property insolutions.pyfor Total Magnetic Intensity outputs.