ocmw.core.spectral module¶
Basic timeseries spectral analysis functions.
Reconstruct a times series from the frequency spectrum, with the option to separate out frequency dependent processes using a subset of the spectral components. |
|
Find the power of two the gives n or the next highest power of 2 beyond if n is not a power of 2. |
|
Generates a single-sided amplitude spectrum. |
Basic timeseries spectral analysis functions.
- ocmw.core.spectral.signal_from_fft(times, freq, components, spectrum)[source]¶
Reconstruct a times series from the frequency spectrum, with the option to separate out frequency dependent processes using a subset of the spectral components.
- Parameters:
times (numpy.array, float) – time stamps (in seconds) to reconstruct signal for.
freq (numpy.array, float) – bin frequencies (in Hz).
components (tuple, int) – set of frequency components to include in reconstruction.
spectrum (numpy.array, complex, float) – complex spectral data at defined frequencies.
- Returns:
signal (numpy.array, float) – reconstructed signal at the specifcied times.