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

BUG: Spectrum should only warn on zero spectrum for non-bads #12075

Closed
larsoner opened this issue Oct 5, 2023 · 0 comments · Fixed by #12186
Closed

BUG: Spectrum should only warn on zero spectrum for non-bads #12075

larsoner opened this issue Oct 5, 2023 · 0 comments · Fixed by #12186
Milestone

Comments

@larsoner
Copy link
Member

larsoner commented Oct 5, 2023

CircleCI just hit this:

/home/circleci/project/tutorials/preprocessing/50_artifact_correction_ssp.py failed leaving traceback:
Traceback (most recent call last):
  File "/home/circleci/project/tutorials/preprocessing/50_artifact_correction_ssp.py", line 109, in <module>
    spectrum = empty_room_raw.compute_psd()
  File "<decorator-gen-292>", line 12, in compute_psd
  File "/home/circleci/project/mne/io/base.py", line 2181, in compute_psd
    return Spectrum(
  File "/home/circleci/project/mne/time_frequency/spectrum.py", line 1172, in __init__
    self._check_values()
  File "/home/circleci/project/mne/time_frequency/spectrum.py", line 454, in _check_values
    warn(f'Zero value in spectrum for channel{s} {", ".join(chs)}', UserWarning)
  File "/home/circleci/project/mne/utils/_logging.py", line 414, in warn
    warnings.warn_explicit(
UserWarning: Zero value in spectrum for channel MEG 2443

I am pretty sure this channel is marked as bad in the data. It seems like spectrum should perhaps not warn about zero or nan/inf values if a channel is bad.

If we go this route we can undo two verbose="error"s introduced in #12074

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 a pull request may close this issue.

1 participant