Skip to content

GEOPY-2883: Remove dependency on Tx frequency for airborne FEM survey#416

Open
domfournier wants to merge 6 commits into
release/GA_4.8from
GEOPY-2883
Open

GEOPY-2883: Remove dependency on Tx frequency for airborne FEM survey#416
domfournier wants to merge 6 commits into
release/GA_4.8from
GEOPY-2883

Conversation

@domfournier
Copy link
Copy Markdown
Collaborator

@domfournier domfournier commented May 25, 2026

GEOPY-2883 - Remove dependency on Tx frequency for airborne FEM survey

Copilot AI review requested due to automatic review settings May 25, 2026 19:38
@github-actions github-actions Bot changed the title GEOPY-2883 GEOPY-2883: Remove dependency on Tx frequency for airborne FEM survey May 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the FDEM/Airborne FEM pipeline to stop relying on a per-transmitter “Tx frequency” data channel, shifting channel-dependent logic to positional (channel-index) lists derived from survey metadata and channel order.

Changes:

  • Replace frequency-keyed mappings with channel-indexed lists for offsets/coaxial flags, observed data, uncertainties, and normalizations.
  • Update survey construction and directive output assembly to consume the new list-based channel layout.
  • Refresh dependency pins and conda lockfiles to use a SimPEG revision that includes the GEOPY-2883 changes.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
simpeg_drivers/options.py Switch component data/uncertainty access to list-based (channel-indexed) structures.
simpeg_drivers/electromagnetics/frequency_domain/options.py Return tx_offsets/coaxial as positional lists derived from metadata configs.
simpeg_drivers/electromagnetics/base_1d_driver.py Remove reliance on mask for tiling size; use location count.
simpeg_drivers/components/locations.py Remove mask/filtering machinery from location handling.
simpeg_drivers/components/factories/survey_factory.py Update FEM argument assembly and stacking to use list-based channel data.
simpeg_drivers/components/factories/entity_factory.py Stop applying inversion-data masks during entity copy.
simpeg_drivers/components/factories/directives_factory.py Update normalization/data reshaping logic to use channel indices.
simpeg_drivers/components/data.py Remove masking/filtering; change normalizations and IO to channel-indexed lists.
pyproject.toml Point mira-simpeg dependency to the GEOPY-2883 revision.
py-3.13.conda-lock.yml Regenerate conda lock for updated dependency set.
environments/py-3.13-win-64.conda.lock.yml Regenerate platform lock for updated dependency set.
environments/py-3.13-win-64-dev.conda.lock.yml Regenerate dev platform lock for updated dependency set.
environments/py-3.13-linux-64.conda.lock.yml Regenerate platform lock for updated dependency set.
environments/py-3.13-linux-64-dev.conda.lock.yml Regenerate dev platform lock for updated dependency set.
environments/py-3.12-win-64.conda.lock.yml Regenerate platform lock for updated dependency set.
environments/py-3.12-win-64-dev.conda.lock.yml Regenerate dev platform lock for updated dependency set.
environments/py-3.12-linux-64.conda.lock.yml Regenerate platform lock for updated dependency set.
environments/py-3.12-linux-64-dev.conda.lock.yml Regenerate dev platform lock for updated dependency set.
Comments suppressed due to low confidence (2)

simpeg_drivers/electromagnetics/frequency_domain/options.py:65

  • tx_offsets now returns a positional list, and downstream code indexes it by channel index. To prevent hard-to-debug IndexError/misalignment, this accessor should validate that the frequency configuration list length matches len(self.data_object.channels) (or whatever channel count is used) and raise a clear error if not. Also, the error message currently says "dictionary" even though the metadata is a list of config dicts.
        try:
            configs = self.data_object.metadata["EM Dataset"][
                "Frequency configurations"
            ]
            tx_offsets = [k["Offset"] for k in configs]

        except KeyError as exception:
            msg = "Metadata must contain 'Frequency configurations' dictionary with 'Offset' key."
            raise GeoAppsError(msg) from exception

simpeg_drivers/electromagnetics/frequency_domain/options.py:81

  • Same concern for coaxial: it now returns a positional list indexed by channel index, but there is no validation that the frequency configuration length matches the channel count. Add a length check and raise a clear error; also consider updating the KeyError message text (it mentions a "dictionary" but the configs are a list of dicts).
        try:
            configs = self.data_object.metadata["EM Dataset"][
                "Frequency configurations"
            ]
            coaxial = [k["Coaxial data"] for k in configs]

        except KeyError as exception:
            msg = "Metadata must contain 'Frequency configurations' dictionary with 'Coaxial data' key."
            raise GeoAppsError(msg) from exception

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread simpeg_drivers/options.py Outdated
Comment thread simpeg_drivers/options.py
Comment thread simpeg_drivers/components/locations.py
Comment thread simpeg_drivers/components/data.py
Comment thread pyproject.toml

#mira-simpeg = {version = ">=0.23.0.2, 0.23.0.* || >=0.25.0.1a, 0.25.0.*", source="pypi", allow-prereleases = true, extras = ["dask"]}
mira-simpeg = {git = "https://github.com/MiraGeoscience/simpeg.git", rev = "release/GA_4.8", extras = ["dask"]}
mira-simpeg = {git = "https://github.com/MiraGeoscience/simpeg.git", rev = "GEOPY-2883", extras = ["dask"]}
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 97.91667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.61%. Comparing base (42b7155) to head (c15c246).

Files with missing lines Patch % Lines
simpeg_drivers/components/data.py 96.42% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           release/GA_4.8     #416      +/-   ##
==================================================
+ Coverage           90.43%   90.61%   +0.17%     
==================================================
  Files                 110      110              
  Lines                6535     6479      -56     
  Branches              827      811      -16     
==================================================
- Hits                 5910     5871      -39     
+ Misses                413      402      -11     
+ Partials              212      206       -6     
Files with missing lines Coverage Δ
...drivers/components/factories/directives_factory.py 95.49% <100.00%> (ø)
...peg_drivers/components/factories/entity_factory.py 78.26% <ø> (+6.26%) ⬆️
...peg_drivers/components/factories/survey_factory.py 94.92% <100.00%> (-0.03%) ⬇️
simpeg_drivers/components/locations.py 79.31% <ø> (-5.77%) ⬇️
simpeg_drivers/electromagnetics/base_1d_driver.py 89.06% <100.00%> (ø)
...ivers/electromagnetics/frequency_domain/options.py 90.14% <100.00%> (ø)
simpeg_drivers/options.py 96.01% <100.00%> (+0.67%) ⬆️
simpeg_drivers/components/data.py 95.60% <96.42%> (+2.44%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants