Repository navigation
v0.7.0
Breaking Changes
calculate_xray_propertiesnow returnsVector{XRayResult}instead ofDict{String, XRayResult}. Use index-based access (results[1]) instead of key-based (results["SiO2"]). This preserves duplicate formulas with different densities.- Batch validation is strict: all formulas are checked upfront and invalid ones are listed in a single
ArgumentErrorbefore any computation begins. calculate_single_material_propertiesnow sorts energies ascending, matching batch API behavior.
Added
- Recursive descent formula parser supporting parenthesized groups:
Ca(OH)2,Ca3(PO4)2,Fe((OH)2)3 - Comprehensive debug logging: 27
@debuglog points across 6 categories (:parser,:cache,:io,:validation,:computation,:batch). Enable withENV["JULIA_DEBUG"] = "XRayLabTool". - Input validation for NaN/Inf energies and non-positive/non-finite densities
- ASCII validation in formula parser and element interpolator loader
- Thread-safety test for concurrent cache access
- Negative delta guard:
critical_anglereturns 0.0 instead ofDomainErrornear absorption edges
Fixed
- Thread-safe cache reads: replaced lock-free
Dict.get()with locked reads (Julia'sDictis not safe for concurrent read + write) - Physical constants updated to CODATA 2018 / 2019 SI exact values (~2e-7 relative change)
- Formula parser no longer silently produces wrong results for parenthesized formulas
Performance
- Lock-free frozen cache reads after batch validation (10% hot-path speedup)
- Eliminated redundant
sortandVectorcopy in batch path - Lazy
@debugstring evaluation (zero overhead when logging disabled) - Named unit-conversion constants replace magic numbers
- Single-material allocations reduced 19% (23.5KB → 19.1KB)
Internal
- Extracted
_compute_derived_quantitiesfunction from 159-line calculation function - Removed 3 untested deprecated internal wrappers
- Documenter.jl documentation site with API reference, physics background, and migration guide
- 419 tests (up from 357 in v0.6)
Full Changelog: v0.5.0...v0.7.0
Migration Guide: https://imewei.github.io/XRayLabTool.jl/v0.7.0/migration/