Back to the main page.

Bug 1332 - No data shown with ft_topoplotER after ft_freqanalysis (tfr, keep trials)

Status CLOSED FIXED
Reported 2012-02-16 10:42:00 +0100
Modified 2014-01-29 13:28:39 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: All
Operating System: Linux
Importance: P3 normal
Assigned to: Eelke Spaak
URL:
Tags:
Depends on:
Blocks:
See also: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1371

Linsey Roijendijk - 2012-02-16 10:42:54 +0100

Some time ago I made plots like this: diftfr = ds{condition(1)}.tfr; %% .tfr contains results from ft_freqanalysis that keeps trials, dimord: 'rpt_chan_freq_time' diftfr.powspctrm = (squeeze(mean(ds{condition(1)}.tfr.powspctrm)) - squeeze(mean(ds{condition(2)}.tfr.powspctrm)) ) ./ (squeeze(mean(ds{condition(1)}.tfr.powspctrm)) + squeeze(mean(ds{condition(2)}.tfr.powspctrm)) ); %% Taking the mean difference scaled by the total diftfr.dimord = 'chan_freq_time'; % Changing the dimord ft_topoplotER(cfg, diftfr); Now, the data is not shown in the plot anymore.


Jan-Mathijs Schoffelen - 2012-02-16 10:45:55 +0100

Hi Linsey, could you please upload the diftfr variable, as well as the cfg you use to call ft_topoplotER?


Linsey Roijendijk - 2012-02-16 11:05:27 +0100

Created attachment 230 Includes cfg and diftfr (plotting also doesn't work with cfg = [])


Eelke Spaak - 2012-03-14 11:26:41 +0100

Hi Linsey, Your TFR data contains NaNs. If I remove them with: diftfr.powspctrm(isnan(diftfr.powspctrm)) = 0; the plotting routine works fine again. However, I am not entirely sure whether this is a problem on your end, or whether the function should actually be able to handle NaNs by itself. I will discuss this with the FT team.


Jörn M. Horschig - 2012-08-24 10:33:32 +0200

I had a similar issue some time ago, and found that it was caused by the interpolation method. When using cfg.interpolation = 'cubic'; it works fine for me, but the interpolation is not as nice because it misses the outer rim.


Eelke Spaak - 2012-09-11 13:58:32 +0200

This is now fixed (see bug 1371), the function should support nans by itself.


Eelke Spaak - 2014-01-29 13:28:39 +0100

changing lots of bugs from resolved to closed.