Skip to main content

Implementation of AMPD algorithm for peak detection in quasi-periodic signals

Project description

README.md rev. 10 Feb 2023 by Luca Cerina. Copyright (c) 2023 Luca Cerina. Distributed under the Apache 2.0 License in the accompanying file LICENSE.

Automatic Multiscale-based Peak Detection (AMPD)

ampdLib implements automatic multiscale-based peak detection (AMPD) algorithm as in An Efficient Algorithm for Automatic Peak Detection in Noisy Periodic and Quasi-Periodic Signals, by Felix Scholkmann, Jens Boss and Martin Wolf, Algorithms 2012, 5, 588-603.

Python required dependencies

  • Python >= 3.11
  • Numpy
  • Scipy for tests

Installation

The library can be easily installed with setuptools support using pip install . or via PyPI with pip install ampdlib

Usage

A simple example is:

peaks = ampdlib.ampd(input)

AMPD may require a lot of memory (N*(lsm_limit*N/2) bytes for a given length N and default lsm_limit). A solution is to divide the signal in windows with ampd_fast or ampd_fast_sub or determine a better lsm_limit for the minimum distance between peaks required by the use case with get_optimal_size.

Tests

The tests folder contains an ECG signal with annotated peaks in matlab format.

Contribution

If you feel generous and want to show some extra appreciation:

Buy me a coffee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ampdlib-1.1.7.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ampdlib-1.1.7-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file ampdlib-1.1.7.tar.gz.

File metadata

  • Download URL: ampdlib-1.1.7.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for ampdlib-1.1.7.tar.gz
Algorithm Hash digest
SHA256 61b6127c19416cb17be50e8891014797acbbca8b65bd11ae6e478fa0faa5246e
MD5 d61b931008200e65f9912f873d42c26f
BLAKE2b-256 a7d4a38ce3f4c6d3e3bcc68fdc750ec7d53f098a666cd4c33c4316904fd213db

See more details on using hashes here.

File details

Details for the file ampdlib-1.1.7-py3-none-any.whl.

File metadata

  • Download URL: ampdlib-1.1.7-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for ampdlib-1.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 692c04e2e239586399fa4b6ec4fa5c6619c30b3229607bfe97ab7ebbd8a83a26
MD5 5e93084402ba56f674b682e4b8e7a6ac
BLAKE2b-256 2cbe908ed2ebbe713b79e7f6e4bcfe2ed50967efe6b5966f39a65846b59c49d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page