Back to the main page.

Bug 47 - clusterstat emty neighbourhood

Status CLOSED FIXED
Reported 2010-03-04 15:05:00 +0100
Modified 2010-03-09 09:49:06 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P5 normal
Assigned to: Roemer van der Meij
URL:
Tags:
Depends on:
Blocks:
See also:

Roemer van der Meij - 2010-03-04 15:05:15 +0100

Currently, the code in clusterstat implements a very dirty check on whether the data is source data, which interferes with the option of having an empty neighbourhood structure (not clustering over chans). The dirty code: if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) channeighbstructmat = makechanneighbstructmat(cfg); issource = 0; else issource = 1; % cfg contains dim and inside that are needed for reshaping the data to a volume, and inside should behave as a index vector cfg = fixinside(cfg, 'index'); end Preferably an "no-neighbours" neighbourhood structure should be given out by ft_neighbourselection, and the above piece of code should be made smarter.


Roemer van der Meij - 2010-03-09 09:31:46 +0100

Source detection is now done by passing an issource all the way from statistics_wrapper --> clusterstat. It's a bit messy, but it works. Default in clusterstat (when issource is not passed) is issource = 0. Cfg.neighbours = [] is now handled as inteded (giving a no-neighbours-matrix).