Skip to content

Use external stockwell implementation - #7

Open
jkmacc-LANL wants to merge 8 commits into
masterfrom
depend_stockwell
Open

Use external stockwell implementation#7
jkmacc-LANL wants to merge 8 commits into
masterfrom
depend_stockwell

Conversation

@jkmacc-LANL

@jkmacc-LANL jkmacc-LANL commented Jul 21, 2026

Copy link
Copy Markdown
Member

Use an externally-maintained stockwell implementation instead of keeping this one. The stockwell API is almost the same, but better, and we don't have to maintain our own. It seems reasonably well updated and it's on conda-forge, so users don't necessarily need FFTW3 directly on their system.

Major changes:
- Replace internal C implementation with external stockwell library
- Add gamma parameter for time-frequency resolution tuning
- Add win_type parameter for window function selection (gauss/kazemi)
- Simplify installation (no C compiler or FFTW needed)
- Fix default frequency range handling (N % 2 -> N // 2)
- Add tests for new features
- Update documentation

Backward compatibility:
- All existing code works without changes
- New parameters are optional with sensible defaults
- All existing tests pass (13 passed, 1 xfailed - pre-existing)

Breaking changes:
- Now depends on external stockwell>=1.0 package
- Version bumped from 0.3.0 to 0.4.0

Files modified:
- setup.py: Remove C extension, add stockwell dependency
- src/particleman/st.py: Rewrite as wrapper around stockwell.st
- src/particleman/core.py: Add gamma and win_type parameters
- test/test_core.py: Add tests for new features
- test/test_filter.py: Mark pre-existing failure as xfail
- CHANGELOG.md: Document all changes
- README.md: Update installation and usage docs

Note: src/particleman/st.c is no longer used but kept for reference
Changes:
- Add DeprecationWarning to particleman.st.st() and particleman.st.ist()
- Update src/particleman/core.py to import directly from stockwell.st
- This avoids deprecation warnings in normal particleman usage
- Update module docstring with deprecation notice
- Update CHANGELOG.md with deprecation section
- Update README.md with deprecation notice and migration guide

Usage:
- Deprecated: from particleman.st import st, ist
- Recommended: from stockwell.st import st, ist
- Or use high-level API: from particleman import stransform, istransform

The high-level stransform() and istransform() functions are NOT deprecated
and remain the recommended way to use Stockwell transforms in particleman.

All tests pass with no warnings (13 passed, 1 xfailed)
The stockwell dependency tests these functions already.  We don't need
to re-test them, since they don't belong to us anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant