Skip to content

Releases: imewei/XRayLabTool.jl

v0.7.1

Choose a tag to compare

@imewei imewei released this 29 Mar 02:58

Patch release with performance improvements, bug fixes, and code cleanup.

Fixed

  • deploydocs repo URL and canonical link now match actual GitHub repo name
  • Race condition in clear_caches! where frozen flag was cleared before dicts were emptied
  • @debug keyword args use lazy closures to avoid eager evaluation when logging disabled

Performance

  • Lock-free frozen cache reads after batch validation (~10% hot-path speedup)
  • issorted guard avoids redundant sort allocation in batch path
  • Eliminated redundant Vector{XRayResult} copy in batch return
  • Single-material allocations reduced 19% (23.5KB → 19.1KB)

Changed

  • Extracted _compute_derived_quantities for readability
  • Named unit-conversion constants replace magic numbers
  • Removed 3 untested deprecated internal wrappers and redundant format script
  • 419 tests

Full Changelog: v0.7.0...v0.7.1

Docs: https://imewei.github.io/XRayLabTool/stable/

v0.7.0

Choose a tag to compare

@imewei imewei released this 29 Mar 02:49

Breaking Changes

  • calculate_xray_properties now returns Vector{XRayResult} instead of Dict{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 ArgumentError before any computation begins.
  • calculate_single_material_properties now 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 @debug log points across 6 categories (:parser, :cache, :io, :validation, :computation, :batch). Enable with ENV["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_angle returns 0.0 instead of DomainError near absorption edges

Fixed

  • Thread-safe cache reads: replaced lock-free Dict.get() with locked reads (Julia's Dict is 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 sort and Vector copy in batch path
  • Lazy @debug string 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_quantities function 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/

v0.5.0

Choose a tag to compare

@imewei imewei released this 14 Aug 22:03
80f067a
Merge pull request #2 from imewei/refactor/readability-api-renames

Refactor/readability api renames

v0.4.1

Choose a tag to compare

@imewei imewei released this 12 Aug 22:55
Release v0.4.1

v0.4.0

Choose a tag to compare

@imewei imewei released this 02 Aug 04:17
v0.4.0

v0.3.2

Choose a tag to compare

@imewei imewei released this 18 Jul 22:13
dd4eb21
v0.3.2