Skip to main content

Python Dynamic Signal Processing

Project description

pyDySP

Dynamic Signal Processing for Experimental Data

Tests Docs PyPI Status Maintenance License Binder

pyDySP is a lightweight Python library for dynamic signal processing of experimental data, developed for
the EQUALS and SoFSI Laboratories at the University of Bristol.

It provides:

  • A Channel class for time-history signals
    (processing, spectra, trimming, Arias, response spectra, plots, metadata).
  • A Test class for multi-channel experiments
    (selection, batch processing, cross-spectra, transfer functions, modal analysis via sdypy, plotting utilities, .mat/.csv I/O).
  • Clean, readable, notebook-friendly code for research, teaching and reproducible workflows.
  • Full internal documentation and example notebooks.

Table of Contents

Installation

Option A — Install from PyPI (recommended)

pip install pydysp

For Jupyter notebooks:

pip install ipykernel

Option B — Developer installation (editable)

git clone https://github.com/dkaramitros/pyDySP.git
cd pyDySP
pip install -e .

Option C — Use directly from a folder

import sys
sys.path.append("/path/to/parent/of/pydysp")
from pydysp import Channel, Test

Environment Setup

Virtual environment (venv)

python -m venv .venv
source .venv/bin/activate      # Linux/Mac
.venv\Scripts\activate         # Windows
pip install pydysp

Conda / Mamba environment

mamba create -n pydysp python=3.11 pip
mamba activate pydysp
pip install pydysp

Dependencies

Required:

  • numpy
  • scipy
  • matplotlib
  • tabulate

Optional (for modal analysis):

pip install sdypy-EMA

Quick Start

Single channel

from pydysp import Channel
import numpy as np

dt = 0.01
t = np.arange(0, 10, dt)
y = np.sin(2*np.pi*2*t)

ch = Channel(data=y, dt=dt, name_user="Acc1", quantity="acceleration", units="g")
ch.plot()
t_proc, y_proc = ch.processed()

Multi-channel test

from pydysp import Test

test = Test.from_channels(name="MyTest", channels=[ch1, ch2])
print(test.info())
test.plot_channels(ncols=2)

Spectra & trimming

spec = ch.fourier()
f_peak, s_peak = spec.peak()

ch_trim = ch.trim_by_arias()

Response spectrum

rs = ch.response_spectrum()
rs.plot(y="Sa", logx=True)

Transfer functions

f, H = test.transfer_function("Shaker", "Acc1", kind="H1")

Channel health

print(test.channel_health())

Modal identification (optional)

model = test.ema_model(input="Shaker", outputs=["Acc1","Acc2"], lower=2, upper=40)
model.get_poles()
model.select_poles()
model.print_modal_data()

Features

Channel

  • Drift correction, filtering, baseline correction
  • Trimming (threshold, fraction, Arias)
  • Fourier & Welch spectra
  • Arias intensity
  • Response spectrum
  • Time-domain metrics
  • Metadata support
  • Plot utilities

Test

  • Channel selection (by index, name, tags, slices)
  • Batch processing
  • Cross-spectra, transfer functions, delays
  • Modal analysis (via sdypy)
  • .mat (SoFSI/EQUALS) and .csv I/O
  • Grid plots & channel summary tables
  • Health diagnostics

Example Notebooks

Located in:

examples/

Documentation

https://pydysp.readthedocs.io/en/latest/

Contributing

Contributions are very welcome — whether bug reports, small fixes, feature ideas, or full pull requests.

To contribute:

  1. Fork the repository on GitHub

  2. Create a branch for your change

  3. Commit your edits with clear messages

  4. Run the tests locally:

    pip install -e .
    pip install pytest
    pytest -q
    
  5. Open a Pull Request describing the change and its motivation

Please keep code style readable and consistent with the existing project
(docstrings, small focused functions, and meaningful error messages).

If you prefer to discuss an idea before writing code, feel free to open a GitHub Issue.

License

MIT License

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

pydysp-0.2.0.tar.gz (48.9 kB view details)

Uploaded Source

Built Distribution

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

pydysp-0.2.0-py3-none-any.whl (45.7 kB view details)

Uploaded Python 3

File details

Details for the file pydysp-0.2.0.tar.gz.

File metadata

  • Download URL: pydysp-0.2.0.tar.gz
  • Upload date:
  • Size: 48.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pydysp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 74fe3497ffa7419bca1213b1adffa4fb58abdbd9ca109bbf76e11afc8417348b
MD5 db691e46892d81756486677339be95f5
BLAKE2b-256 590b1d42e80fbdab099cfaf6f7af2cc8ddba29af6ac5ed3eb2343c7225fd339e

See more details on using hashes here.

File details

Details for the file pydysp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pydysp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 45.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pydysp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b285677036b10640d9ac8ed1604e95b35e11169134c741dc006f19cab084d9cc
MD5 c96c726eb1290e63cf7dbcae6fd23c64
BLAKE2b-256 efaec6e7919ea6bc186eb5f366442862bb9092d5faafc144c9498b40daa0f6fb

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