Transforms

class ratspy.Transforms

Class containing various frequency domain transforms for time series data.

This module provides implementations of different frequency domain transforms such as Fast Fourier Transform (FFT) and Discrete Cosine Transform (DCT).

These transforms can be used for various purposes, including feature extraction, noise reduction, and data compression in time series analysis.

Methods

compare_within_tolerance(original, ...)

Computes maximum absolute difference between two Datasets and check if all differences are within a tolerance.

dct(dataset, parallel)

Discrete Cosine Transform (DCT-II) for time series data.

fft(dataset, parallel)

Converts each real-valued time series in the dataset into its frequency domain representation, storing the result as interleaved real and imaginary parts: [re0, im0, re1, im1, ...]

idct(dataset, parallel)

Inverse Discrete Cosine Transform (DCT-III) for time series data.

ifft(dataset, parallel)

Reconstructs each time series from its frequency domain representation (interleaved real/imag parts).

static compare_within_tolerance(original, reconstructed, tolerance)

Computes maximum absolute difference between two Datasets and check if all differences are within a tolerance.

static dct(dataset, parallel)

Discrete Cosine Transform (DCT-II) for time series data.

Converts each real-valued time series in the dataset into DCT coefficients (real, frequency representation)

static fft(dataset, parallel)

Converts each real-valued time series in the dataset into its frequency domain representation, storing the result as interleaved real and imaginary parts: [re0, im0, re1, im1, …]

static idct(dataset, parallel)

Inverse Discrete Cosine Transform (DCT-III) for time series data. Reconstructs each time series from its DCT coefficients, recovering the original signal.

static ifft(dataset, parallel)

Reconstructs each time series from its frequency domain representation (interleaved real/imag parts).