pub struct LeBailPhase { /* private fields */ }Expand description
One fixed reflection phase whose integrated intensities are extracted.
Implementations§
Source§impl LeBailPhase
impl LeBailPhase
Sourcepub fn new(
phase_id: impl Into<String>,
name: impl Into<String>,
reflection_ids: Vec<String>,
hkl: Vec<[i32; 3]>,
d_spacing_angstrom: Vec<f64>,
two_theta_deg: Vec<f64>,
integrated_intensity: Vec<f64>,
scale: f64,
preserve_unobserved: Vec<bool>,
) -> Result<Self, LeBailError>
pub fn new( phase_id: impl Into<String>, name: impl Into<String>, reflection_ids: Vec<String>, hkl: Vec<[i32; 3]>, d_spacing_angstrom: Vec<f64>, two_theta_deg: Vec<f64>, integrated_intensity: Vec<f64>, scale: f64, preserve_unobserved: Vec<bool>, ) -> Result<Self, LeBailError>
Validate and own one ordered fixed-reflection phase.
preserve_unobserved marks generated reflections outside the currently
visible interval. Their checkpoint intensity is retained when their
finite profile support has no included samples. Pass an empty vector for
ordinary fixed reflection lists.
§Errors
Returns LeBailError::InvalidPhase for invalid identity, shape, or
numerical state.
Sourcepub fn from_lattice_domain(
phase_id: impl Into<String>,
name: impl Into<String>,
cell: UnitCell,
scale: f64,
reflection_domain: LatticeReflectionDomain,
) -> Result<Self, LeBailError>
pub fn from_lattice_domain( phase_id: impl Into<String>, name: impl Into<String>, cell: UnitCell, scale: f64, reflection_domain: LatticeReflectionDomain, ) -> Result<Self, LeBailError>
Generate and own a bounded dynamic-lattice phase.
§Errors
Returns LeBailError if the cell lies outside the domain, reflection
generation fails, or the resulting phase state is invalid.
Sourcepub fn reflection_ids(&self) -> &[String]
pub fn reflection_ids(&self) -> &[String]
Borrow reflection IDs in calculation order.
Sourcepub fn d_spacing_angstrom(&self) -> &[f64]
pub fn d_spacing_angstrom(&self) -> &[f64]
Borrow d-spacings in ångströms.
Sourcepub fn two_theta_deg(&self) -> &[f64]
pub fn two_theta_deg(&self) -> &[f64]
Borrow fixed reflection positions in degrees 2theta.
Sourcepub fn integrated_intensity(&self) -> &[f64]
pub fn integrated_intensity(&self) -> &[f64]
Borrow current integrated intensities.
Sourcepub fn with_integrated_intensities(
&self,
values: &[f64],
) -> Result<Self, LeBailError>
pub fn with_integrated_intensities( &self, values: &[f64], ) -> Result<Self, LeBailError>
Replace integrated intensities while preserving phase identity/geometry.
§Errors
Returns LeBailError for a shape mismatch, negative value, or
non-finite value.
Sourcepub fn preserve_unobserved(&self) -> &[bool]
pub fn preserve_unobserved(&self) -> &[bool]
Borrow the preserve-if-unobserved mask.
Sourcepub const fn cell(&self) -> Option<UnitCell>
pub const fn cell(&self) -> Option<UnitCell>
Return the current cell for a dynamic-lattice phase.
Sourcepub const fn reflection_domain(&self) -> Option<&LatticeReflectionDomain>
pub const fn reflection_domain(&self) -> Option<&LatticeReflectionDomain>
Borrow the guarded reflection domain for a dynamic-lattice phase.
Sourcepub fn regenerate_lattice_at_cell(
&self,
cell: UnitCell,
) -> Result<Self, LeBailError>
pub fn regenerate_lattice_at_cell( &self, cell: UnitCell, ) -> Result<Self, LeBailError>
Regenerate a dynamic phase at another accepted bounded cell.
Intensities transfer by stable reflection ID and new families use the domain’s declared initial intensity.
§Errors
Returns LeBailError for a fixed phase, out-of-bounds cell, or
reflection-generation failure.
Trait Implementations§
Source§impl Clone for LeBailPhase
impl Clone for LeBailPhase
Source§fn clone(&self) -> LeBailPhase
fn clone(&self) -> LeBailPhase
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 LeBailPhase
impl Debug for LeBailPhase
Source§impl PartialEq for LeBailPhase
impl PartialEq for LeBailPhase
impl StructuralPartialEq for LeBailPhase
Auto Trait Implementations§
impl Freeze for LeBailPhase
impl RefUnwindSafe for LeBailPhase
impl Send for LeBailPhase
impl Sync for LeBailPhase
impl Unpin for LeBailPhase
impl UnsafeUnpin for LeBailPhase
impl UnwindSafe for LeBailPhase
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.