Skip to content

Latest commit

 

History

History
146 lines (119 loc) · 4.69 KB

File metadata and controls

146 lines (119 loc) · 4.69 KB

Changelog

All notable changes to the 3DEX Python implementation will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

2.0.0-beta1 - 2026-02-18

Added

Core Implementation

  • Complete Python translation of 3DEX Fortran/C++ codebase
  • Modern Python package structure with pyproject.toml
  • Full type hints throughout codebase
  • Comprehensive docstrings (Google/NumPy style)

Modules

  • py3dex.transforms - Fourier-Bessel decomposition algorithms
    • Spherical Bessel functions with multiple asymptotic regimes
    • Bessel root finding
    • Survey to almn decomposition
    • Map reconstruction
  • py3dex.cosmotools - Cosmological calculations
    • Distance calculations (comoving, angular diameter, luminosity)
    • Redshift-distance conversions
    • Growth factor
  • py3dex.fitstools - FITS file I/O
    • Read/write almn coefficients
    • Read/write HEALPix maps
    • Read/write power spectra
  • py3dex.survey - Survey data handling
    • Parameter file parsing
    • Coordinate system conversions
  • py3dex.stats - Statistical tools
    • Map generation
    • Basic statistics
  • py3dex.utils - Utility functions
    • Message printing
    • Array operations
    • Timing functions

Command-Line Tools

  • survey2almn - Main decomposition tool
  • almnfile2rmap - Map reconstruction
  • survey2almn_interactive - Interactive decomposition
  • compute_qln - Bessel root computation
  • Stubs for 4 additional tools (to be implemented)

Testing

  • 23 unit tests with pytest framework
  • Test coverage reporting (43% overall, 100% on test modules)
  • Validation script comparing Python vs SciPy/Fortran
  • Comprehensive test suite for mathematical functions

Documentation

  • README_PYTHON.md - Complete user guide
  • MIGRATION.md - Fortran→Python migration guide
  • CODE_REVIEW.md - Detailed code review
  • VALIDATION_RESULTS.md - Test results documentation
  • REVIEW_SUMMARY.md - Executive summary
  • TRANSLATION_SUMMARY.md - Translation details
  • Sphinx documentation setup
  • Updated main README with Python information

Performance Optimizations

  • Numba JIT compilation for performance-critical functions
  • NumPy vectorization throughout
  • Efficient HEALPix operations via healpy

Fixed

Critical Bug Fixes (found during validation)

  • Fixed uninitialized variable pp in laguerre() function
  • Fixed incorrect sign handling for negative arguments in bjl()
  • Fixed Bessel root finding to work with spherical Bessel functions
  • Fixed high-order Bessel function accuracy by implementing upward recursion

Changed

  • Package name: 3dexpy3dex (Python-specific)
  • Modern packaging: Autoconf/Make → pyproject.toml
  • Dependencies: Fortran/C++ libraries → NumPy/SciPy/healpy/astropy
  • Build system: Compilation required → Pure Python (pip installable)

Validated

  • ✅ All spherical Bessel functions (5 test cases, error < 1e-15)
  • ✅ Bessel roots (verified j_l(q_ln) ≈ 0, error < 1e-14)
  • ✅ Coefficient generation (k_ln, c_ln)
  • ✅ Cosmological distances (7 tests)
  • ✅ End-to-end decomposition pipeline
  • ⚠️ Direct Fortran comparison pending (library dependency issue)

Known Limitations

  • 4 CLI tools are stubs (not yet implemented)
  • survey2almn_simple uses healpy shortcuts (simplified vs Fortran)
  • Performance benchmarking incomplete (pending Fortran rebuild)
  • Test coverage 43% (target: 70%)

Dependencies

  • Python ≥ 3.8
  • NumPy ≥ 1.20
  • SciPy ≥ 1.7
  • healpy ≥ 1.15
  • astropy ≥ 5.0
  • numba ≥ 0.55 (optional, for performance)

Migration Notes

  • For users of original Fortran/C++ version:
    • API is similar but Pythonic
    • CLI tools have same interface
    • FITS file formats compatible
    • See MIGRATION.md for detailed guide

Acknowledgments

  • Original Fortran/C++ code by Boris Leistedt and François Lanusse
  • Python translation maintains mathematical fidelity to original
  • Validation against SciPy reference implementations

[Unreleased]

Planned for 2.0.0 (stable)

  • Complete stub CLI tool implementations
  • Full Fortran numerical comparison
  • Increased test coverage (>70%)
  • Performance benchmarking
  • Additional integration tests

Planned for 2.1.0

  • Implement optimized survey2almn_opt (ring-based algorithm)
  • MPI parallelization for large surveys
  • GPU acceleration (JAX/CuPy)
  • Additional statistical tools from Fortran version
  • Performance optimizations based on profiling

Version History

  • 2.0.0-beta1 (2026-02-18): Initial Python release with complete core functionality
  • 1.0 (2012): Original Fortran/C++ release