Skip to main content

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.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for waveforge 0.1.0
File Size Uploaded Provenance Actions
waveforge-0.1.0.tar.gz 25.3 kB With provenance Details for waveforge-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for waveforge 0.1.0
File Interpreter ABI Platform Actions
waveforge-0.1.0-py3-none-any.whl Python 3 none any Details for waveforge-0.1.0-py3-none-any.whl

Total release size: 31.8 kB

Release files / waveforge-0.1.0.tar.gz

Download URL waveforge-0.1.0.tar.gz
Size 25.3 kB
Tags Source
SHA-256 checksum
How to use checksums
220bd4eabed775ce3872a0c9ead3b5c5c4a0f2dc506c251146541d147884a639
BLAKE2b-256 checksum
How to use checksums
b210d9c7d9847e59dda37f9b2cc2e281e0421898f519a61938d2cd7f8e6eb7d5
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 log

Release files / waveforge-0.1.0-py3-none-any.whl

Download URL waveforge-0.1.0-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afcf8208f822564014fe04a4bf28eb5401f3a8a1ca56def3ad7ce484ec7c6735
BLAKE2b-256 checksum
How to use checksums
5aee21ddff45240b4a86cb6c4ea93aa4a87a952a37ce943295049be6a9bddcd8
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 log

Security for waveforge 0.1.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.

Select from 2 files

Attestation for waveforge-0.1.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 log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page