pub enum PaddingStrategy {
Zero,
CloneChannel(String),
CloneNearest,
InterpWeighted {
k: usize,
},
Mirror,
MeanRef,
NoPadding,
}Expand description
How to synthesise EEG channels that are missing from the CSV.
Variants§
Zero
Fill the missing channel with zeros.
Its scalp position is taken from position_overrides, then the
channel-position database, then the centroid of existing channels.
CloneChannel(String)
Clone the data from a specific named channel.
Position of the new channel: position_overrides[missing] →
database lookup of the missing channel name → centroid.
CloneNearest
Clone the data from whichever loaded channel is nearest (by Euclidean
distance) to the missing channel’s known position.
Position of the new channel: position_overrides[missing] →
database lookup of the missing channel name → centroid.
InterpWeighted
Synthesise by inverse-distance–weighted averaging of the k nearest
real channels. Uses all real channels when k ≥ number of real
channels. This is a simple form of scalp-surface interpolation.
Position: same as CloneNearest.
Mirror
Copy the signal of the nearest real channel on the opposite hemisphere (the target channel’s X coordinate is negated to find the “mirror” point, then the closest real channel to that point is used). Useful for symmetric montages where the contralateral homologue is the best available substitute. Position: database → centroid.
MeanRef
Fill with the per-sample mean across all real channels. This is equivalent to injecting the common-average-reference (CAR) signal, which is the least-informative but spectrally neutral choice. Position: database → centroid.
NoPadding
No padding — channels that are absent from the CSV are silently dropped from the output instead of being synthesised.
The returned data will have fewer channels than target_channels when
any targets are missing. The encoder handles variable-length inputs
natively, so the resulting InputBatch is
fully valid.
Trait Implementations§
Source§impl Clone for PaddingStrategy
impl Clone for PaddingStrategy
Source§fn clone(&self) -> PaddingStrategy
fn clone(&self) -> PaddingStrategy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PaddingStrategy
impl Debug for PaddingStrategy
Auto Trait Implementations§
impl Freeze for PaddingStrategy
impl RefUnwindSafe for PaddingStrategy
impl Send for PaddingStrategy
impl Sync for PaddingStrategy
impl Unpin for PaddingStrategy
impl UnsafeUnpin for PaddingStrategy
impl UnwindSafe for PaddingStrategy
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,
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