Skip to content

Commit

Permalink
FIX: Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Jan 14, 2025
1 parent 7881c4c commit 6930206
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions mne/time_frequency/spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -1689,12 +1689,12 @@ def combine_spectrum(all_spectrum, weights="nave"):

ch_names = spectrum.ch_names
for s_ in all_spectrum[1:]:
assert (
s_.ch_names == ch_names
), f"{spectrum} and {s_} do not contain the same channels"
assert (
np.max(np.abs(s_.freqs - spectrum.freqs)) < 1e-7
), f"{spectrum} and {s_} do not contain the same frequencies"
assert s_.ch_names == ch_names, (
f"{spectrum} and {s_} do not contain the same channels"
)
assert np.max(np.abs(s_.freqs - spectrum.freqs)) < 1e-7, (
f"{spectrum} and {s_} do not contain the same frequencies"
)

# use union of bad channels
bads = list(
Expand Down
12 changes: 6 additions & 6 deletions mne/time_frequency/tfr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3959,12 +3959,12 @@ def combine_tfr(all_tfr, weights="nave"):

ch_names = tfr.ch_names
for t_ in all_tfr[1:]:
assert (
t_.ch_names == ch_names
), f"{tfr} and {t_} do not contain the same channels"
assert (
np.max(np.abs(t_.times - tfr.times)) < 1e-7
), f"{tfr} and {t_} do not contain the same time instants"
assert t_.ch_names == ch_names, (
f"{tfr} and {t_} do not contain the same channels"
)
assert np.max(np.abs(t_.times - tfr.times)) < 1e-7, (
f"{tfr} and {t_} do not contain the same time instants"
)

# use union of bad channels
bads = list(set(tfr.info["bads"]).union(*(t_.info["bads"] for t_ in all_tfr[1:])))
Expand Down

0 comments on commit 6930206

Please sign in to comment.