Skip to content

Commit

Permalink
Add channel count test
Browse files Browse the repository at this point in the history
  • Loading branch information
caiw committed Mar 15, 2024
1 parent 14700ff commit cef0b24
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,3 +441,20 @@ def test_meg_correct_sensors(meg_sensors):
"MEG2643",
"MEG2641",
])


def test_eeg_left_right_medial_count(eeg_sensors):
from kymata.plot.plot import sensor_left_right_assignment
top_chans = set(sensor_left_right_assignment[0].axis_channels)
bottom_chans = set(sensor_left_right_assignment[1].axis_channels)
both_chans = top_chans & bottom_chans
top_chans -= both_chans
bottom_chans -= both_chans

top_eeg = [e for e in eeg_sensors if e in top_chans]
bottom_eeg = [e for e in eeg_sensors if e in bottom_chans]
both_eeg = [e for e in eeg_sensors if e in both_chans]

assert len(both_eeg) == 10
assert len(top_eeg) == 27
assert len(bottom_eeg) == 27

0 comments on commit cef0b24

Please sign in to comment.