Skip to main content

Module utils

Module utils 

Source

Functions§

calculate_frequencies
Returns the frequency (in Hz) corresponding to each bin of a full (two-sided) DFT output.
calculate_one_sided_frequencies
Returns the n_total / 2 + 1 unique positive-frequency bins (0 Hz … Nyquist) for a real-valued DFT of n_total samples at sample_rate Hz.
find_dominant_frequencies
Finds the dominant frequencies in a Power Spectral Density (PSD) by looking for local peaks above a threshold.
generate_sine_wave
Generates a sine wave signal based on the specified frequency, sample rate, and duration.