Skip to main content

ShellChannelTable

Struct ShellChannelTable 

Source
pub struct ShellChannelTable { /* private fields */ }
Expand description

The energy-loss table of one inner-shell ionisation channel, with the identity of its shell.

The wrapped CrossSectionTable holds the channel’s inverse mean free path and the inverse CDF of its loss ω, built from that shell’s own optical ELF (crate::electron::inelastic::inner_shell); the wrapper adds the shell (Z, subshell), its binding energy B and the provenance of B (for example SubshellBindingTable::provenance). Built by crate::electron::inelastic::table::build_shell_channel_tables and consumed by crate::electron::transport::Transport::with_inner_shells.

§Invariants

  • Z >= 1; B finite and positive; a non-blank one-line binding provenance.
  • The table samples SamplingAxis::InelasticEnergyLoss.
  • Every stored loss is at least B: a shell contributes only above its edge (de Vera et al. 2022, eq. (2), the step Θ(E - B)), so the secondary energy ω - B is never negative. Since a loss is also at most the row energy, every row with a nonzero rate lies at an energy of at least B.

§File form

TOML: format_version (SHELL_CHANNEL_FORMAT_VERSION), z, subshell (the ENDF label, e.g. "K", "L3"), binding_energy_ev, binding_provenance, and a [table] holding the CrossSectionTable cache form (with its own format_version). The wrapper version is checked first, unknown keys are rejected, and the same checks as ShellChannelTable::new run on read.

Implementations§

Source§

impl ShellChannelTable

Source

pub fn new( z: u8, subshell: Subshell, binding_energy_ev: f64, binding_provenance: &str, table: CrossSectionTable, ) -> Result<Self, ElectronDataError>

A validated channel table: shell subshell of element z with binding energy binding_energy_ev (whose origin binding_provenance states) and its loss table. See the type docs for the invariants.

Source

pub fn z(&self) -> u8

Atomic number of the shell’s element.

Source

pub fn subshell(&self) -> Subshell

The subshell.

Source

pub fn binding_energy_ev(&self) -> f64

Binding energy B, eV.

Source

pub fn binding_provenance(&self) -> &str

Where B came from.

Source

pub fn table(&self) -> &CrossSectionTable

The channel’s loss table.

Source

pub fn format_version(&self) -> u32

Format version of the wrapper (SHELL_CHANNEL_FORMAT_VERSION).

Source

pub fn from_toml_str(text: &str) -> Result<Self, ElectronDataError>

Parse and validate the TOML file form.

Source

pub fn to_toml_string(&self) -> Result<String, ElectronDataError>

Serialize to the TOML file form.

Source

pub fn from_toml_file(path: impl AsRef<Path>) -> Result<Self, ElectronDataError>

Load a TOML file.

Source

pub fn write_toml_file( &self, path: impl AsRef<Path>, ) -> Result<(), ElectronDataError>

Write a TOML file.

Trait Implementations§

Source§

impl Clone for ShellChannelTable

Source§

fn clone(&self) -> ShellChannelTable

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ShellChannelTable

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ShellChannelTable

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&ShellChannelTable> for InnerShell

Source§

fn from(t: &ShellChannelTable) -> Self

The shell a stored channel table belongs to.

Source§

impl PartialEq for ShellChannelTable

Source§

fn eq(&self, other: &ShellChannelTable) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ShellChannelTable

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ShellChannelTable

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V