Back to the main page.

Bug 947 - ft_neighbourselection help suggests you can use any cfg.layout

Status CLOSED FIXED
Reported 2011-09-12 09:30:00 +0200
Modified 2011-11-11 11:19:38 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P1 normal
Assigned to: Jörn M. Horschig
URL:
Tags:
Depends on:
Blocks:
See also:

Jan-Mathijs Schoffelen - 2011-09-12 09:30:39 +0200

Yet, within the code the cfg.layout is converted into a cfg.template (i.e. converted into a string with .mat) and then the respective mat-file is loaded. This only works if the template actually exists. Yet, the help of the function and the presence of the cfg option layout suggest that it works with cfg.layout as well.


Jörn M. Horschig - 2011-10-11 16:13:16 +0200

The help does not point that 'feature' explicitly out, because I still need to do very many templates... I should probably get starting with that next week. The help just states "The positions of the channel are specified in a gradiometer or electrode configuration or from a layout.". I would suggest to keep it as an undocumented feature for now - if people are using 'template' with any other recording system than EEG or CTF-MEG, they will get an error that there is no appropriate template anyways.


Jörn M. Horschig - 2011-10-20 12:45:51 +0200

Hey JM, can you reformulate again what your concern is? I am nearly finished with computing templates for all layouts we have available, would that solve this issue?


Jan-Mathijs Schoffelen - 2011-10-20 14:39:50 +0200

If I recall correctly, the user-specified XXX.lay is transformed into XXX.mat internally. This would still crash if a user specifies a custom layout for which no template is available.


Jörn M. Horschig - 2011-10-20 15:24:48 +0200

kind of, but that crash is dealt with in line 104: if ~exist(cfg.template, 'file') error('Template file could not be found - [...] and before, there is an output that tells the user that the layout filename is used to determine the template filename (line 101)


Jörn M. Horschig - 2011-11-10 16:21:57 +0100

All layouts were transformed into templates, now, which makes this fixed. However, related, see bug 1135


Robert Oostenveld - 2011-11-11 11:19:38 +0100

I closed all bugs that were recently resolved.