pub struct WorkingGridLayout {
pub energies: Vec<f64>,
pub data_indices: Vec<usize>,
}Expand description
The working energy grid used for broadening, plus the map back to the data grid.
Doppler, Beer-Lambert and resolution run on the working grid, the data
grid extended by the kernel’s reach plus a Gaussian’s intermediate and
fine-structure points, and the data points are extracted last. A
crate::resolution::ResolutionPlan must be built on Self::energies.
Fields§
§energies: Vec<f64>Working-grid energies (eV, ascending). Equals the input data grid when no auxiliary grid was built.
data_indices: Vec<usize>data_indices[i] is the index of data energy i within
Self::energies. Identity (0..n) when no auxiliary grid.
Implementations§
Source§impl WorkingGridLayout
impl WorkingGridLayout
pub fn identity(energies: &[f64]) -> Self
Sourcepub fn is_identity(&self) -> bool
pub fn is_identity(&self) -> bool
true when the working grid is the data grid itself (no auxiliary
extension was built). In that case Self::extract is a no-op clone.
Sourcepub fn extract(&self, working: &[f64]) -> Vec<f64>
pub fn extract(&self, working: &[f64]) -> Vec<f64>
Extract the data-grid points from a working-grid spectrum.
pub fn extract_owned(&self, working: Vec<f64>) -> Vec<f64>
Trait Implementations§
Source§impl Clone for WorkingGridLayout
impl Clone for WorkingGridLayout
Source§fn clone(&self) -> WorkingGridLayout
fn clone(&self) -> WorkingGridLayout
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for WorkingGridLayout
impl RefUnwindSafe for WorkingGridLayout
impl Send for WorkingGridLayout
impl Sync for WorkingGridLayout
impl Unpin for WorkingGridLayout
impl UnsafeUnpin for WorkingGridLayout
impl UnwindSafe for WorkingGridLayout
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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