Skip to content

update cappi - #146

Open
decadeneo wants to merge 3 commits into
CyanideCN:masterfrom
decadeneo:master
Open

update cappi#146
decadeneo wants to merge 3 commits into
CyanideCN:masterfrom
decadeneo:master

Conversation

@decadeneo

Copy link
Copy Markdown

性能优化

Replace 3D point-cloud KDTree approach with sweep-based interpolation
matching pycwr's get_CAPPI_xy algorithm:

- Spherical geometry Cartesian→Antenna reverse transform
- Bilinear (azimuth × range) interpolation within each sweep
  with proper 0/360° wraparound handling
- Linear elevation interpolation between sweeps
- Beam-width based blind zone masking
- Fully numba JIT-compiled kernel (parallel prange) → ~55× faster
- Pure Python fallback when numba is not available
- 18 test cases validating correctness, symmetry, edge cases

Files:
- cinrad/calc.py: CAPPI class + HAS_NUMBA auto-detection
- cinrad/cappi_numba.py: @njit(parallel=True) kernel (new)
- cinrad/__init__.py: export CAPPI
- test/test_cappi.py: 18 tests (new)
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