WaveForge
A Python toolkit for generating, storing, and loading Discrete Wavelet Transform (DWT) coefficient configurations.
Overview
WaveForge provides a structured approach to managing DWT filter coefficient configurations across different wavelet families.
Currently, WaveForge implements the Quadratic Spline Wavelet coefficient generator, supporting the generation of coefficient configurations at multiple scales. Configurations can be saved as JSON files and loaded back into validated Python objects using Pydantic.
Features
- Generate Quadratic Spline DWT coefficients for individual scales.
- Generate coefficient configurations across multiple scales.
- Automatically generate configuration filenames based on wavelet metadata.
- Save coefficient configurations as JSON files.
- Load and validate coefficient configurations from JSON files.
- Validate configuration structures using Pydantic.
Installation
Clone the repository:
git clone <repository-url>
cd waveforge
Install the package in editable mode:
pip install -e .
Usage
1. Generate Coefficient Configurations
Generate coefficients for a specific scale:
from waveforge.wavelets.quadratic_spline import (
generate_scale_configuration
)
scale_config = generate_scale_configuration(3)
print(scale_config)
Generate configurations from scale 1 up to a specified maximum scale:
from waveforge.wavelets.quadratic_spline import (
generate_coefficients
)
config = generate_coefficients(5)
2. Save Coefficient Configurations
Save a configuration as a JSON file:
from waveforge.wavelets.quadratic_spline import (
generate_coefficients,
save_coefficients
)
config = generate_coefficients(5)
output_path = save_coefficients(config)
print(output_path)
By default, the file is saved in the current working directory.
You can also specify a destination directory:
output_path = save_coefficients(
config,
dir="data/coefficients"
)
The filename is automatically generated using the wavelet name, configuration version, and scale range.
Example:
quadratic_spline_v1.0_scales_1-5.json
3. Load Coefficient Configurations
Load a previously saved configuration:
from waveforge.wavelets.quadratic_spline import (
load_coefficients
)
config = load_coefficients(
"quadratic_spline_v1.0_scales_1-5.json"
)
You can also specify the directory containing the JSON file:
config = load_coefficients(
"quadratic_spline_v1.0_scales_1-5.json",
dir="data/coefficients"
)
The loader reconstructs and validates the configuration using Pydantic.
Configuration Models
WaveForge uses two primary data models:
| Model | Description |
|---|---|
ScaleConfiguration |
Represents DWT filter coefficients and their associated parameters at a specific scale. |
DWTConfiguration |
Represents a complete DWT configuration containing coefficient data across multiple scales. |
Both models are available directly from the main package:
from waveforge import DWTConfiguration, ScaleConfiguration
Project Structure
waveforge/
├── pyproject.toml
├── README.md
├── src/
│ └── waveforge/
│ ├── __init__.py
│ ├── models.py
│ ├── wavelets/
│ │ ├── __init__.py
│ │ └── quadratic_spline/
│ │ ├── __init__.py
│ │ ├── generator.py
│ │ └── loader.py
│ └── data/
└── tests/
├── test_models.py
└── wavelets/
└── quadratic_spline/
├── test_generator.py
└── test_loader.py
Testing
WaveForge uses pytest for automated testing.
Install pytest:
pip install pytest
Run the test suite from the project root:
pytest -v
Dependencies
- Python 3.10 or later
- Pydantic 2.x
- pytest (development and testing)
License
No license has been specified yet.
Metadata
Release files for waveforge 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| waveforge-0.2.0.tar.gz | 25.3 kB | With provenance | Details for waveforge-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| waveforge-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for waveforge-0.2.0-py3-none-any.whl |
Total release size: 31.8 kB
Release files / waveforge-0.2.0.tar.gz
| Download URL | waveforge-0.2.0.tar.gz |
|---|---|
| Size | 25.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ad3534962b7305bde413a3ddb63dd215c113f3774994a39ee1927afb347d2fa
|
|
BLAKE2b-256 checksum How to use checksums |
4366acfbfad8e591daf40bf510dde5859d6d39f9b0dd11a64fa49bbd87064cd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / waveforge-0.2.0-py3-none-any.whl
| Download URL | waveforge-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccafb982a22d798dab9c18898948a0693c6071546cdf4c9b1d5ff23c6d23468a
|
|
BLAKE2b-256 checksum How to use checksums |
6bd5f6e1d7583336e4a461ad97901dfca897cb805e5556e3ccd7308399f2a10e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logSecurity for waveforge 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for waveforge-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.