Tfviewer 'something wrong with time...'


I’m trying to use the ftviewerx function but fail to do so. When I supply the necessary info, I get an error message; Something wrong with time… However, the time is in EEGLAB format and seems correct to me.

The input I give is:

All variables (EEG.times, & EEG.chanlocs) are in EEGLAB format and have been preprocessed (Blackman FIR (0.05 - 45 Hz, bandwith 10Hz) --> cleanrawdata --> Interpolation of deleted channels --> re-reference --> epoch & linear baseline correction --> ICA --> trial rejection).

Does anyone know what went wrong? I think it might be related to the linspace argument although im not entirely sure
If not, could someone supply a script and dataset in which the tfviewer function works? This way, I might be able to figure it out myself.

Thanks in advance!

Hi SVH. The tfviewerx utility is not for looking at raw data, but the results of time-frequency analysis.

I guess you might be looking for the eeglab viewer, which is designed for scrolling through raw data. You can access it through the GUI, or call the function directly from code (I forget offhand what the function is called).

Also note that if you have questions about the eeglab toolbox per se, it’s probably best to post them to the eeglab list. I use eeglab format for my data, but I’m not really an expert eeglab user :wink:


Hi Mike

Happy holidays!

I’ve already preprocessed my analysis my data through EEGLAB and have done some time-frequency analyses through EEGLAB. So I need to use the output of my time-frequency analyses as input to tfviewerx? This means I should use the formulas in your book rather than the EEGLAB time-frequency analysis as this analysis is electrode specific, right?

Moreover, if I needed to input the results of time-frequency analysis, I would expect the time input to be the only correct input, as I’ve already epoched the data. However, this was the input that resulted in error message.

Thanks for the reply.

Yes, that’s right – the output of the time-frequency analysis would be the input into tfviewerx.

I’m sure you can use the eeglab time-frequency decomposition methods and get the same results. You would need to write some code to do the decomposition in a loop over channels, and you might need to do a bit of data organization to get it into the right matrix size.

Once you get that TF matrix, it should work with the time vector input.