Back to the main page.

Bug 1739 - ft_specest_mtmfft: rework description and implementation of angletransform

Status ASSIGNED
Reported 2012-09-25 13:58:00 +0200
Modified 2013-01-18 10:43:49 +0100
Product: FieldTrip
Component: specest
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 enhancement
Assigned to: Roemer van der Meij
URL:
Tags:
Depends on:
Blocks:
See also:

Roemer van der Meij - 2012-09-25 13:58:43 +0200

Rework the description and implementation, and change the respective FAQ question. The current description is not correct, the implementation is a bit unintuitive, although the result reflects the original purpose. Being: In an FFT, the phase of any fourier coefficient can be described as the initial phase (i.e. the phase at the first sample) of the best-fit cosine of that particular frequency with the data. In our data, the time-point of the first sample can be different over trials. To make the absolute phases of our fft interpretable, each trial/freq needs to be phase-shifted, such that the phase of a particular frequency reflects the phase at t=0 of the best fit cosine to the data (our chosen convention). In a simple example: if a perfect 2Hz oscillation is at it's peak at t=250ms, without a phase-shift, the phase of the 2Hz coefficient would be: - trial starts at 0ms ---> +/- pi - trial starts at 125ms ---> -pi/2 - trial starts at -125ms ---> pi/2 - trial starts at 250ms ---> 0 - trial starts at 500ms ---> +/- pi After phase-shift it will be: - trial starts at 0ms ---> +/- pi - trial starts at 125ms ---> +/- pi - trial starts at -125ms ---> +/- pi - trial starts at 250ms ---> +/- pi - trial starts at 500ms ---> +/- pi