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
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2026 Vallés Puig, Ramon
//! # Interpolation policy types for sampled spectra
//!
//! ## Scientific scope
//!
//! Selects how a [`crate::spectra::SampledSpectrum`] evaluates `y(x)`
//! between adjacent samples. Synthetic photometry and atmospheric
//! transmission codes converge on piecewise-linear interpolation as the
//! conservative default — it preserves monotonic regions, has no
//! ringing, and matches the reference behaviour of `numpy.interp` and
//! `scipy.interpolate.interp1d(kind="linear")`. The other variants in
//! the enum are reserved for future implementations and currently
//! reject at construction time.
//!
//! ## Technical scope
//!
//! - [`Interpolation`] enum with variants `Linear` (implemented),
//! `Nearest`, `PiecewiseConstantLeft`, `PiecewiseConstantRight`,
//! `CubicSpline` (reserved).
//! - [`OutOfRange`] re-exported from [`crate::interp`] so the two
//! policies can be referenced from a single import path.
//!
//! ## References
//!
//! - NumPy developers. *numpy.interp* documentation
//! (linear interpolation reference).
//! - SciPy developers. *scipy.interpolate.interp1d* documentation.
pub use crateOutOfRange;
/// How to evaluate `y(x)` between samples.
///
/// Only [`Interpolation::Linear`] is implemented today; the other variants are
/// reserved for future work and will be hard errors at construction time when
/// passed.