pub struct Window<const N: usize> {
pub win: [f32; N],
pub power: f32,
pub nenbw: f32,
pub overlap: usize,
}Expand description
Fields§
§win: [f32; N]§power: f32Mean squared
nenbw: f32Normalized effective noise bandwidth (in bins)
overlap: usizeOptimal overlap
Implementations§
Source§impl<const N: usize> Window<N>
impl<const N: usize> Window<N>
Sourcepub fn rectangular() -> Self
pub fn rectangular() -> Self
Rectangular window
Sourcepub fn hann() -> Self
pub fn hann() -> Self
Hann window
This is the “numerical” version of the window with period N, win[0] = win[N]
(conceptually), specifically win[0] != win[win.len() - 1].
Matplotlib’s matplotlib.mlab.window_hanning() (but not scipy.signal.get_window())
uses the symetric one of period N-1, with win[0] = win[N - 1] = 0
which looses a lot of useful properties (exact nenbw() and power() independent of N,
exact optimal overlap etc)
Trait Implementations§
impl<const N: usize> Copy for Window<N>
impl<const N: usize> StructuralPartialEq for Window<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for Window<N>
impl<const N: usize> RefUnwindSafe for Window<N>
impl<const N: usize> Send for Window<N>
impl<const N: usize> Sync for Window<N>
impl<const N: usize> Unpin for Window<N>
impl<const N: usize> UnwindSafe for Window<N>
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