Back to the main page.

Bug 3296 - trial selection fails in ft_multiplotER (and possibly ft_multiplotTFR)

Status NEW
Reported 2017-05-22 09:21:00 +0200
Modified 2017-09-15 10:05:33 +0200
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on: 3345
Blocks:
See also: http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=2978http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=2779

Robert Oostenveld - 2017-05-22 09:21:59 +0200

ft_multiplotER supports cfg.trials, which should result in the subset of trials being averaged on the fly. At this moment all trials are averaged and cfg.trials has no effect. This was identified in relation to bug 2978. The inspect_bug2978 script contains a (presently commented out) section that demonstrates the problem.


Robert Oostenveld - 2017-05-22 09:26:23 +0200

The data selection and handling inside ft_multiplotER is a mess. Parts of it date back more than 10 years ago. It would be good to rewrite the function, using a single call to ft_selectdata. I had a try at that, but failed due to the complexity of that function. Especially the bivariate and bidirectional case makes it hard to see how the present data management works. I suggest to start with a completely new "ft_multiplotER_new" implemented from scratch, starting with the standard case, and only adding the bivariate and bidirectional cases later. Part of the challenge relates to it not being clear how the bivariate and bidirectional are currently working. A test script that includes those would be very valuable.


Robert Oostenveld - 2017-05-22 09:27:52 +0200

while I am at it: I realize that ft_multiplotTFR probably suffers from the same problems. It would be wise to consider a private/multiplot_common fuynction that is shared between the two.


Robert Oostenveld - 2017-08-30 11:57:13 +0200

I started a personal branch to address this mac011> git commit -a [bug3296-trials de81a51] added test script that shows the errors (upon close inspection), updated help in ft_getopt 2 files changed, 160 insertions(+), 9 deletions(-) create mode 100644 test/test_bug3296.m


Robert Oostenveld - 2017-08-30 12:02:32 +0200

The issue of data selection probably also applies to singleplot and topoplot. Possibly also movieplot.