Skip to content

This repository offers Python scripts for efficiently processing data from cognitive tests like PVT, DSST, and Serial Addition, utilizing Streamlit for streamlined batch processing. It converts raw outputs into structured CSVs for comprehensive and individual analyses.

Notifications You must be signed in to change notification settings

caddickzac/CognitiveTestsProcessors

Repository files navigation

Cognitive Performance Data Processing Suite

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.

Screenshot of Application

Application

Overview

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.

Main Streamlit Script

  • CognitiveTestsProcessors.py: Script that runs Streamlit application.

Processing Scripts

  • 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.

Installation

  1. Ensure Python 3 and pip are installed on your system. Additionally, the Python libraries Pandas and Streamlit are required.
  2. Clone the repository:
git clone https://github.com/caddickzac/CognitiveTestsProcessors.git
cd CognitiveTestsProcessors

Install required dependencies:

pip install pandas streamlit

Usage

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 File Format

Input files for each cognitive test must be text (.txt) files.

Create a batch file to run program

  1. Create text document on desktop
  2. 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
  1. Save and close text document.
  2. Change file type from ".txt" to ".bat"
  3. Now you can run the batch file as a shortcut icon and avoid having to enter any code in the command line!

About

This repository offers Python scripts for efficiently processing data from cognitive tests like PVT, DSST, and Serial Addition, utilizing Streamlit for streamlined batch processing. It converts raw outputs into structured CSVs for comprehensive and individual analyses.

Topics

Resources

Stars

Watchers

Forks

Languages