Skip to main content

sim_lib_interference_solve/
observable.rs

1//! Scalar observations derived from one coherent phasor field.
2
3/// A scalar view of a coherent complex field.
4#[derive(Clone, Copy, Debug, PartialEq)]
5pub enum Observable {
6    /// Cartesian real component.
7    Real,
8    /// Cartesian imaginary component.
9    Imaginary,
10    /// Euclidean amplitude `hypot(real, imaginary)`.
11    Amplitude,
12    /// Wrapped phase in the half-open interval `[-pi, pi)`.
13    ///
14    /// Phase at or below the projection's amplitude floor is represented by a
15    /// masked sample rather than a number.
16    Phase,
17    /// Normalized `real * real + imaginary * imaginary` energy proxy.
18    ///
19    /// This is not physical intensity. Physical intensity requires a named
20    /// field and medium impedance, which the scalar model does not carry.
21    MagnitudeSquared,
22    /// Instantaneous field `Re{U * exp(-i * wt)}`.
23    ///
24    /// Under the crate's time convention this is
25    /// `real * cos(wt) + imaginary * sin(wt)`. At `wt == 0`, projection
26    /// returns the real component directly so equality is bit-exact.
27    Instant {
28        /// Angular time in radians.
29        wt: f64,
30    },
31}