Multitaper time-frequency decomposition

Dear Brainstormers,

I would like to perform a multitaper time-frequency decomposition as allowed by very recents updates in brainstorm. This involve the ft_mtmconvol function from fieldtrip but I encounteer some difficulties in setting the analysis parameters directly through the bstm interface.

The ft_mtmconvol fieldtrip function need 4 inputs - i.e. the frequencies of interest, the time-interval of interest, the length of the sliding time-window in seconds and the width of frequency smoothing in Hz. In the brainstorm interface however, what is the “modulator factor” (the number of cycles?), “the time resolution” and the “time step” parameters?

Many thanks in advance for your answer!
Best,
Emilie

Hi Emilie,

I added in the process options some text that explains how the inputs in Brainstorms are converted into FieldTrip inputs:

  • timeoi = time_window(1)+time_resolution/2 : time_step : time_window(2)-time_resolution/2-1/sfreq
  • tapsmofrq = frequencies / modulation_factor
  • timwin = repmat(time_resolution, 1, length(frequencies))

Does it help?
Francois

Hi Francois,

there are two things that are not so clear to me about Brainstorm-to-Fieldtrip command conversion.

  1. How do you set the ‘time_step’ in Brainstorm? It seems that the user cannot set this parameter, or am I missing something?
  2. Is the length of the sliding time window fixed?

Thank you very much for your clarification!!

Antonio

Oops… it was a small bug in the code…
Update Brainstorm and you should see again the line “time step” in the options of the process.

Hi Francois,
again, I have basic question. What does “timwin = repmat(time_resolution, 1, length(frequencies))” mean?
I know that “when choosing this parameter it is important that a full number of cycles fit within the time-window for a given frequency.” but I can’t understand it. I want to set parameter of sliding time window as “5 cycles per time-window”.
Could you more information about it?

Best,
Jun

Hi Jun,

This means that the same timwin is used for all the frequencies. All the solutions I could think of for allowing different time windows for the different frequencies seemed too complicated. In Brainstorm, there is the additional constraint that things need to fit in an interface, and that we are trying to keep the list of options as condensed as possible.

But we can probably improve this initial draft, maybe by replacing the Brainstorm parameter “time_resolution” by a parameter “number of cycles”, and computing the FieldTrip parameter timwin for each frequency separately. I’m not sure how to set timeoi accordingly though, I’m not really good with all these concepts.

If you have any suggestion, please feel free to submit them as pull requests on the Brainstorm github repo. We could really use some help for this. The functions that need to be modified are the following:
https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/process/functions/process_ft_mtmconvol.m#L95
https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/timefreq/bst_timefreq.m#L550

Thanks
Francois