63#define LIBTFR_VERSION "2.2.0"
134void mtm_copy(
mfft * mtmh,
const double * tapers,
const double * weights);
188 int ntimes,
double t0,
double dt);
204double mtfft(
mfft * mtm,
double const * data,
int nbins);
246void mtm_spec(
mfft * mtm,
double * spec,
const double *samples,
int nsamples,
int shift,
285void tfr_spec(
mfft * mtm,
double *spec,
const double *samples,
int nsamples,
int k,
286 int shift,
double flock,
int tlock,
int nfreq,
const double *fgrid);
306int dpss(
double *tapers,
double *lambda,
int npoints,
double nw,
int k);
324int hermf(
int N,
int M,
double tm,
double *h,
double *Dh,
double *Th);
375void tfr_reassign(
double *spec,
const double *q,
const double *tdispl,
const double *fdispl,
376 int N,
int nfreq,
const double *fgrid,
377 double dt,
double qthresh,
double flock,
int tminlock,
int tmaxlock);
void mtm_copy(mfft *mtmh, const double *tapers, const double *weights)
Copy pre-calculated tapers/window functions (e.g.
void mtm_zspec(mfft *mtm, cmplx_t *spec, const double *samples, int nsamples, int shift)
Compute a multitaper complex spectrogram by stepping through a signal.
struct mfft_s mfft
Opaque pointer type for multitaper fft transforms.
Definition tfr.h:85
int mtm_nframes(mfft const *mtm, int signal_size, int step_size)
mfft * mtm_init(int nfft, int npoints, int ntapers)
Initialize a multitaper mtm transform and allocate memory for tapers/window functions.
void tfr_displacements(mfft const *mtm, double *q, double *tdispl, double *fdispl)
Compute the power spectrum and the time/frequency displacement.
mfft * mtm_init_herm(int nfft, int npoints, int order, double tm)
Initialize mtfft transform for reassigned spectrogram (i.e.
void mtpower(mfft const *mtm, double *pow, double sigpow)
Extract power spectrum from multiple taper FFT.
int hermf(int N, int M, double tm, double *h, double *Dh, double *Th)
Computes a set of orthogonal Hermite functions.
double const * mtm_tapers(mfft const *mtm)
double cmplx_t[2]
An interleaved real/imaginary pair: [0] is the real part, [1] the imaginary.
Definition tfr.h:80
void mtcomplex(mfft const *mtm, cmplx_t *out)
Extract complex multitaper transform of signal from transform object.
void tfr_reassign(double *spec, const double *q, const double *tdispl, const double *fdispl, int N, int nfreq, const double *fgrid, double dt, double qthresh, double flock, int tminlock, int tmaxlock)
Assign power from a spectrum to a spectrogram based on time-frequency displacements.
void mtm_tapers_interp(mfft const *mtm, double *out, double const *times, int ntimes, double t0, double dt)
Compute interpolation of tapers.
mfft * mtm_init_dpss(int nfft, int npoints, double nw, int ntapers)
Initialize a mtfft transform using DPSS tapers (i.e.
double mtfft(mfft *mtm, double const *data, int nbins)
Compute multitaper FFT of a real-valued signal.
int mtm_npoints(mfft const *mtm)
int mtm_ntapers(mfft const *mtm)
void tfr_spec(mfft *mtm, double *spec, const double *samples, int nsamples, int k, int shift, double flock, int tlock, int nfreq, const double *fgrid)
Compute a time-frequency reassignment spectrogram by stepping through a signal.
void mtm_destroy(mfft *mtm)
Frees up the mfft structure and dependent data.
void mtm_spec(mfft *mtm, double *spec, const double *samples, int nsamples, int shift, int adapt)
Compute a multitaper spectrogram by stepping through a signal.
void mtm_tapers_fft(mfft *mtm, double scale)
Compute FFT of the tapers.
int dpss(double *tapers, double *lambda, int npoints, double nw, int k)
Computes discrete prolate spherical sequences.
int mtm_nreal(mfft const *mtm)
int mtm_nfft(mfft const *mtm)
double const * mtm_buffer(mfft const *mtm)