Skip to content

feat: default filtering for Hodges algorithm#86

Merged
mwyau merged 19 commits intomainfrom
feat/default-filtering
Mar 21, 2026
Merged

feat: default filtering for Hodges algorithm#86
mwyau merged 19 commits intomainfrom
feat/default-filtering

Conversation

@mwyau
Copy link
Copy Markdown
Owner

@mwyau mwyau commented Mar 21, 2026

No description provided.

mwyau added 9 commits March 21, 2026 13:30
…ackers

- Enable T5-42 (range 5-42) spectral filtering by default for both Hodges and Simple trackers.
- Update DataLoader to support in-memory xarray.DataArray to avoid redundant I/O after filtering.
- Update HodgesDetector and SimpleDetector with get_xarray() and from_xarray() to process filtered data.
- Fix TaperFilter and SphericalHarmonicFilter to dynamically map coordinate dimensions (latitude, longitude) from DataLoader.VAR_MAPPING.
- Add mutually exclusive CLI flags --filter-range and --no-filter for flexible preprocessing control.
- Ensure spectral filtering handles chunked dask arrays correctly in both serial and parallel backends.
- Add LMIN_DEFAULT=5 and LMAX_DEFAULT=42 to src/pystormtracker/hodges/constants.py.
- Update HodgesTracker, SimpleTracker, and CLI to reference these centralized constants.
- Ensure consistent default filtering behavior across all tracking algorithms and interfaces.
- Create src/pystormtracker/models/constants.py for project-wide defaults (Taper, Filter Range, Lifetime).
- Update src/pystormtracker/hodges/constants.py to reference model-level constants.
- Refactor HodgesTracker, SimpleTracker, and CLI to use centralized MIN_POINTS_DEFAULT and TAPER_DEFAULT.
- Ensure consistent default behavior across all algorithms while maintaining algorithm-specific overrides.
@mwyau mwyau force-pushed the feat/default-filtering branch 2 times, most recently from 40094c8 to b728aa4 Compare March 21, 2026 19:33
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 21, 2026

Codecov Report

❌ Patch coverage is 68.91892% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.31%. Comparing base (5a6526e) to head (ceb3143).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/pystormtracker/cli.py 50.00% 8 Missing ⚠️
src/pystormtracker/hodges/detector.py 61.90% 8 Missing ⚠️
src/pystormtracker/hodges/tracker.py 46.66% 8 Missing ⚠️
src/pystormtracker/preprocessing/taper.py 0.00% 7 Missing ⚠️
src/pystormtracker/simple/concurrent.py 53.84% 6 Missing ⚠️
src/pystormtracker/preprocessing/sh_filter.py 54.54% 5 Missing ⚠️
src/pystormtracker/simple/detector.py 92.85% 2 Missing ⚠️
src/pystormtracker/simple/tracker.py 90.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #86      +/-   ##
==========================================
- Coverage   64.93%   61.31%   -3.62%     
==========================================
  Files          21       22       +1     
  Lines        1885     2001     +116     
==========================================
+ Hits         1224     1227       +3     
- Misses        661      774     +113     
Flag Coverage Δ
integration ?
unit 61.31% <68.91%> (+0.84%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/pystormtracker/hodges/constants.py 100.00% <100.00%> (ø)
src/pystormtracker/io/loader.py 94.73% <100.00%> (+0.29%) ⬆️
src/pystormtracker/models/constants.py 100.00% <100.00%> (ø)
src/pystormtracker/models/tracker.py 100.00% <ø> (ø)
src/pystormtracker/simple/detector.py 81.81% <92.85%> (-0.07%) ⬇️
src/pystormtracker/simple/tracker.py 97.36% <90.00%> (-2.64%) ⬇️
src/pystormtracker/preprocessing/sh_filter.py 72.27% <54.54%> (+0.84%) ⬆️
src/pystormtracker/simple/concurrent.py 52.63% <53.84%> (-1.22%) ⬇️
src/pystormtracker/preprocessing/taper.py 23.80% <0.00%> (-1.84%) ⬇️
src/pystormtracker/cli.py 65.92% <50.00%> (-13.91%) ⬇️
... and 2 more

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mwyau mwyau force-pushed the feat/default-filtering branch from b3410e2 to 7b57156 Compare March 21, 2026 19:42
@mwyau mwyau force-pushed the feat/default-filtering branch from aa79d3f to dc2e025 Compare March 21, 2026 20:02
@mwyau mwyau force-pushed the feat/default-filtering branch 2 times, most recently from 5ed83d4 to 449b2be Compare March 21, 2026 20:09
@mwyau mwyau merged commit e48eba5 into main Mar 21, 2026
11 of 16 checks passed
@mwyau mwyau deleted the feat/default-filtering branch March 21, 2026 20:09
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