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
59
60
61
62
63
64
65
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright (C) 2026 Vallés Puig, Ramon
//! Sampled-spectrum container, interpolation, integration, and loaders.
//!
//! ## Scientific scope
//!
//! Sampled spectra represent continuous optical functions at discrete
//! wavelength (or frequency) samples: passbands, source spectra, atmospheric
//! transmittance curves, and phase function tables.
//!
//! ## Technical scope
//!
//! [`SampledSpectrum<X, Y>`] stores axis and value data as `Box<[f64]>` slices
//! for allocation-free evaluation. Five interpolation modes are supported via
//! [`Interpolation`]. Typed trapezoidal integration is available via the
//! methods on `SampledSpectrum`; raw kernels are re-exported from [`integrate`].
//!
//! # References
//!
//! - Atkinson, K. E. (1989). *An Introduction to Numerical Analysis*,
//! 2nd ed., §5.2 (composite trapezoidal rule). John Wiley & Sons.
pub use crateOutOfRange;
pub use SpectrumError;
pub use SampledSpectrum;
/// Interpolation mode for sampled spectra.
///
/// # Examples
///
/// ```rust
/// use optica::spectrum::Interpolation;
///
/// let mode = Interpolation::Linear;
/// assert!(matches!(mode, Interpolation::Linear));
/// ```