Skip to main content

TofInstrument

Struct TofInstrument 

Source
pub struct TofInstrument {
Show 15 fields pub zero_us: f64, pub difc_us_per_angstrom: f64, pub difa_us_per_angstrom2: f64, pub difb_us_angstrom: f64, pub alpha_coefficient: f64, pub beta0_per_us: f64, pub beta1_angstrom4_per_us: f64, pub betaq_angstrom2_per_us: f64, pub sigma0_us2: f64, pub sigma1_us2_per_angstrom2: f64, pub sigma2_us2_per_angstrom4: f64, pub sigmaq_us2_per_angstrom: f64, pub x_us_per_angstrom: f64, pub y_us_per_angstrom2: f64, pub z_us: f64,
}
Expand description

TOF calibration and d-dependent profile coefficients in public units.

Fields§

§zero_us: f64

Additive time zero in microseconds.

§difc_us_per_angstrom: f64

Linear calibration coefficient in microseconds per ångström.

§difa_us_per_angstrom2: f64

Quadratic calibration coefficient in microseconds per ångström squared.

§difb_us_angstrom: f64

Reciprocal calibration coefficient in microsecond ångströms.

§alpha_coefficient: f64

Exponential-rise numerator; alpha = alpha_coefficient / d.

§beta0_per_us: f64

Constant exponential-decay rate term in inverse microseconds.

§beta1_angstrom4_per_us: f64

d^-4 exponential-decay coefficient.

§betaq_angstrom2_per_us: f64

d^-2 exponential-decay coefficient.

§sigma0_us2: f64

Constant Gaussian variance term in microseconds squared.

§sigma1_us2_per_angstrom2: f64

d^2 Gaussian variance coefficient.

§sigma2_us2_per_angstrom4: f64

d^4 Gaussian variance coefficient.

§sigmaq_us2_per_angstrom: f64

Linear-d Gaussian variance coefficient.

§x_us_per_angstrom: f64

Linear-d Lorentzian FWHM coefficient.

§y_us_per_angstrom2: f64

Quadratic-d Lorentzian FWHM coefficient.

§z_us: f64

Constant Lorentzian FWHM in microseconds.

Implementations§

Source§

impl TofInstrument

Source

pub fn validate(self) -> Result<(), TofError>

Validate finite coefficients and a positive linear calibration scale.

§Errors

Returns TofError for non-finite coefficients or non-positive linear calibration.

Trait Implementations§

Source§

impl Clone for TofInstrument

Source§

fn clone(&self) -> TofInstrument

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for TofInstrument

Source§

impl Debug for TofInstrument

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for TofInstrument

Source§

fn eq(&self, other: &TofInstrument) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TofInstrument

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.