pub struct SphericalLedArray {
pub angles: Vec<(f64, f64)>,
pub radius: f64,
pub center_offset: (f64, f64, f64),
pub orientation_radians: (f64, f64, f64),
pub angular_corrections: Option<Vec<(f64, f64)>>,
}Expand description
Fixed LEDs mounted on a spherical surface on the negative-z source side.
Each angle is (theta, phi) in radians. theta is the polar angle from
the positive propagation (z) axis and phi is the propagation azimuth
from positive x toward positive y. Physical source positions are the
opposite of those nominal propagation directions. The sphere pose is
applied as Rz * Ry * Rx.
Fields§
§angles: Vec<(f64, f64)>Nominal (theta, phi) LED positions in radians and natural source order.
radius: f64Positive nominal sphere radius in metres.
center_offset: (f64, f64, f64)Sphere-centre displacement (x, y, z) from the sample, in metres.
orientation_radians: (f64, f64, f64)Rigid mount rotation (rx, ry, rz) in radians.
angular_corrections: Option<Vec<(f64, f64)>>Optional per-LED (delta_theta, delta_phi) placement corrections.
Implementations§
Source§impl SphericalLedArray
impl SphericalLedArray
Sourcepub fn new(angles: Vec<(f64, f64)>, radius: f64) -> Self
pub fn new(angles: Vec<(f64, f64)>, radius: f64) -> Self
Creates a sphere from natural-order (theta, phi) radians and a radius in metres.
Sourcepub fn center_offset(self, offset: (f64, f64, f64)) -> Self
pub fn center_offset(self, offset: (f64, f64, f64)) -> Self
Sets the sphere-centre displacement (x, y, z) from the sample, in metres.
Sourcepub fn orientation_deg(self, degrees: (f64, f64, f64)) -> Self
pub fn orientation_deg(self, degrees: (f64, f64, f64)) -> Self
Sets extrinsic mount rotations (rx, ry, rz) in degrees, applied as Rz * Ry * Rx.
Sourcepub fn angular_corrections(self, corrections: Vec<(f64, f64)>) -> Self
pub fn angular_corrections(self, corrections: Vec<(f64, f64)>) -> Self
Sets one (delta_theta, delta_phi) correction in radians per natural-order LED.
Sourcepub fn source_count(&self) -> usize
pub fn source_count(&self) -> usize
Returns the number of fixed physical sources.
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validates angles, positive radius, finite pose, and placement corrections.
Sourcepub fn resolve(&self, optics: &Optics) -> Result<ResolvedSources>
pub fn resolve(&self, optics: &Optics) -> Result<ResolvedSources>
Resolves physical positions to source-to-sample directions and transverse vectors.
Trait Implementations§
Source§impl Clone for SphericalLedArray
impl Clone for SphericalLedArray
Source§fn clone(&self) -> SphericalLedArray
fn clone(&self) -> SphericalLedArray
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SphericalLedArray
impl Debug for SphericalLedArray
Source§impl<'de> Deserialize<'de> for SphericalLedArray
impl<'de> Deserialize<'de> for SphericalLedArray
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<SphericalLedArray> for SourceGeometry
impl From<SphericalLedArray> for SourceGeometry
Source§fn from(value: SphericalLedArray) -> Self
fn from(value: SphericalLedArray) -> Self
Source§impl PartialEq for SphericalLedArray
impl PartialEq for SphericalLedArray
Source§fn eq(&self, other: &SphericalLedArray) -> bool
fn eq(&self, other: &SphericalLedArray) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SphericalLedArray
impl Serialize for SphericalLedArray
impl StructuralPartialEq for SphericalLedArray
Auto Trait Implementations§
impl Freeze for SphericalLedArray
impl RefUnwindSafe for SphericalLedArray
impl Send for SphericalLedArray
impl Sync for SphericalLedArray
impl Unpin for SphericalLedArray
impl UnsafeUnpin for SphericalLedArray
impl UnwindSafe for SphericalLedArray
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more