pub struct GaussianPsf {
pub total_ev: f64,
pub alpha_m: f64,
pub beta_m: f64,
pub eta: f64,
pub gamma_m: Option<f64>,
pub nu: Option<f64>,
}Expand description
A double- or triple-Gaussian PSF scaled to the energy total_ev:
E f(r), eV/m² (see the module docs). The
triple form has gamma_m and nu; the double form has neither.
Fields§
§total_ev: f64The energy E the PSF integrates to, eV.
alpha_m: f64Forward-scattering width α, m.
beta_m: f64Backscattering width β, m.
eta: f64Ratio η of the β term to the α term.
gamma_m: Option<f64>Third width γ, m (triple Gaussian only).
nu: Option<f64>Ratio ν of the γ term to the α term (triple Gaussian only).
Implementations§
Source§impl GaussianPsf
impl GaussianPsf
Sourcepub fn double(
total_ev: f64,
alpha_m: f64,
beta_m: f64,
eta: f64,
) -> Result<Self, PsfError>
pub fn double( total_ev: f64, alpha_m: f64, beta_m: f64, eta: f64, ) -> Result<Self, PsfError>
Double Gaussian (E, α, β, η).
Sourcepub fn triple(
total_ev: f64,
alpha_m: f64,
beta_m: f64,
eta: f64,
gamma_m: f64,
nu: f64,
) -> Result<Self, PsfError>
pub fn triple( total_ev: f64, alpha_m: f64, beta_m: f64, eta: f64, gamma_m: f64, nu: f64, ) -> Result<Self, PsfError>
Triple Gaussian (E, α, β, η, γ, ν).
Sourcepub fn validate(&self) -> Result<(), PsfError>
pub fn validate(&self) -> Result<(), PsfError>
Checks that every parameter is positive and finite and that gamma_m
and nu are both set or both unset.
Sourcepub fn values(&self) -> Vec<f64>
pub fn values(&self) -> Vec<f64>
Parameters in PsfModel::parameter_names order.
Sourcepub fn normalized_per_m2(&self, r_m: f64) -> f64
pub fn normalized_per_m2(&self, r_m: f64) -> f64
The normalised PSF f(r), 1/m².
Sourcepub fn density_ev_per_m2(&self, r_m: f64) -> f64
pub fn density_ev_per_m2(&self, r_m: f64) -> f64
The areal energy density E f(r), eV/m².
Sourcepub fn annulus_energy_ev(&self, a_m: f64, b_m: f64) -> f64
pub fn annulus_energy_ev(&self, a_m: f64, b_m: f64) -> f64
Energy in the annulus [a, b), eV, by the closed-form integral of
the module docs.
Trait Implementations§
Source§impl Clone for GaussianPsf
impl Clone for GaussianPsf
Source§fn clone(&self) -> GaussianPsf
fn clone(&self) -> GaussianPsf
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GaussianPsf
Source§impl Debug for GaussianPsf
impl Debug for GaussianPsf
Source§impl<'de> Deserialize<'de> for GaussianPsf
impl<'de> Deserialize<'de> for GaussianPsf
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 PartialEq for GaussianPsf
impl PartialEq for GaussianPsf
Source§impl Serialize for GaussianPsf
impl Serialize for GaussianPsf
impl StructuralPartialEq for GaussianPsf
Auto Trait Implementations§
impl Freeze for GaussianPsf
impl RefUnwindSafe for GaussianPsf
impl Send for GaussianPsf
impl Sync for GaussianPsf
impl Unpin for GaussianPsf
impl UnsafeUnpin for GaussianPsf
impl UnwindSafe for GaussianPsf
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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