EEG-project-capstone / brain_waves

Peter Schwab Capstone Project CHEM E 546: Coma Outcomes
MIT License
0 stars 0 forks source link

Stimulus Administration Package

Overview

The Stimulus Administration Package provides a straightforward and intuitive interface for administering and recording auditory stimuli to patients, designed to be accessible to users without coding expertise. With intuitive functionalities for stimulus administration, patient record management, and note-taking, this software simplifies the process for researchers and clinicians alike. Users can seamlessly administer auditory stimuli to patients through a web-based interface, ensuring efficient data recording and management for research and clinical purposes.

Usage guide

  1. Set up a conda environment with the environment.yml file. Required packages are gtts, psychopy, psychtoolbox, and playsound.
    • PsychoPy no longer used due to erroring (now using playsound), would be great for future teams to troubleshoot this as it would allow for more specific control over stimulus.
  2. Edit the word and/or sentence lists in the text files located in the brain_waves_packages/corpus/ directory. Copy-Paste in your words and/or sentences into the appropriate .txt file(s). Alternatively, you may use the provided default words and sentence lists.
  3. Launch the GUI by navigating brain_waves_packages directory in the terminal. Then write streamlit run gui_stimulus.py into the terminal and enter. This should launch the GUI in the browser.
  4. Administer stimulus by entering a patient_id into the textbox at the top of the screen, then push the start stimulus button. Play around with the other functionalities of the GUI.

Functions

Graphical User Interface (GUI)

GUI Stimulus Package

This script provides a user interface for administering auditory stimuli to patients. It utilizes the Streamlit library for creating a web-based interface. The main functionalities include administering stimuli, searching for patients who have already been administered stimuli, adding notes to patient records, and finding patient notes.

Usage:

Run the backend functions through the GUI web interface. Launch the GUI by following step 3 in Usage guide above.

Components:

Dependencies:

Output:

The script generates and saves data to 'patient_df.csv' and 'patient_notes.csv' files.

Backend Functions

administer_sentence

Administers a sentence stimulus to a patient.

Parameters:

Returns:


administer_word

Administers a word stimulus to a patient.

Parameters:

Returns:


administer_beep

Administers a beep stimulus to a patient.

Parameters:

Returns:


get_random_stimulus_order

Generates a random order of stimuli to be administered.

Returns:


generate_and_play_stimuli

Generates and plays auditory stimuli for a patient.

Parameters:

Outputs:

Future Work Ideas

Archive Entries [IN DEVELOPMENT]:

Components:

Contributors

Powerpoint Presentations

Winter 2024: https://docs.google.com/presentation/d/1Kp6XUgpTHJ_MS2kLk3vIcxjNE0yz_ODsBUjHLSKQaZU/edit?usp=sharing

Spring 2024: https://docs.google.com/presentation/d/1FUqLEs0Pi69MavDdpUPYJBafI9lskivDAvJT3tufLfA/edit?usp=sharing

Gantt Chart Progress Report

Spring 2024: https://docs.google.com/spreadsheets/d/1dB0wKZc62g64NrvtKUnsOXBvMH8jNoDxWFfDWA1Aob4/edit?usp=sharing