easyclimate.core.stats.detrend_spatial

easyclimate.core.stats.detrend_spatial#

Unified spatial detrending function with multiple computation methods.

Available methods: 1. ‘scipy_reduce’ - Simplified version using scipy.signal.detrend 2. ‘scipy’ - Optimized version using scipy.signal.detrend 3. ‘numpy’ - Manual numpy vectorized version 4. ‘rust’ - High-performance Rust backend version 5. ‘rust_chunked’ - Rust backend with chunked processing 6. ‘rust_flexible’ - Rust backend with flexible dimensions 7. ‘auto’ - Automatically selects the best available method

Functions

benchmark_detrend_methods([data_input, ...])

Benchmark different detrending methods.

calc_detrend_spatial_fast(data_input[, ...])

Remove linear trend along time dimension from spatio-temporal data.

calc_detrend_spatial_numpy(data_input[, ...])

High-performance version using manual linear regression.

calc_detrend_spatial_rust(data_input[, ...])

High-performance version using Rust backend.

calc_detrend_spatial_rust_chunked(data_input)

Rust backend with chunked processing for large datasets.

calc_detrend_spatial_rust_flexible(data_input)

Rust backend with flexible dimension handling.

calc_detrend_spatial_scipy(data_input[, ...])

Optimized version using scipy.signal.detrend with special value handling.

calc_detrend_spatial_scipy_reduce(data_input)

Simplified version using scipy.signal.detrend.

compare_results(data_input[, methods, ...])

Compare numerical results from different methods.

create_test_dataset([shape, add_trend, ...])

Create a test dataset for detrending.