Metadata-Version: 2.1
Name: biopsykit
Version: 0.2.2
Summary: A python package for the analysis of biopsychological data.
Home-page: https://github.com/mad-lab-fau/biopsykit
License: MIT
Author: Robert Richer
Author-email: robert.richer@fau.de
Requires-Python: >=3.7.1,<3.10
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Provides-Extra: mne
Requires-Dist: IPython (>=7.13.0,<8.0.0)
Requires-Dist: XlsxWriter (>=1.4.5,<2.0.0)
Requires-Dist: ipympl (>=0.7.0,<0.8.0)
Requires-Dist: ipywidgets (>=7.6.3,<8.0.0)
Requires-Dist: joblib (>=1.0.0,<2.0.0)
Requires-Dist: matplotlib (>=3,<4)
Requires-Dist: mne (>=0.23.0,<0.24.0); extra == "mne"
Requires-Dist: neurokit2 (>=0.1.3,<0.2.0)
Requires-Dist: nilspodlib (>=3.2.2,<4.0.0)
Requires-Dist: numpy (>=1,<2)
Requires-Dist: openpyxl (>=3.0.7,<4.0.0)
Requires-Dist: pandas (>=1.2.0,<2.0.0)
Requires-Dist: pingouin (>=0.3.12,<0.4.0)
Requires-Dist: scikit-learn (>=0.24.2,<0.25.0)
Requires-Dist: scipy (>=1.7.1,<2.0.0)
Requires-Dist: seaborn (>=0.11.1,<0.12.0)
Requires-Dist: statannot (>=0.2.3,<0.3.0)
Requires-Dist: tqdm (>=4.62.0,<5.0.0)
Requires-Dist: xlrd (>=2.0.1,<3.0.0)
Project-URL: Repository, https://github.com/mad-lab-fau/biopsykit
Description-Content-Type: text/markdown

# BioPsyKit

[![PyPI](https://img.shields.io/pypi/v/biopsykit)](https://pypi.org/project/biopsykit/)
![GitHub](https://img.shields.io/github/license/mad-lab-fau/biopsykit)
[![Test and Lint](https://github.com/mad-lab-fau/BioPsyKit/actions/workflows/test-and-lint.yml/badge.svg)](https://github.com/mad-lab-fau/BioPsyKit/actions/workflows/test-and-lint.yml)
![Coverage](./coverage-badge.svg)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
![PyPI - Downloads](https://img.shields.io/pypi/dm/biopsykit)
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/mad-lab-fau/biopsykit)

A Python package for the analysis of biopsychological data.

With this package you have everything you need for analyzing biopsychological data, including:
* Data processing pipelines for biosignals (ECG, EEG, ...)
* Methods for analyzing saliva samples (cortisol, amylase)
* Implementation of various psychological and HCI-related questionnaires

 
Additionally, there are modules to analyze and visualize data acquired from special measurement scenarios, such as:
* Montreal Imaging Stress Task (MIST)
* ... more to follow

## Details

### Biosignal Analysis
#### ECG Processing
`BioPsyKit` provides a whole ECG data processing pipeline, consisting of:
* Loading ECG data from:
    * generic `.csv` files
    * NilsPod binary (`.bin`) files (requires `NilsPodLib`: https://github.com/mad-lab-fau/NilsPodLib)
    * from other sensor types (_coming soon_)
* Splitting data into chunks (based on time intervals) that will be analyzed separately
* Perform ECG processing, including:
    * R peak detection (using `Neurokit`: https://github.com/neuropsychology/NeuroKit)
    * R peak outlier removal and interpolation
    * HRV feature computation
    * ECG-derived respiration (EDR) estimation for respiration rate and respiratory sinus arrhythmia (RSA) (_experimental_)
* Visualization of results

... more biosignals coming soon!

### Biomarker Analysis
`BioPsyKit` provides several methods for the analysis of biomarkers, such as:
* Load saliva data (e.g. cortisol and amylase) from deepwell plate Excel exports
* Compute standard features (maximum increase, slope, AUC, ...)

### Questionnaires
`BioPsyKit` implements various established psychological and HCI-related questionnaires, such as:
* Perceived Stress Scale (PSS)
* Positive Appraisal Negative Appraisal Scale (PANAS)
* Self-Compassion Scale (SCS)
* System Usability Scale (SUS)
* NASA Task Load Index (NASA-TLX)
* Short Stress State Questionnaire (SSSQ)
* ...

For more details, see the instructions in the `questionnaire` module.

### Stress Protocols
`BioPsyKit` implements methods for analyzing data recorded with several established stress protocols, such as:
* Montreal Imaging Stress Task (MIST)
* Trier Social Stress Test (TSST) (_coming soon..._) 



## Installation
Install it via pip:

```
pip install biopsykit
```


## For developer

```bash
git clone https://github.com/mad-lab-fau/BioPsyKit.git
cd biopsykit
poetry install
```
Install Python >3.8 and [poetry](https://python-poetry.org).
Then run the commands below to get the latest source and install the dependencies:


To run any of the tools required for the development workflow, use the doit commands:

```bash
$ poetry run doit list
docs                 Build the html docs using Sphinx.
format               Reformat all files using black.
format_check         Check, but not change, formatting using black.
lint                 Lint all files with Prospector.
test                 Run Pytest with coverage.
update_version       Bump the version in pyproject.toml and biopsykit.__init__ .
```


## Examples
See Examples in the function documentations on how to use this library.

