Back to the main page.

Bug 247 - ft_clusterplot no longer works

Status CLOSED FIXED
Reported 2010-11-28 22:07:00 +0100
Modified 2011-01-26 15:38:32 +0100
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: Macintosh
Operating System: Mac OS
Importance: P1 normal
Assigned to: Joint development user
URL:
Tags:
Depends on:
Blocks:
See also:

Matt Mollison - 2010-11-28 22:07:38 +0100

I've just found that ft_clusterplot no longer works. I've tested this with fieldtrip 20101115 and 20101128 on MATLAB R2010b on a Mac Pro running OS X Server 10.6.4. I tried it with my own data and with the eventrelatedstatistics tutorial (the last section where cfg.avgovertime = 'no'): http://fieldtrip.fcdonders.nl/tutorial/eventrelatedstatistics#non-parametric_statistics_using_a_cluster-based_approach When I run the ft_clusterplot section from the tutorial, this is the error that I get (I get the same error with my data, and a colleague of mine gets this error with his data): --------------------------------------------------- cfg = []; cfg.highlightsymbolseries = ['*','*','.','.','.']; cfg.layout = 'CTF151.lay'; cfg.contournum = 0; cfg.markersymbol = '.'; cfg.alpha = 0.05; cfg.zlim = [-5 5]; ft_clusterplot(cfg,stat); reading layout from file CTF151.lay There are 1 clusters smaller than alpha (0.05) Positive cluster: 1, pvalue: 0.023 (*), t = 0.33 to 0.52667 ??? Error using ==> ft_checkdata at 265 This function requires timelock, freq or comp data as input. Error in ==> ft_topoplotER at 169 data = ft_checkdata(data, 'datatype', {'timelock', 'freq', 'comp'}); Error in ==> ft_clusterplot at 323 ft_topoplotER(cfgtopo, stat); --------------------------------------------------- It seems that it's trying to pass stat data into ft_topoplotER, which doesn't work. I don't know when this got changed, but it definitely used to work. Hope this gets fixed soon because ft_clusterplot is useful. Thanks, Matt


Roemer van der Meij - 2010-11-30 16:32:56 +0100

Hi Matt, Thanks for reporting the bug! I checked it with my own data, which is the output from freqstatistics or timelockstatistics, but I fail to reproduce the error. TopoplotER can accept stat structures, the low-level functions check for a freq, a time etc. field to determine the data-type, and if you use cfg.zparam = 'stat' it should be able to plot it (works fine for me). Could you check whether your stat-structure contains either the freq or timelock field?


Roemer van der Meij - 2010-11-30 16:49:10 +0100

Ah, I see now that ft_datatype wrongly detects a timelock-stat structure as not being so (this works for freq-output), and this results in the error. I'll discuss whether the extend check for timelock data is really necessary, I'll keep you up to date. Best, Roemer


Roemer van der Meij - 2010-12-01 10:15:56 +0100

Hi Matt, it should work again now. The changes will be on the ftp-server this evening. If you want you could fix it in your working copy by changing in /public/ft_datatype.m (line 36 istimelock = isfield(data, 'label') && isfield(data, 'time') && ~isfield(data, 'freq'); && ((isfield(data, 'avg') && isnumeric(data.avg)) || (isfield(data, 'trial') && isnumeric(data.trial) || (isfield(data, 'cov') && isnumeric(data.cov)))); Into: istimelock = isfield(data, 'label') && isfield(data, 'time') && ~isfield(data, 'freq'); Best, Roemer


Robert Oostenveld - 2011-01-26 15:37:12 +0100

I closed all bugs that were resolved prior and including 2011-01-25. All resolved bugs should have been discussed by now, therefore we don't want to see them again in the next meeting. Instead, in the next meeting we want to see the recent improvements and fixes.


Robert Oostenveld - 2011-01-26 15:38:32 +0100

I closed all bugs that were resolved prior and including 2011-01-25. All resolved bugs should have been discussed by now, therefore we don't want to see them again in the next meeting. Instead, in the next meeting we want to see the recent improvements and fixes.