1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! X-ray & EUV Optics Module
//!
//! Provides simulation tools for X-ray and extreme ultraviolet (EUV) optics:
//!
//! - **Fresnel Zone Plates** (FZP), Compound Refractive Lenses (CRL), and
//! Kirkpatrick–Baez (KB) mirror systems for X-ray focusing.
//! - **Multilayer mirrors** for EUV (13.5 nm) and hard X-ray reflective optics.
//! - **Bragg diffraction** from crystal analysers, Darwin widths, and Johann
//! spectrometer geometry.
//! - **Synchrotron radiation** characteristics, undulator/wiggler insertion
//! devices, and free-electron laser (FEL) fundamentals.
//!
//! # Wavelength / energy conventions
//! All lengths are in metres (SI). Helper constants convert between photon
//! energy in keV and wavelength:
//! ```text
//! λ [m] = hc / E = 1.23984193e-9 / E[keV]
//! ```
pub use *;
pub use *;
pub use *;
pub use *;
// ─── Shared physical constants ─────────────────────────────────────────────
/// Speed of light in vacuum (m s⁻¹).
pub const C0: f64 = 2.997_924_58e8;
/// Planck constant (J s).
pub const H_PLANCK: f64 = 6.626_070_15e-34;
/// Electron rest energy (J): m_e c².
pub const ME_C2_J: f64 = 8.187_105_77e-14;
/// Classical electron radius (m).
pub const R_ELECTRON: f64 = 2.817_940_3e-15;
/// hc product (m·J) used for λ–E conversion.
pub const HC_J_M: f64 = H_PLANCK * C0; // ≈ 1.98644568e-25
/// Convert photon energy in keV to wavelength in metres.
/// Convert wavelength in metres to photon energy in keV.