AAGRIP
AAGRIP
The project
on décrit le projet ici ?
grandes questions :
- comment on assure synchro entre image et son d'une vidéo ?
- qu'est ce qui affecte le signal de nos capteurs de force dans notre setup ? Comment on le corrige au mieux ?
- Est ce que les latences observées pour l'affichage des stimuli n'affectent pas nos données ?
Materials or Hardware
Acquisition Cards
NI acquisition cards -> drivers only available on Windows and not on Linux
Screen
Check the refresh rate of the screen used. The refresh rate may be less than advertised if you don't use a display port cable.
Operating systems usually have a software permanently running to handle the display of the screen. This software can disturb experiment framework to ensure the vertical synchronisation of the screen. On Windows, this software, the Desktop Windows Manager (DWM), prevent the Psychtoolbox to guarantee the constant vertical frame rate of the screen.
F/T Sensors
Power supply of the computer affects the quality of the signal collected with f/t sensors
Arduino
Troubleshootings
Software
Experiment frameworks
Framework available to build experiment : Psychopy, Psychtoolbox, OpenSesame
Psychopy and OpenSesame rely on Python unlike Psychtoolbox which relies on Matlab.
We chose Psychopy for our project because the package already offers some interesting functionalities such as stimuli pre-loading, interval between frames recording, time blocked until the screen is fully displayed, ... Besides, as it relies on Python, it's easier to custom our script to add hardware and/or LSL trigger.
Stimuli pre-loading is handled with the static component in the builder interface of psychopy and it allows us to avoid the delay between the start of the trial and the launch of the stimulus which will depends on the kind and the size of the stimuls.
Psychopy experiment can be launched by command line if you execute the python file in the psychopy installation folder. Create a python virtual environment with the psychoy package doesn't seems to work to launch experiment in it.
Psychopy have 4 different back-ends to handle video files : ffpyplayer, moviepy, opencv, vlc
- ffpyplayer : bug if there is no sound file or if it's corrupted
- moviepy : lot of errors
- opencv : works even without audio file but if we use the static component to preload the video, the audio part launchs briefly at the preload time.
- vlc : error during the initialisation, it may need additionnal package
(Psychopy seems to keep a lot of things in RAM when you run an experiment multiple times so it may be better to restart it regularly)
You can create your experiment from the builder and generate the python file associated after this. If you want to edit this file to add code not supported by the builder, keep in mind that every time you refresh the python file from the builder, it will erase the modifications made in the file.
Loop element in the builder is transcribed in TrialHandler object in code (you won't find any doc on loop element but you can seek for TrialHandler to know more about options and properties).
It's possible to retrieve the frame index of a movie component which is playing. It may not be useful to detect frame drop because it will always give an answer so it may be a parallel processus which look the frame index at a specific interval.
LSL
-> à intégrer à l'expérience
Troubleshootings
<ref>Une référence [1] </ref> <references />