sage.data.waveform.taper
Filename : taper.py Description : Short description of the file
Created on 2026-02-08 00:45:34
__author__ = Narenraju Nagarajan __copyright__ = Copyright 2026, ProjectName __license__ = MIT Licence __version__ = 0.0.1 __maintainer__ = Narenraju Nagarajan __affiliation__ = N/A __email__ = N/A __status__ = [‘inProgress’, ‘Archived’, ‘inUsage’, ‘Debugging’]
GitHub Repository: NULL
Documentation: NULL
Functions
|
Smooth low-frequency roll-on taper in the frequency domain. |
|
Smooth high-frequency roll-off taper in the frequency domain. |
|
Combined low- and high-frequency band-pass taper. |
Module Contents
- fd_low_freq_taper(f, f_min, df, width_bins)[source]
Smooth low-frequency roll-on taper in the frequency domain.
Returns 0 below
f_min, smoothly rises to 1 overwidth_binsfrequency bins, and stays 1 above that range.- Parameters:
f (torch.Tensor) – Frequency array (Hz).
f_min (float) – Frequency at which the taper starts rising.
df (float) – Frequency bin spacing (Hz).
width_bins (int) – Number of bins over which the taper rises from 0 to 1.
- Returns:
Multiplicative taper weights, same shape as
f.- Return type:
- fd_high_freq_taper(f, f_cut, df, width_bins)[source]
Smooth high-frequency roll-off taper in the frequency domain.
Returns 1 below
f_cut - width_bins*df, smoothly falls to 0 overwidth_binsbins, and stays 0 abovef_cut.- Parameters:
f (torch.Tensor) – Frequency array (Hz).
f_cut (float) – Frequency at which the taper completes its roll-off.
df (float) – Frequency bin spacing (Hz).
width_bins (int) – Number of bins over which the taper falls from 1 to 0.
- Returns:
Multiplicative taper weights, same shape as
f.- Return type:
- fd_taper(f, f_min, f_cut, df, low_width=64, high_width=64)[source]
Combined low- and high-frequency band-pass taper.
Multiplies a low-frequency roll-on and a high-frequency roll-off to produce a smooth band-pass window that is 0 outside
[f_min, f_cut]and 1 in the interior of that band.- Parameters:
f (torch.Tensor) – Frequency array (Hz), shape
(B, F)or(F,).f_min (float) – Lower frequency edge (Hz).
f_cut (float) – Upper frequency cutoff (Hz).
df (float) – Frequency bin spacing (Hz).
low_width (int) – Taper width at the low-frequency edge (default 64 bins).
high_width (int) – Taper width at the high-frequency edge (default 64 bins).
- Returns:
Multiplicative taper weights, same shape as
f.- Return type: