mne-tools / mne-realtime

Realtime data analysis with MNE-Python
https://mne.tools/mne-realtime/
BSD 3-Clause "New" or "Revised" License
52 stars 23 forks source link

channel type needs to be lower case for MNE info #30

Closed timonmerk closed 3 years ago

timonmerk commented 3 years ago

Otherwise a Key Error will be thrown:

Traceback (most recent call last):

File "c:\users\icn_admin\documents\code_sprint\mne-realtime\examples\openbci_test.py", line 21, in with LSLClient(host="openbci_eeg_id127", wait_max=wait_max) as client:

File "c:\users\icn_admin\documents\code_sprint\mne-realtime\mne_realtime\base_client.py", line 79, in enter self.info = self._create_info()

File "c:\users\icn_admin\documents\code_sprint\mne-realtime\mne_realtime\lsl_client.py", line 127, in _create_info info = create_info(ch_names, sfreq, ch_types)

File "", line 24, in create_info

File "C:\Users\ICN_admin\Anaconda3\envs\MNERealTime\lib\site-packages\mne\io\meas_info.py", line 2053, in create_info raise KeyError(f'kind must be one of {list(ch_types_dict)}, '

KeyError: "kind must be one of ['grad', 'mag', 'ref_meg', 'eeg', 'seeg', 'dbs', 'ecog', 'eog', 'emg', 'ecg', 'resp', 'bio', 'misc', 'stim', 'exci', 'syst', 'ias', 'gof', 'dipole', 'chpi', 'fnirs_cw_amplitude', 'fnirs_fd_ac_amplitude', 'fnirs_fd_phase', 'fnirs_od', 'hbo', 'hbr', 'csd'], not EEG"

teonbrooks commented 3 years ago

@timonmerk thanks for the fix. I'm actually going to merge the fix found in #17 if that's ok.