This repository contains a modified version of the Attention Network Test (Fan et al., 2002) (mANT), implemented in Python.
The repository contains three subfolders:
task-only
contains code to run the mANT in a behaviour-only setting. See its own README for detailstask-and-eeg
contains code to run the mANT during electroencephalography (EEG). See its own README for details (in short, the code is the same as intask-only
, plus some lines to send 8-bit triggers to the EEG recording system)task-and-fmri
contains code to run the mANT during functional magnetic resonance imaging (fMRI). See its own README for details (in short, the code is the same as intask-only
, but the task timeline is different and there are commands to receive triggers from the fMRI scanner in form of simulated keypresses)mant-data-analysis
contains code to analyse and plot mANT data
All subfolders are independent of each other.
In principle, subfolders would not be necessary: the same code could be used for different experiments if it included a method to select experiment-specific settings (for example, conditional logic). However, separate implementations seemed to be the cleanest solution.
The code contained in the task subfolders (i.e., task-only
, task-and-eeg
, and task-and-fmri
) relies on the following software:
Language/Package | Versions tested on | Suggested installation |
---|---|---|
Python | 3.9.16, 3.9.18 | Miniconda |
PsychoPy | 2022.2.5, 2023.2.3, 2024.2.2 | Manual installation |
pandas | 1.5.3, 2.2.1 | conda install pandas |
While the code contained in mant-data-analysis
relies on:
Language/Package | Versions tested on | Suggested installation |
---|---|---|
Python | 3.9.16, 3.9.18, 3.11.8 | Miniconda |
NumPy | 1.24.3 | conda install numpy |
pandas | 1.5.3, 2.2.1 | conda install pandas |
Matplotlib | 3.8.0 | conda install -c conda-forge matplotlib |
seaborn | 0.13.2 | conda install seaborn -c conda-forge |
scipy | 1.12.0 | conda install scipy |
statsmodels | 0.14.4 | conda install -c conda-forge statsmodels |
- A good guide to Python installations (not specific to the mANT nor PsychoPy) is available at this HTTPS URL
- We had problems installing PsychoPy via
conda
, despite different machines with different operating systems and different levels of user expertise. We found it easier to install viapip
- If you will only use Python to run the mANT, the standalone PsychoPy version (SPV) is your best installation option (simply because it's the easiest). Visit PsychoPy's website for details. However, if you use (or are planning on using) Python beyond the mANT, we strongly discourage using the SPV because:
- It comes with its own Python installation, even if you already have one on your machine. This can get messy
- Its main advantage over other PsychoPy versions is a GUI, whose use we discourage (code is more flexible, transparent, and reproducible)
- It comes with its own Python code editor, which has a lot less features and provides a worse user experience than common, equally free alternatives like VSCode
- Add functions to compile
mant-conditions.csv
automatically - Refactor for higher elegance and efficiency (if/as needed)
- Add
requirements.txt
files
For questions or improvement suggestions, you can:
- Open an issue at - or send a pull request to - this repository
- Write
matteo [dot] dematola [at] unitn [dot] it
Matteo De Matola (UniTN | GitHub)
Last updated November 2024