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

MRG: Suppress MaxShield warning in many places #1000

Merged
merged 1 commit into from
Apr 16, 2022

Conversation

hoechenberger
Copy link
Member

@hoechenberger hoechenberger commented Apr 16, 2022

When reading FIFF files that contain Neuromag data recorded with active shielding enabled, MNE-Python by default raises an exception unless allow_maxshield is specified. We used to set it to True in all applicable places. However, this would still issue a warning.

Setting it to 'yes' instead suppresses this warning.

Consequently, I've changed all but one occurance of allow_maxshield to 'yes' now. The only exception is in read_raw_bids(), where I believe it still makes sense to issue the warning. For all other places,
like write_raw_bids(), get_head_mri_trans() etc., the warning is gone now.

Merge checklist

Maintainer, please confirm the following before merging:

  • All comments resolved
  • This is not your own PR
  • All CIs are happy
  • PR title starts with [MRG]
  • whats_new.rst is updated
  • PR description includes phrase "closes <#issue-number>"

@hoechenberger hoechenberger changed the title Suppress MaxShiel warning in many places Suppress MaxShield warning in many places Apr 16, 2022
When reading FIFF files that contain Neuromag data recorded
with active shielding enabled, MNE-Python by default raises an
exception unless `allow_maxshield` is specified. We used to set
it to `True` in all applicable places. However, this would still
issue a warning.

Setting it to `'yes'` instead suppresses this warning.

Consequently, I've changed all but one occurance of `allow_maxshield`
to `'yes'` now. The only exception is in `read_raw_bids()`, where I
believe it still makes sense to issue the warning. For all other places,
like `write_raw_bids()`, `get_head_mri_trans()` etc., the warning is
gone now.
@hoechenberger hoechenberger marked this pull request as ready for review April 16, 2022 07:37
@hoechenberger hoechenberger changed the title Suppress MaxShield warning in many places MRG: Suppress MaxShield warning in many places Apr 16, 2022
@codecov
Copy link

codecov bot commented Apr 16, 2022

Codecov Report

Merging #1000 (a3348dc) into main (5d7e632) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1000   +/-   ##
=======================================
  Coverage   95.15%   95.15%           
=======================================
  Files          25       25           
  Lines        3776     3776           
=======================================
  Hits         3593     3593           
  Misses        183      183           
Impacted Files Coverage Δ
mne_bids/commands/mne_bids_raw_to_bids.py 94.59% <100.00%> (ø)
mne_bids/inspect.py 98.78% <100.00%> (ø)
mne_bids/path.py 97.67% <100.00%> (ø)
mne_bids/read.py 95.93% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d7e632...a3348dc. Read the comment docs.

@hoechenberger hoechenberger merged commit b9899bc into mne-tools:main Apr 16, 2022
@hoechenberger hoechenberger deleted the maxshield-warn branch April 16, 2022 07:50
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.

None yet

2 participants