Back to the main page.

Bug 3275 - allow sEEG (i.e. not ECoG but depth electrodes) to be visualized with ft_sourceplot

Status CLOSED FIXED
Reported 2017-03-27 10:33:00 +0200
Modified 2019-08-10 12:41:09 +0200
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks: 3059
See also:

Robert Oostenveld - 2017-03-27 10:33:22 +0200

... since it is basically the same as virtual electrodes, but then with real electrodes ;-) I discussed this with Arjen, Sandon and Jan-Mathijs. If the data contains sens.chanpos, then ft_checkdata should allow on-the-fly conversion of timelock/freq data to source data.


Robert Oostenveld - 2017-03-27 11:25:51 +0200

I started implementing this on a branch [bug3275-sourceplot 57fd387] ENH - support on the fly conversion of timelock/freq to ungridded source for sEEG visualization, see http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3275 6 files changed, 204 insertions(+), 12 deletions(-) create mode 100644 test/test_bug3275.m create mode 100644 utilities/private/dimindex.m [bug3275-sourceplot df84228] ENH - added time-frequency example to test script, see http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3275 1 file changed, 25 insertions(+), 8 deletions(-)


Robert Oostenveld - 2017-03-27 11:35:23 +0200

In the ft_sourceplot implementation I noticed that it would do fun = fun(inside) where inside is a boolean vector. This caused the time and/or frequency dimension to be discarded. I changed it into fun = fun(inside,:,:) so that it does not take the first (time/frequency) slice, but that it selects all time/frequency. This reveals that the cloud plotting does not yet allow for either selecting the latency/frequency, nor for browsing through it. I think that the browsing through time/frequency is only implemented for method=ortho. For all others (including method=cloud) it would be good at least to implement latency/frequency selection.


Robert Oostenveld - 2017-03-27 11:55:30 +0200

I improved ft_sourceplot a bit and added a test case to the script. [bug3275-sourceplot 3b6472f] ENH _ improve detection of 4d or 5d source structures, enhanced test script in line with http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3275#c2 2 files changed, 38 insertions(+), 14 deletions(-) I will discuss with Jan-Mathijs how to proceed in general with the implementation of ft_sourceplot w.r.t. time and/or frequency.


Robert Oostenveld - 2017-03-27 23:00:02 +0200

The only cfg.method in ft_sourceplot that presently supports time and/or frequency is method=ortho. For the others I am now giving an explicit error. I also added cfg.latency/cfg.frequency and cfg.avgovertime/avgoverfreq options. That allows for all methods to select a single time and frequency. The issue is resolved with https://github.com/fieldtrip/fieldtrip/pull/386 Of course there are still improvements to make, but I think it is already in a usable state.


Arjen Stolk - 2017-03-29 01:29:03 +0200

Not sure where you mentioned it earlier, but I tried running test_bu3275 which gave me the following issue Undefined function 'fieldnames' for input arguments of type 'double'. Error in ft_selectdata (line 140) restoreavg = fieldnames(varargin{1}.avg); Error in ft_sourceplot (line 295) functional = ft_selectdata(tmpcfg, functional); Tried debugging it by removing the avg field from the statement at line 140, but ran into issues further downstream suggesting me that I was overlooking something here.


Robert Oostenveld - 2017-03-29 09:55:42 +0200

(In reply to Arjen Stolk from comment #5) I also noticed the bug. It was due to the field timelock.avg. Shen converted to source.avg, some code assumes that it is a structure (e.g. containing source.avg.pow). I made some other small cleanups as well. They are merged in the master branch. [master 27a0421] FIX - small fix related to conversion of timelock to source data for iEEEG plotting, see http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3275#c5 4 files changed, 13 insertions(+), 12 deletions(-)


Robert Oostenveld - 2019-08-10 12:34:59 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.


Robert Oostenveld - 2019-08-10 12:41:09 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.