pub struct Decomposition { /* private fields */ }Expand description
Modes laid out as mode × channel × sample, ordered by ascending centre frequency.
Implementations§
Source§impl Decomposition
impl Decomposition
pub fn new( modes: Array3<f64>, centre_frequencies_hz: Vec<f64>, sampling_rate: SamplingRate, labels: Vec<String>, aligned_across_channels: bool, ) -> Result<Self, MethodError>
Sourcepub fn per_channel(
modes: Array3<f64>,
channel_centre_frequencies_hz: Array2<f64>,
sampling_rate: SamplingRate,
labels: Vec<String>,
) -> Result<Self, MethodError>
pub fn per_channel( modes: Array3<f64>, channel_centre_frequencies_hz: Array2<f64>, sampling_rate: SamplingRate, labels: Vec<String>, ) -> Result<Self, MethodError>
Modes from a method that decomposes each channel on its own (VMD, EMD). Mode k need not mean the same oscillation in every channel, so the decomposition is not aligned. Each mode’s centre frequency is the median of its channels’ finite values; NaN marks a channel without that mode.
Sourcepub fn with_channel_centre_frequencies(
self,
frequencies_hz: Array2<f64>,
) -> Result<Self, MethodError>
pub fn with_channel_centre_frequencies( self, frequencies_hz: Array2<f64>, ) -> Result<Self, MethodError>
Attaches per-channel centre frequencies (mode × channel).
Sourcepub fn channel_centre_frequencies_hz(&self) -> Option<ArrayView2<'_, f64>>
pub fn channel_centre_frequencies_hz(&self) -> Option<ArrayView2<'_, f64>>
Mode × channel centre frequencies, when the method gives them per channel.
pub fn modes(&self) -> ArrayView3<'_, f64>
pub fn mode(&self, index: usize) -> ArrayView2<'_, f64>
pub fn centre_frequencies_hz(&self) -> &[f64]
pub fn sampling_rate(&self) -> SamplingRate
pub fn labels(&self) -> &[String]
Sourcepub fn aligned_across_channels(&self) -> bool
pub fn aligned_across_channels(&self) -> bool
True when mode k means the same oscillation in every channel.
pub fn n_modes(&self) -> usize
Sourcepub fn reconstruct(
&self,
modes: &[usize],
) -> Result<MultichannelSeries, MethodError>
pub fn reconstruct( &self, modes: &[usize], ) -> Result<MultichannelSeries, MethodError>
Sums the chosen modes back into a signal, for example to keep one frequency band.
Trait Implementations§
Source§impl Clone for Decomposition
impl Clone for Decomposition
Source§fn clone(&self) -> Decomposition
fn clone(&self) -> Decomposition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Decomposition
impl Debug for Decomposition
Source§impl PartialEq for Decomposition
impl PartialEq for Decomposition
impl StructuralPartialEq for Decomposition
Auto Trait Implementations§
impl Freeze for Decomposition
impl RefUnwindSafe for Decomposition
impl Send for Decomposition
impl Sync for Decomposition
impl Unpin for Decomposition
impl UnwindSafe for Decomposition
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
Mutably borrows from an owned value. Read more