semvec/pypi-packages huggingface dataset:
pyPSG-toolbox 1.0.9
Python toolbox for PPG, ECG, SPO2 and HRV analysis
Requires Python: <3.11,>=3.10

# *pyPSG* toolbox documentation


## Introduction

Dedicated toolboxes have been developed for the analysis of individual physiological signals.
However, for the purpose of fast and efficient data analysis, there was a need to unify these separate modules.
To address this gap, pyPSG was developed — a Python-based toolbox capable of handling and analyzing various types of physiological signals within a single environment.
The toolbox standardizes the signal processing workflow across data from different sources and also enables the preprocessing of physiological signals for machine learning applications.
During development, modularity was a key consideration to allow future expansion with additional biological signals.



## Description
Input data, raw signals are first unified in the EDF (European Data Format) structure. 
The pipeline processes three parallel signal branches: PPG, ECG, and SpO$_2$. 
Each signal undergoes preprocessing using its corresponding module (pyPPG, pecg, or pobm). 
In the case of PPG and ECG, fiducial points are detected to derive beat-to-beat intervals, which are then forwarded to the mhrv module for HRV/BRV analysis. 
Biomarkers are extracted separately from all three signal types, and the results are aggregated and saved for further data analysis.

![](docs/figs/pipeline.png)

## Requirements

### Python requirements:


Python == 3.10

pecg == 2.0.5

pyPPG == 1.0.73

scipy == 1.9.1

numpy == 1.23.2

pandas == 1.4.4

dotmap == 1.3.30

wfdb == 3.4.0

mne == 1.5.0


### System requirements:


To run the ECG wavdet fiducial-points detector [matlab runtime (MCR) 2021a](https://www.mathworks.com/products/compiler/matlab-runtime.html) is required.

If you wish to use the epltd peak detector [additional wfdb toolbox](https://archive.physionet.org/physiotools/wfdb-linux-quick-start.shtml) is required.

If you don't want or can't install this - It's Ok! you can use another peak detector from the package.

## Installation

Available on pip, with the command: **pip install pyPSG-toolbox**

pip project: https://pypi.org/project/pyPSG-toolbox/

### Matlab runtime installation:

Follow the guidelines provided in the link: https://www.mathworks.com/products/compiler/matlab-runtime.html, and choose the version of 2021a(9.10).


## Documentation

https://pypsg-github.readthedocs.io/en/latest/
magicli 1.2.0
Automatically generates a CLI from functions.

# magiᴄʟɪ✨

Automatically generates a CLI from functions.

## Install

```
pip install magicli
```

## Get started

Simple usage example.

```python
# module.py
def hello(name, times=1):
    for _ in range(times):
        print("hello", name)

import magicli
```

Make sure you import `magicli` at the end of the file.

```bash
$ python3 module.py world --times 2
hello world
hello world
```

### Define name of CLI in `pyproject.toml`

Add the following to your `pyproject.toml`.

```toml
[project.scripts]
hello = "module:hello"
```

This example assumes the following project structure with the CLI to be created specified in the file `module.py`.

```bash
.
├── module.py
└── pyproject.toml
```

You can now `pip install` your code and call it like this:

```bash
$ hello world --times 2
hello world
hello world
```

Make sure to adjust the path to `module` if your project layout is different.

### Using subcommands

```python
# module.py
def hello(): ...

def world(times=1):
    for _ in range(times):
        print("hello world")

import magicli
```

```bash
$ hello world --times 2
hello world
hello world
```

### Help message

By default, the docstring of the function will be displayed.

If no docstring is specified, there will be no output.