Qt/PyQt5 arithmetic difficulty study that sends LSL markers for each trigger.
- Create a virtual environment and install dependencies.
- Run the experiment from the
Arithmetic_Difficultydirectory so the question set is found.
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
cd Arithmetic_Difficulty
python mainExperiment.py- Python 3.9+
- OS: Windows (developed on Windows 11 Professional)
- PyQt5, pylsl, numpy (see
requirements.txt) - A GUI display server (X11/Wayland on Linux)
- An LSL recorder/receiver if you want to capture markers
- On some Linux setups,
pylslmay require a separateliblslinstall
- The experiment loads a pickled question set from a file named
GeneratedQuestionsin the current working directory. - To keep runs reproducible, run from
Arithmetic_Difficultyand useArithmetic_Difficulty/GeneratedQuestions. MakeQuestions.pyregenerates a question set using Python'srandommodule with no fixed seed. Use the bundledGeneratedQuestionsfile if you need identical stimuli.- The app does not write output files; all trial information is emitted as LSL string markers on the
arithmetic-Markersstream.
- H. B. G. Thomas (1963), Communication theory and the constellation hypothesis of calculation, Quarterly Journal of Experimental Psychology, 15:3, 173-191. DOI: 10.1080/17470216308416323
cd Arithmetic_Difficulty
python MakeQuestions.pyThis example targets Linux hosts with an X11 server. You may need an X server or WSLg on Windows/macOS.
docker build -t qt-arithmetic .
xhost +local:docker
docker run --rm -it --network host \
-e DISPLAY=$DISPLAY \
-e QT_X11_NO_MITSHM=1 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
qt-arithmeticSee CITATION.cff for citation metadata. Update it with a DOI after creating the Zenodo record.