Skip to main content

Region

Struct Region 

Source
pub struct Region {
    pub open_counts: Vec<f64>,
    pub sample_counts: Vec<f64>,
    pub open_live: Option<Vec<f64>>,
    pub sample_live: Option<Vec<f64>>,
    pub background: [Value; 5],
    pub pixels: f64,
    pub gamma_transmission: Value,
    pub capture_gammas: Value,
    pub in_scatter: Value,
    pub timing_offset_us: Value,
    pub material: Option<Material>,
}
Expand description

The counts of a set of pixels in both runs, its background and the material the beam crosses there.

Fields§

§open_counts: Vec<f64>

Raw counts of the open-beam run, one per bin.

§sample_counts: Vec<f64>

Raw counts of the sample run, one per bin.

§open_live: Option<Vec<f64>>

The fraction of the open-beam run’s counts arriving in each bin that the detector records, in (0, 1]; None records every one.

§sample_live: Option<Vec<f64>>

The fraction of the sample run’s counts arriving in each bin that the detector records, in (0, 1]; None records every one.

§background: [Value; 5]

[b0, b1, b2, d, f] of the background b(E) = b0 + b1/√E + b2·√E + d·exp(−f/√E): b0 and d dimensionless, b1 in √eV, b2 in 1/√eV and f in √eV, f 0 or more and the others any real number.

§pixels: f64

The region’s area in pixels, finite and positive.

§gamma_transmission: Value

The fraction of the time background that reaches the region’s pixels in the sample run through what is in front of them, within 0–1.

§capture_gammas: Value

ε, the share of the neutrons captured in the region’s sample whose gammas its pixels record, 0 or more: the sample run gains c_q·a·ε·φ·(1 − T)·Σ_m n_m σ_γm/D, the captures at the neutrons’ first collision, σ_γm each isotope’s capture cross section broadened like its total one, at the neutrons’ flight times.

§in_scatter: Value

Ω, the share of the neutrons scattered once in the region’s sample and leaving through its back face that its pixels record, 0 or more: the sample run gains c_q·a·Ω·φ·Σ_m n_m σ_sm·G_m, σ_sm each isotope’s elastic cross section broadened like its total one and G_m its share leaving through the back face (forward_yield), at the mean areal density and the neutrons’ flight times.

§timing_offset_us: Value

δt in µs, any real number: the region’s pixels record every count δt later than t0’s clock, a neutron of flight time u at t0 + δt + u and the time background δt late.

§material: Option<Material>

The material the beam crosses in the region; None for nothing, which transmits every neutron.

Trait Implementations§

Source§

impl Clone for Region

Source§

fn clone(&self) -> Region

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Region

Source§

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

Formats the value using the given formatter. Read more

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
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,