This repository is dedicated to post-processing raw data from various cognitive performance tests within E-Prime, including the Psychomotor Vigilance Task (PVT), Digit Symbol Substitution Test (DSST), and Serial Addition tests. Utilizing Python, Pandas, and the Streamlit framework, it offers a suite of scripts designed for an intuitive user interface, allowing for the efficient transformation of unprocessed test outputs into structured CSV formats.
Each script within this suite is tailored to a specific cognitive test, and will combine "txt" files into a single "CSV" file for data analysis and research purposes.
CognitiveTestsProcessors.py
: Script that runs Streamlit application.
- PVT:
PVT_to_CombinedCSV.py
: Combines multiple PVT test outputs into a single CSV file.
- DSST:
DSST_to_CombinedCSV.py
: Combines multiple DSST test outputs into a single CSV file.
- Serial Addition Test:
serialAddition_to_CombinedCSV.py
: Combines multiple PVT test outputs into a single CSV file.
- Ensure Python 3 and pip are installed on your system. Additionally, the Python libraries Pandas and Streamlit are required.
- Clone the repository:
git clone https://github.com/caddickzac/CognitiveTestsProcessors.git
cd CognitiveTestsProcessors
Install required dependencies:
pip install pandas streamlit
Each of the processing scripts are designed to run within the main Streamlit app. To operate the app navigate to the main directory and run the following command in your command line:
streamlit run CognitiveTestsProcessors.py
Follow the on-screen instructions to upload your text files and download the processed data.
Input files for each cognitive test must be text (.txt) files.
- Create text document on desktop
- Enter code below, changing "[working directory]" to your local directory where the streamlit app is saved.
@echo off
REM set working directory
cd [working directory]
REM Activate the virtual environment
call venv/Scripts/activate
REM Run the Streamlit app using the Python installation in the virtual environment
streamlit run CognitiveTestsProcessors.py
REM Pause command to keep the terminal open after the script runs (optional)
pause
- Save and close text document.
- Change file type from ".txt" to ".bat"
- Now you can run the batch file as a shortcut icon and avoid having to enter any code in the command line!