pub struct RotatingLedArc {
pub led_thetas: Vec<f64>,
pub rotation_angles: Vec<f64>,
pub radius: f64,
pub axis_origin_offset: (f64, f64, f64),
pub axis_tilt_radians: (f64, f64),
pub led_angular_corrections: Option<Vec<(f64, f64)>>,
pub led_radial_offsets: Option<Vec<f64>>,
pub rotation_zero_radians: f64,
pub rotation_scale: f64,
pub rotation_backlash_radians: f64,
}Expand description
A quarter-circle LED arc rotated about an axis nominally collinear with the optical axis.
Every LED is compiled at every commanded rotation angle. Sources are
ordered rotation-major and then by led_thetas. The nominal arm lies in the
x-z plane, with LED polar positions measured from positive z.
Fields§
§led_thetas: Vec<f64>Nominal LED polar positions along the quarter-circle arm, in radians.
rotation_angles: Vec<f64>Commanded arm azimuths in physical movement order, in radians.
radius: f64Positive nominal arc radius in metres.
axis_origin_offset: (f64, f64, f64)Point on the rotation axis relative to the sample, in metres.
axis_tilt_radians: (f64, f64)Rotation-axis tilt (rx, ry) away from the optical axis, in radians.
led_angular_corrections: Option<Vec<(f64, f64)>>Per-LED (delta_theta, delta_phi) mounting corrections.
led_radial_offsets: Option<Vec<f64>>Per-LED radial corrections to the nominal arm radius, in metres.
rotation_zero_radians: f64Additive rotation-encoder zero offset in radians.
rotation_scale: f64Positive dimensionless rotation-encoder scale.
rotation_backlash_radians: f64Total separation between increasing and decreasing rotation branches.
Implementations§
Source§impl RotatingLedArc
impl RotatingLedArc
Sourcepub fn new(led_thetas: Vec<f64>, rotation_angles: Vec<f64>, radius: f64) -> Self
pub fn new(led_thetas: Vec<f64>, rotation_angles: Vec<f64>, radius: f64) -> Self
Creates an arc from LED polar angles and movement-order rotations in radians, with a positive radius in metres.
Sourcepub fn axis_origin_offset(self, offset: (f64, f64, f64)) -> Self
pub fn axis_origin_offset(self, offset: (f64, f64, f64)) -> Self
Sets a point on the rotation axis (x, y, z) relative to the sample, in metres.
Sourcepub fn axis_tilt_deg(self, x: f64, y: f64) -> Self
pub fn axis_tilt_deg(self, x: f64, y: f64) -> Self
Sets extrinsic x and y tilts of the rotation axis in degrees.
Sourcepub fn led_angular_corrections(self, corrections: Vec<(f64, f64)>) -> Self
pub fn led_angular_corrections(self, corrections: Vec<(f64, f64)>) -> Self
Sets per-LED (delta_theta, delta_phi) mounting corrections in radians.
Sourcepub fn led_radial_offsets(self, offsets: Vec<f64>) -> Self
pub fn led_radial_offsets(self, offsets: Vec<f64>) -> Self
Sets per-LED radial corrections in metres.
Sourcepub fn rotation_encoder_zero_deg(self, degrees: f64) -> Self
pub fn rotation_encoder_zero_deg(self, degrees: f64) -> Self
Sets the additive rotation-encoder zero offset in degrees.
Sourcepub fn rotation_encoder_scale(self, scale: f64) -> Self
pub fn rotation_encoder_scale(self, scale: f64) -> Self
Sets the positive dimensionless rotation-encoder scale.
Sourcepub fn rotation_backlash_deg(self, degrees: f64) -> Self
pub fn rotation_backlash_deg(self, degrees: f64) -> Self
Sets total separation between increasing and decreasing rotation branches in degrees.
Sourcepub fn source_count(&self) -> usize
pub fn source_count(&self) -> usize
Returns the rotation-major physical source count.
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validates angular domains, positive radius and scale, finite pose and encoder calibration, per-LED correction lengths, optional wavelength, and gains.
Sourcepub fn resolve(&self, optics: &Optics) -> Result<ResolvedSources>
pub fn resolve(&self, optics: &Optics) -> Result<ResolvedSources>
Resolves rotation-major physical positions and transverse vectors.
Trait Implementations§
Source§impl Clone for RotatingLedArc
impl Clone for RotatingLedArc
Source§fn clone(&self) -> RotatingLedArc
fn clone(&self) -> RotatingLedArc
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 RotatingLedArc
impl Debug for RotatingLedArc
Source§impl<'de> Deserialize<'de> for RotatingLedArc
impl<'de> Deserialize<'de> for RotatingLedArc
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<RotatingLedArc> for SourceGeometry
impl From<RotatingLedArc> for SourceGeometry
Source§fn from(value: RotatingLedArc) -> Self
fn from(value: RotatingLedArc) -> Self
Source§impl PartialEq for RotatingLedArc
impl PartialEq for RotatingLedArc
Source§fn eq(&self, other: &RotatingLedArc) -> bool
fn eq(&self, other: &RotatingLedArc) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RotatingLedArc
impl Serialize for RotatingLedArc
impl StructuralPartialEq for RotatingLedArc
Auto Trait Implementations§
impl Freeze for RotatingLedArc
impl RefUnwindSafe for RotatingLedArc
impl Send for RotatingLedArc
impl Sync for RotatingLedArc
impl Unpin for RotatingLedArc
impl UnsafeUnpin for RotatingLedArc
impl UnwindSafe for RotatingLedArc
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