pub struct DetectorPulse { /* private fields */ }Expand description
An Ikeda–Carpenter pulse in detector time: its laws, the energies they hold over, and the number of samples across its prompt core used to find its rise.
Implementations§
Source§impl DetectorPulse
impl DetectorPulse
Sourcepub fn new(
params: IkedaCarpenterParams,
energy_span_ev: (f64, f64),
n_tau: usize,
) -> Result<Self, ResolutionParseError>
pub fn new( params: IkedaCarpenterParams, energy_span_ev: (f64, f64), n_tau: usize, ) -> Result<Self, ResolutionParseError>
The pulse with laws params over energy_span_ev, its rise found on
n_tau samples across the prompt core.
§Errors
ResolutionParseError::InvalidFormat unless 0 < low < high are
finite, n_tau is at least 8, the triangle’s FWHM is finite and 0 or
more, the pulse has no Gaussian burst, a detector tail has its
fraction within 0–1 and its decay from 1e-9 to 1e9 µs, and the
laws are valid at both ends of the span: α and β finite and at
least 1e-9 µs⁻¹, R within 0–1.
Sourcepub fn params(&self) -> &IkedaCarpenterParams
pub fn params(&self) -> &IkedaCarpenterParams
The pulse’s laws.
Sourcepub fn energy_span_ev(&self) -> (f64, f64)
pub fn energy_span_ev(&self) -> (f64, f64)
(low, high), the energies in eV the laws hold over.
Sourcepub fn rise_us(&self, energy_ev: f64) -> Result<f64, ResolutionParseError>
pub fn rise_us(&self, energy_ev: f64) -> Result<f64, ResolutionParseError>
The time in µs from the first sample of the pulse at energy_ev to
its peak.
§Errors
ResolutionParseError::InvalidFormat when energy_ev is not
positive and finite, a law is singular or out of range there, or the
pulse has a Gaussian burst.
Trait Implementations§
Source§impl Clone for DetectorPulse
impl Clone for DetectorPulse
Source§fn clone(&self) -> DetectorPulse
fn clone(&self) -> DetectorPulse
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 DetectorPulse
impl RefUnwindSafe for DetectorPulse
impl Send for DetectorPulse
impl Sync for DetectorPulse
impl Unpin for DetectorPulse
impl UnsafeUnpin for DetectorPulse
impl UnwindSafe for DetectorPulse
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