DCT/FFT-based convolutional statistics for Cartesian and polar data
Project description
DCT-Toolkit: Convolutional Statistics
dct_toolkit provides DCT-based smoothing and normalized-convolution statistics for
data with gaps. The current publication-prep track is intentionally focused on the
convolution/statistics surface.
Current Scope (Stats-First)
- DCT-based smoothing for 1D/N-D Cartesian data.
- Polar smoothing with adaptive azimuth kernels.
- Reflective boundaries via DCT and periodic azimuth boundaries via real FFT.
- Robust local statistics (
dct_mean,dct_variance,dct_std,dct_count) with NaN support.
Installation
pip
pip install .
When the package is published on PyPI, installation will be:
pip install dct-toolkit
from source
git clone <your-repo-url>
cd dct_toolkit
pip install .
conda (planned)
Conda-forge packaging is in preparation. Until the feedstock is published, you can install with pip inside a conda environment.
conda create -n dct-toolkit python=3.11 -y
conda activate dct-toolkit
pip install dct-toolkit
Quick Start
1) Robust Mean with Missing Data
import numpy as np
import dct_toolkit as dct
data = np.sin(np.linspace(0, 10, 200))
data[70:110] = np.nan
mu = dct.dct_mean(data, width=10.0)
1b) Prefill Before Full-Field Smoothing
prefilled = dct.dct_prefill(data, width=10.0, max_iter=3)
smoothed = dct.dct_smooth(prefilled, width=10.0)
2) Polar Smoothing with Periodic Azimuth
smoothed = dct.dct_smooth(
radar_data,
width=5.0,
coordinates="polar",
az_boundary="periodic",
az_res_deg=1.0,
)
3) Local Variability Estimates
var = dct.dct_variance(data, width=10.0)
std = dct.dct_std(data, width=10.0)
Public API (Top Level)
dct_smoothdct_countdct_meandct_prefilldct_variancedct_stdsmooth_cartesiansmooth_polarget_dct_transfer_functiondct_convolve_1d
Notes on Gap Filling
Gap-filling methods remain in the repository for internal research, but they are de-scoped from the top-level public API for the initial convolution/statistics release.
Documentation
docs/MATHEMATICAL_BASIS.mddocs/API_REFERENCE.md
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dct_toolkit-0.4.0.tar.gz.
File metadata
- Download URL: dct_toolkit-0.4.0.tar.gz
- Upload date:
- Size: 39.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
537979fc60ad7d335b7472e7f11f9ee2f02a35ff6c767a29d30cb2da3be2fac5
|
|
| MD5 |
943743f6da056773daa1324a76dd4f50
|
|
| BLAKE2b-256 |
17e499c69e5537c0fc22ac49995ce2a74bc3cfced2a683141d0bf29bb9cbbda9
|
File details
Details for the file dct_toolkit-0.4.0-py3-none-any.whl.
File metadata
- Download URL: dct_toolkit-0.4.0-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e6aa346dbb6f9d03f8d536d5a591b3d41a142826ff59345669d76b32ef9bff3
|
|
| MD5 |
6e3d804700bb1955ce767bf914c2b863
|
|
| BLAKE2b-256 |
18ff46f8fb694a25cb4cd5d1474b0ab26c17348f19081d8d10d63556c7534e20
|