Transforms#
GPU-accelerated transforms using PyTorch named tensors. Works on both CPU and GPU - tensors provide dimension awareness everywhere.
Base Classes#
Temporal / Signal Processing#
Temporal transforms for EMG feature extraction and signal processing.
|
Base class for sliding window transforms (GPU-accelerated). |
|
Root Mean Square over sliding windows (GPU-accelerated). |
|
Mean Absolute Value over sliding windows (GPU-accelerated). |
|
Variance over sliding windows (GPU-accelerated). |
|
Full-wave rectification (absolute value). |
|
Bandpass filter using cascaded torchaudio biquads (GPU-accelerated). |
|
Highpass filter using torchaudio biquad (GPU-accelerated). |
|
Lowpass filter using torchaudio biquad (GPU-accelerated). |
|
Notch filter using FFT (GPU-accelerated). |
|
Count zero crossings in sliding windows (GPU-accelerated). |
|
Count slope sign changes in sliding windows (GPU-accelerated). |
|
Waveform length over sliding windows (GPU-accelerated). |
|
Compute differences along a dimension. |
Normalization#
Normalization transforms for data preprocessing.
|
Z-score normalization (mean=0, std=1) along a dimension. |
|
Min-max normalization to [0, 1] range along a dimension. |
|
L-p normalization along a dimension. |
|
Standardize using pre-computed mean and std. |
|
Instance normalization (normalize each sample independently). |
|
Layer normalization along specified dimensions. |
|
Batch normalization (normalize over batch dimension). |
|
Clamp values to a specified range. |
Generic Operations#
Generic array operations.
|
Reshape tensor with new dimension names. |
|
Index/slice along a dimension. |
|
Flatten dimensions of a tensor. |
|
Remove dimensions of size 1. |
|
Add a dimension of size 1. |
|
Transpose/permute dimensions. |
|
Compute mean along a dimension. |
|
Compute sum along a dimension. |
|
Stack multiple tensors along a new dimension. |
|
Concatenate multiple tensors along an existing dimension. |
|
Apply a custom function. |
|
Identity transform (returns input unchanged). |
|
Repeat tensor along a dimension. |
|
Pad tensor along a dimension. |
Augmentation#
Data augmentation transforms.
|
Add Gaussian noise to the signal. |
|
Warp magnitude using smooth random curves. |
|
Warp time axis with smooth random curves. |
|
Randomly zero out elements. |
|
Randomly shuffle channel order. |
|
Randomly shift signal in time. |
|
Random amplitude scaling. |
|
Randomly zero out contiguous regions. |
Spatial / Grid-Aware#
Spatial transforms for electrode grid processing.
|
Apply spatial filtering using grid layouts. |
|
Normal Double Differential (Laplacian) filter. |
|
Longitudinal Single Differential filter. |
|
Transverse Single Differential filter. |
|
Inverse Binomial 2nd order filter. |