|
libtfr
Multi-taper time-frequency reassignment spectrograms
|
The libtfrspec library computes multi-tapered conventional and time-frequency reassignment spectrograms from real-valued time series. Time-frequency reassignment is a technique for sharpening spectrographic representations of complex time-varying processes. See README for more details on the algorithms used.
Transforms are started by initializing an mfft structure with the size of the transform and the tapering functions to be used. Transforms using DPSS and Hermite tapers can be initialized with specialized functions:
After initializing the transform object, it can be used to perform any number of operations. In general, the transformed signal is stored in the mfft object and must be extracted. See the following functions for calculating real or complex spectra:
Spectrograms are generally calculated by sliding an analysis window along the signal and using it to calculate the spectral density in that window. This is the short-time fourier transform. The time-frequency reassigned spectrogram improves on this by allowing energy to be reassigned across frames, but the general principle is the same. The spectrogram functions are fairly straightforward but they do require preallocation of the output array.
Other functions in the library are used internally to generate Hermite and DPSS tapers and to do the time-frequency reassignment. They are included in the public interface, though ordinary use should have no need of them.
For an example of how to use the library, see test_tfr.c
Copyright (C) 2010-2026 C Daniel Meliza
SPDX-License-Identifier: GPL-2.0-or-later