Line shapes¶
Every constructor takes the line centers and per-element (or shared) width parameters. All
shapes peak at 1; measure() normalizes them to unit area. cutoff is the half
width of the truncated support in the unit given.
constructor |
shape |
|
|---|---|---|
Gaussian |
σ (6) |
|
Lorentzian |
HWHM (100) |
|
Voigt, via the Faddeeva function |
Voigt HWHM (100) |
|
η·Lorentzian + (1 − η)·Gaussian |
HWHM (100) |
|
exp(−ln 2·|2t/w|ᵖ), optionally asymmetric |
HWHM per side (6) |
|
slit ⊗ Gaussian |
σ beyond the box edges (6) |
|
FTS line shape for an apodization |
1/(2·max OPD) (100) |
|
piecewise linear |
||
one tabulated shape (linear or PCHIP), stored once |
||
a tabulated shape per channel |
FTS apodizations: "none" (sinc), "triangle" (sinc²), "hann", "hamming" (Happ–Genzel),
"blackman", "blackman_harris", "norton_beer_weak", "norton_beer_medium",
"norton_beer_strong", or custom cosine-sum or Norton–Beer coefficients.
Channels with different shapes (a Gaussian here, a tabulated shape there) form one space with
concatenate(), so a whole instrument is still a single measure().
Accuracy against independent references¶
The Voigt profile uses Weideman’s rational approximation of the Faddeeva function (order 40), accurate to about \(3\times10^{-15}\) of the peak value:
from scipy.special import voigt_profile
t = np.linspace(-3, 3, 601)
v = rb.Space.voigts([0.0], sigma=0.3, gamma=0.1, cutoff=1e4).evaluate(t).toarray()[:, 0]
ref = voigt_profile(t, 0.3, 0.1) / voigt_profile(0.0, 0.3, 0.1)
print(f"max |difference| from scipy: {np.abs(v - ref).max():.1e}")
max |difference| from scipy: 6.7e-16