ectmetrics

A Python Library for Calculating Seizure Quality Indices in Electroconvulsive Therapy

https://github.com/maxkayser/ectmetrics

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary

Keywords

bioinformatics biomedical-data-science biomedical-informatics biosignal biosignals brainstimulation depression ect eeg eeg-analysis eeg-signals eeg-signals-processing electroencephalography medecine medical medical-physics neuroscience psychiatry psychtoolbox
Last synced: 6 months ago · JSON representation ·

Repository

A Python Library for Calculating Seizure Quality Indices in Electroconvulsive Therapy

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 3
Topics
bioinformatics biomedical-data-science biomedical-informatics biosignal biosignals brainstimulation depression ect eeg eeg-analysis eeg-signals eeg-signals-processing electroencephalography medecine medical medical-physics neuroscience psychiatry psychtoolbox
Created over 1 year ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License Citation

README.md

Top Language GitHub release DOI

ECTMetrics

ECTMetrics is a Python library for analyzing EEG signals, particularly focusing on electroconvulsive therapy (ECT) seizure metrics. It provides functionalities to generate synthetic EEG signals, visualize them, and calculate various metrics related to seizure activity.

Features

  • Generate synthetic ECT specific EEG signals with customizable parameters.
  • Visualize EEG signals for better understanding and analysis.
  • Import EEG data from GPD (Elektrika Inc®).

  • Calculate various ECT seizure metrics, including:

    • Seizure Energy Index (SEI)
    • Average Seizure Energy Index (ASEI)
    • Postictal Suppression Index (PSI)
    • Earlyictal Amplitude (EIA)
    • Midictal Amplitude (MIA)
    • Maximum Sustained Power (MSP)
    • Time to Peak Power (TTPP)
    • Maximum Sustained Coherence (COH)
    • Time to Peak Coherence (TTPC)

Documentation

The code documentation is available at: https://maxkayser.github.io/ectmetrics/

Installation

To install the ectmetrics library, clone the repository and use pip to install the library and it's dependencies:

bash git clone https://github.com/maxkayser/ectmetrics cd ectmetrics pip install .

Usage

Usage examples

This section lists various usage examples for the ectmetrics library as demonstrated in Jupyter Notebook. - Simple usage example - EEG signal generation - EEG signal import - ECT seizure quality metrics calculation

Quick start

Here’s a short example of generating an EEG signal and calculating the ECT seizure metrics.

```python

Import the ectmetrics library and it's modules

import ectmetrics from ectmetrics.eeg import generate, plot from ectmetrics.metrics import metric

Generate a synthetic EEG signal

eegdata = generate( signalduration=28, # in seconds seizureduration=21, # in seconds samplingfrequency=200, # in Hz eeg_name='ECT EEG' )

Calculate all default ECT seizure quality metrics

metricsresults = metric(eegdata)

metrics_results ```

ECT Seizure Quality Metrics

Contact Information

For more details, please refer to the contact information file.

Citing ECTMetrics

For citation information, please refer to the citations file.

Acknowledgements

The authors sincerely acknowledge the access granted to the Bonna computing cluster hosted by the University of Bonn and the support provided by its High-Performance Computing & Analytics Lab. We extend special thanks to Ralf Berninger for his invaluable technical insights and assistance regarding the Thymatron® System IV stimulation device. We also express our deep gratitude to Jesse Pavel for the development and ongoing enhancement of the ECT data collection tool, GPD.

All acknowledgments are associated with research that was partially funded by the BONFOR and the FKS study support program [2021-FKS-12] of the University Hospital Bonn. This research did not receive any additional grants from funding agencies in the public, commercial, or not-for-profit sectors.

Disclaimer

The ECTMetrics is intended for research purposes only and does not constitute a medical product. It is neither designed nor certified for medical use (e.g., treatment of humans or living beings, clinical decision-making). The toolbox is provided "as is", without warranty of any kind, express or implied, including, but not limited to, warranties of merchantability, fitness for a particular purpose, or noninfringement.

The authors assume no responsibility or legal liability for any misuse of the toolbox. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the toolbox or its use or other dealings. Users are advised to exercise caution and ensure compliance with all applicable laws, regulations, and ethical guidelines when utilizing this toolbox.

Running Tests

To run the tests, you will need pytest. Install it via pip if you haven’t already:

bash pip install pytest Then run the tests with:

bash pytest tests/

Owner

  • Name: Max Kayser
  • Login: maxkayser
  • Kind: user
  • Company: @unibonn

Citation (CITATION.cff)

cff-version: 1.2.0
title: >-
  ECTMetrics: Python Library for Calculating Seizure
  Quality Indices in Electroconvulsive Therapy
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Kayser
    family-names: Max
    orcid: 'https://orcid.org/0000-0002-8589-4415'
    affiliation: 'University Hospital Bonn, Germany'
repository-code: 'https://github.com/maxkayser/ectmetrics'
license: CC-BY-NC-4.0
version: v1.0.0
date-released: '2024-12-05'

GitHub Events

Total
  • Release event: 13
  • Delete event: 1
  • Public event: 1
  • Push event: 50
  • Fork event: 1
  • Create event: 4
Last Year
  • Release event: 13
  • Delete event: 1
  • Public event: 1
  • Push event: 50
  • Fork event: 1
  • Create event: 4

Dependencies

pyproject.toml pypi
requirements.txt pypi
  • matplotlib >=3.4.0
  • numpy >=1.21.0
  • pyedflib *
  • scipy >=1.7.0
setup.py pypi
  • matplotlib >=3.4.0
  • numpy >=1.21.0
  • pyedflib *
  • scipy >=1.7.0