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

Emotiv EPOC+ Real Time Data Processing in MNE Python #20

Closed Melvin555 closed 1 year ago

Melvin555 commented 5 years ago

Hello MNE developers, I have got an issue when I tried to have a real time reading using a commercial EEG brand, Emotiv. I have tried to tweak a bit the code from "Compute real-time evoked response with FieldTrip client" ->https://martinos.org/mne/stable/auto_examples/realtime/ftclient_rt_average.html, because I used to run FieldTrip buffer. But unfortunately, I ran into an error with the traceback: . . . FieldTripClient: Waiting for server to start FieldTripClient: Connected FieldTripClient: Retrieving header FieldTripClient: Header retrieved Info dictionary not provided. Trying to guess it from FieldTrip Header object

:2: RuntimeWarning: Info dictionary not provided. Trying to guess it from FieldTrip Header object tmax=150, wait_max=10) as rt_client: Traceback (most recent call last): File "", line 2, in tmax=150, wait_max=10) as rt_client: File "C:\ProgramData\Anaconda3\lib\site-packages\mne\realtime\fieldtrip_client.py", line 111, in __enter__ self.info = self._guess_measurement_info() File "C:\ProgramData\Anaconda3\lib\site-packages\mne\realtime\fieldtrip_client.py", line 159, in _guess_measurement_info int(re.findall(r'[^\W\d_]+|\d+', ch)[-1]) ValueError: invalid literal for int() with base 10: 'GYROX' . . . The latest suggestion after the discussions with some of the core developers: -> instead of using raw_info = rt_client.get_measurement_info(), try to create my own info using mne function create_info. And I am working on it now. Any other suggestion for solving this issue will be very welcome :)
jasmainak commented 5 years ago

Please let us know if the suggestions work for you. We should update documentation accordingly and maybe deprecate guess_meaurement_info

On Fri 25 Jan 2019 at 20:02, Melvin555 notifications@github.com wrote:

Hello MNE developers, I have got an issue when I tried to have a real time reading using a commercial EEG brand, Emotiv. I have tried to tweak a bit the code from "Compute real-time evoked response with FieldTrip client" -> https://martinos.org/mne/stable/auto_examples/realtime/ftclient_rt_average.html, because I used to run FieldTrip buffer. But unfortunately, I ran into an error with the traceback: . . . FieldTripClient: Waiting for server to start FieldTripClient: Connected FieldTripClient: Retrieving header FieldTripClient: Header retrieved Info dictionary not provided. Trying to guess it from FieldTrip Header object :2: RuntimeWarning: Info dictionary not provided. Trying to guess it from FieldTrip Header object tmax=150, wait_max=10) as rt_client: Traceback (most recent call last):

File "", line 2, in tmax=150, wait_max=10) as rt_client:

File "C:\ProgramData\Anaconda3\lib\site-packages\mne\realtime\fieldtrip_client.py", line 111, in enter self.info = self._guess_measurement_info()

File "C:\ProgramData\Anaconda3\lib\site-packages\mne\realtime\fieldtrip_client.py", line 159, in guess_measurement_info int(re.findall(r'[^\W\d]+|\d+', ch)[-1])

ValueError: invalid literal for int() with base 10: 'GYROX' . . .

The latest suggestion after the discussions with some of the core developers: -> instead of using raw_info = rt_client.get_measurement_info(), try to create my own info using mne function create_info. And I am working on it now. Any other suggestion for solving this issue will be very welcome :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mne-tools/mne-python/issues/5878, or mute the thread https://github.com/notifications/unsubscribe-auth/APHiohTZP5szpSoKgNG8ZXi6tYErbU0Rks5vG6kggaJpZM4aT5Z1 .

-- Sent from my iPhone

jasmainak commented 4 years ago

I had completely missed this. Thanks for transferring the issue @teonbrooks

@Melvin555 are you still interested in a solution to this? You will need to provide the info by reading in a small recording to the FieldTripClient object: https://mne.tools/mne-realtime/generated/mne_realtime.FieldTripClient.html#mne_realtime.FieldTripClient

Melvin555 commented 4 years ago

Hello Mainak Jas @jasmainak I think that time I moved on to use some other tools. Thank you for sending me this better documentation. It will be useful in my next project :)