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.1.tar.gz (37.8 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.1-py3-none-any.whl (48.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pbstats-0.1.1.tar.gz
  • Upload date:
  • Size: 37.8 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.1.tar.gz
Algorithm Hash digest
SHA256 a7d2b0dc6a17c45b252776cff518b187b41c0d12fb3ff6ffac390c5a3dd488a9
MD5 459a4c22f304df5aa99571fa63b27fff
BLAKE2b-256 816e41d590675edc77c1bb929a19d7df92ce87e262f571aa2ff2376487b6a0a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pbstats-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 48.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db853d80cec06ced2864e32eefe2596e702e6e16141c23fded79dc2bbf9a3cf4
MD5 8fd0cfcb7e38d4e75f8459e8772e2018
BLAKE2b-256 d0ccb2e30ddf6ddd0fcbf12fa77dcce2ac08ec32a27e09153059b8c9bd5dc1c9

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