pub enum Taper {
Rectangular,
Hamming,
Hann,
Blackman,
}Expand description
A window function applied to samples before the forward transform.
Every taper trades main-lobe width against sidelobe height. A rectangular taper is no taper at all: it keeps amplitude exact for a tone that lands on a bin and leaks badly for one that does not.
The forward transform divides by this taper’s coherent gain, so a tone’s recovered amplitude is the tone’s amplitude whichever taper measured it.
Variants§
Rectangular
No shaping: exact on-bin amplitude, worst leakage off it.
Hamming
Hamming — a lower first sidelobe than Hann at a higher noise floor.
Hann
Hann, once spelled Hanning — the general-purpose choice, zero at both ends.
Blackman
Blackman — the lowest sidelobes here, and the widest main lobe.
Implementations§
Trait Implementations§
impl Copy for Taper
impl Eq for Taper
impl StructuralPartialEq for Taper
Auto Trait Implementations§
impl Freeze for Taper
impl RefUnwindSafe for Taper
impl Send for Taper
impl Sync for Taper
impl Unpin for Taper
impl UnsafeUnpin for Taper
impl UnwindSafe for Taper
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