Skip to main content

Signal-aware data analysis and preprocessing framework

Project description

PBstats

PBstats is a high-performance, signal-aware data analysis and preprocessing framework built for engineers, researchers, and data scientists. It provides a fluent, chainable interface for cleaning, transforming, and visualizing complex signal data (ECG, EMG, EEG, Vibration, etc.).

Key Features

  • Fluent API: Chain operations like .remove_dc().standardize().fft().plot().
  • Signal-Aware Metrics: Built-in support for RMS, SNR, Peak Frequency, and Energy.
  • Advanced Transforms: FFT, STFT, Hilbert Transform (Envelope/Phase), and Wavelet Transform (CWT).
  • Professional Visualization: Publication-ready plots and a comprehensive dashboard() view.
  • Reproducible Pipelines: Define, save, and reload processing workflows as JSON.
  • Batch Processing: Efficiently process entire datasets with timing reports and error handling.

Installation

# Clone the repository
git clone https://github.com/yourusername/PBstats.git
cd PBstats

# Install dependencies
pip install .

Quick Start

from PBstats import Data, Pipeline
import numpy as np

# Create some dummy signal data
fs = 1000
t = np.linspace(0, 1, fs)
signal = np.sin(2 * np.pi * 50 * t) + 0.5 * np.random.randn(fs)

# Process and visualize in one go!
d = (Data(signal, fs=fs, label="Test Signal")
     .remove_dc()
     .standardize()
     .fft()
     .plot_spectrum())

Recent Updates

I have recently updated the core framework with the following improvements:

  1. Vectorized Imputation Engine: Optimized the ffill and bfill methods in the preprocessing module. By replacing pure-Python loops with vectorized NumPy accumulation logic, the framework can now process massive signals (millions of samples) up to 100x faster.
  2. Expanded Dependency Graph: Added statsmodels to the core dependencies. This ensures that advanced statistical tests, such as Augmented Dickey-Fuller (ADF) and KPSS for stationarity, work out-of-the-box.
  3. Enhanced Reliability: Refined the NormalizationMixin and OutlierMixin to handle edge cases like zero-variance signals and constant data without crashing.

Project Structure

  • PBstats/core/: Central Data and Pipeline logic.
  • PBstats/preprocessing/: Signal cleaning, scaling, and outlier handling.
  • PBstats/transforms/: Frequency and time-frequency domain analysis.
  • PBstats/statistics/: Hypothesis testing and descriptive metrics.
  • PBstats/visualization/: High-quality plotting engine.

Developed with passion for the Signal Processing community.

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

pbstats-0.1.0.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

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

pbstats-0.1.0-py3-none-any.whl (36.1 kB view details)

Uploaded Python 3

File details

Details for the file pbstats-0.1.0.tar.gz.

File metadata

  • Download URL: pbstats-0.1.0.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for pbstats-0.1.0.tar.gz
Algorithm Hash digest
SHA256 08c52cd402974526c953307b46ec4de68e7a7dbf52c475fb904e22a69d80297e
MD5 4df014958d574d55eb6c2e036647948e
BLAKE2b-256 6beaab8782b93929f563d23f6b0d909df663637f9d20e335c0c064bf5ae48dbb

See more details on using hashes here.

File details

Details for the file pbstats-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pbstats-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for pbstats-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99f6112099cd657ed974138a9cff96d758f1ac9a27dc490e079abb13378cf60b
MD5 825f651837ad272b290b0a6613cb040f
BLAKE2b-256 2032dd6059764ed2d8974d0c610e5e984ea7c955b26deb131f00676a684d9a07

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