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;Bfinite 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ω - Bis never negative. Since a loss is also at most the row energy, every row with a nonzero rate lies at an energy of at leastB.
§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
impl ShellChannelTable
Sourcepub fn new(
z: u8,
subshell: Subshell,
binding_energy_ev: f64,
binding_provenance: &str,
table: CrossSectionTable,
) -> Result<Self, ElectronDataError>
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.
Sourcepub fn binding_energy_ev(&self) -> f64
pub fn binding_energy_ev(&self) -> f64
Binding energy B, eV.
Sourcepub fn binding_provenance(&self) -> &str
pub fn binding_provenance(&self) -> &str
Where B came from.
Sourcepub fn table(&self) -> &CrossSectionTable
pub fn table(&self) -> &CrossSectionTable
The channel’s loss table.
Sourcepub fn format_version(&self) -> u32
pub fn format_version(&self) -> u32
Format version of the wrapper (SHELL_CHANNEL_FORMAT_VERSION).
Sourcepub fn from_toml_str(text: &str) -> Result<Self, ElectronDataError>
pub fn from_toml_str(text: &str) -> Result<Self, ElectronDataError>
Parse and validate the TOML file form.
Sourcepub fn to_toml_string(&self) -> Result<String, ElectronDataError>
pub fn to_toml_string(&self) -> Result<String, ElectronDataError>
Serialize to the TOML file form.
Sourcepub fn from_toml_file(path: impl AsRef<Path>) -> Result<Self, ElectronDataError>
pub fn from_toml_file(path: impl AsRef<Path>) -> Result<Self, ElectronDataError>
Load a TOML file.
Sourcepub fn write_toml_file(
&self,
path: impl AsRef<Path>,
) -> Result<(), ElectronDataError>
pub fn write_toml_file( &self, path: impl AsRef<Path>, ) -> Result<(), ElectronDataError>
Write a TOML file.
Trait Implementations§
Source§impl Clone for ShellChannelTable
impl Clone for ShellChannelTable
Source§fn clone(&self) -> ShellChannelTable
fn clone(&self) -> ShellChannelTable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ShellChannelTable
impl Debug for ShellChannelTable
Source§impl<'de> Deserialize<'de> for ShellChannelTable
impl<'de> Deserialize<'de> for ShellChannelTable
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 From<&ShellChannelTable> for InnerShell
impl From<&ShellChannelTable> for InnerShell
Source§fn from(t: &ShellChannelTable) -> Self
fn from(t: &ShellChannelTable) -> Self
The shell a stored channel table belongs to.
Source§impl PartialEq for ShellChannelTable
impl PartialEq for ShellChannelTable
Source§impl Serialize for ShellChannelTable
impl Serialize for ShellChannelTable
impl StructuralPartialEq for ShellChannelTable
Auto Trait Implementations§
impl Freeze for ShellChannelTable
impl RefUnwindSafe for ShellChannelTable
impl Send for ShellChannelTable
impl Sync for ShellChannelTable
impl Unpin for ShellChannelTable
impl UnsafeUnpin for ShellChannelTable
impl UnwindSafe for ShellChannelTable
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