Mobita + Eye Tracker + Psychopy
Posted: Thu Jan 21, 2016 10:30 am
Hi everyone,
I have a running PsychoPy implementation of a presentation while Eye Tracker data is collected (Tobii TX300). Now, I also want to add EEG to the setup (TMSi Mobita) and therefore thought about openVibe. What would you suggest how to combine all components to be able to synchronise them in the end?
1) The TMSi Mobita starts each recording at time 0, so I cannot use normal log files from two processes to synchronise. Is there a way to modify the openvibe part such that it uses system time for logging? Then I could merge it with the result from a separate thread running the PsychoPy part.
2) Then, I also thought I could simply put the PsychoPy code into a python box and send stimulations to the acquisition server on stimulus onset. However, PsychoPy does not run from within the box (altough it does outside openvibe). It seems that it cannot find wxPython. Do you know what could prevent a library from finding something within openvibe that it does find on its own?
3) Probably we could also use hardware triggers, but we would have to buy them first... I'm happy for any suggestion here that would get us to a software solution
Thanks!
Brina
edit: here are the log messages for the case when it fails to load wxPython although it is found if I execute the same script outside openvibe.
[ INF ] Initialization took 663 ms
[ INF ] Importing scenario...
[ INF ] Adding configuration file(s) [C:/Program Files (x86)/openvibe//share/openvibe/kernel/openvibe-delayed.conf]
[ INF ] Adding configuration file(s) [C:/Users/User/AppData/Roaming/openvibe/openvibe-delayed.conf]
[ INF ] Adding configuration file(s) [C:/Users/User/Documents/myfolder/openVibe/scenario.conf]
[ INF ] At time 0.000 sec <Box algorithm::(0x0000240d, 0x00005d44) aka Python scripting> Discovered Python is 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] (win32)
[ INF ] At time 0.000 sec <Box algorithm::(0x0000240d, 0x00005d44) aka Python scripting> Python Interpreter initialized
[ ERROR ] At time 0.000 sec <Box algorithm::(0x0000240d, 0x00005d44) aka Python scripting> Failed to run [C:/Users/User/Documents/myfolder/code/Experiment/psychoPyAnimation.py], result = -1
[ INF ] At time 0.000 sec <Box algorithm::(0x0000240d, 0x00005d44) aka Python scripting> executing script file
error
Traceback (most recent call last):
File "C:/Program Files (x86)/openvibe//share/openvibe/plugins/python/openvibe.py", line 30, in execfileHandlingException
execfile(filename, maindictionary)
File "C:/Users/User/Documents/myfolder/code/Experiment/psychoPyAnimation.py", line 6, in <module>
from psychopy import logging, monitors, core, event, gui
File "C:\Python27\lib\site-packages\psychopy-1.83.3-py2.7.egg\psychopy\gui.py", line 8, in <module>
import wx
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", line 45, in <module>
from wx._core import *
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 4, in <module>
import _core_
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
[translation to English: the module cannot be found.]
[WARNING] Box algorithm <Python scripting> has been deactivated because initialize() function returned error
I have a running PsychoPy implementation of a presentation while Eye Tracker data is collected (Tobii TX300). Now, I also want to add EEG to the setup (TMSi Mobita) and therefore thought about openVibe. What would you suggest how to combine all components to be able to synchronise them in the end?
1) The TMSi Mobita starts each recording at time 0, so I cannot use normal log files from two processes to synchronise. Is there a way to modify the openvibe part such that it uses system time for logging? Then I could merge it with the result from a separate thread running the PsychoPy part.
2) Then, I also thought I could simply put the PsychoPy code into a python box and send stimulations to the acquisition server on stimulus onset. However, PsychoPy does not run from within the box (altough it does outside openvibe). It seems that it cannot find wxPython. Do you know what could prevent a library from finding something within openvibe that it does find on its own?
3) Probably we could also use hardware triggers, but we would have to buy them first... I'm happy for any suggestion here that would get us to a software solution
Thanks!
Brina
edit: here are the log messages for the case when it fails to load wxPython although it is found if I execute the same script outside openvibe.
[ INF ] Initialization took 663 ms
[ INF ] Importing scenario...
[ INF ] Adding configuration file(s) [C:/Program Files (x86)/openvibe//share/openvibe/kernel/openvibe-delayed.conf]
[ INF ] Adding configuration file(s) [C:/Users/User/AppData/Roaming/openvibe/openvibe-delayed.conf]
[ INF ] Adding configuration file(s) [C:/Users/User/Documents/myfolder/openVibe/scenario.conf]
[ INF ] At time 0.000 sec <Box algorithm::(0x0000240d, 0x00005d44) aka Python scripting> Discovered Python is 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] (win32)
[ INF ] At time 0.000 sec <Box algorithm::(0x0000240d, 0x00005d44) aka Python scripting> Python Interpreter initialized
[ ERROR ] At time 0.000 sec <Box algorithm::(0x0000240d, 0x00005d44) aka Python scripting> Failed to run [C:/Users/User/Documents/myfolder/code/Experiment/psychoPyAnimation.py], result = -1
[ INF ] At time 0.000 sec <Box algorithm::(0x0000240d, 0x00005d44) aka Python scripting> executing script file
error
Traceback (most recent call last):
File "C:/Program Files (x86)/openvibe//share/openvibe/plugins/python/openvibe.py", line 30, in execfileHandlingException
execfile(filename, maindictionary)
File "C:/Users/User/Documents/myfolder/code/Experiment/psychoPyAnimation.py", line 6, in <module>
from psychopy import logging, monitors, core, event, gui
File "C:\Python27\lib\site-packages\psychopy-1.83.3-py2.7.egg\psychopy\gui.py", line 8, in <module>
import wx
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", line 45, in <module>
from wx._core import *
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 4, in <module>
import _core_
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
[translation to English: the module cannot be found.]
[WARNING] Box algorithm <Python scripting> has been deactivated because initialize() function returned error