Back to the main page.

Bug 272 - inconsistent data handling inside multiplotER w.r.t. cfg.inputfile

Status CLOSED FIXED
Reported 2010-12-08 11:27:00 +0100
Modified 2010-12-15 10:31:33 +0100
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P1 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Roemer van der Meij - 2010-12-08 11:27:14 +0100

The code that does the plotting in multiplotER works on the varargin-arry, not on a data-strcuture called 'data'. However, when cfg.inputfile is used, the results is a data-structure called 'data', not varargin.


Jan-Mathijs Schoffelen - 2010-12-14 21:01:43 +0100

The issue appeared to be caused by the construction of comment-string, which uses the matlab-function inputname. This doesn't work if nargin == 1 (i.e. only a cfg is given with cfg.inputfile). I made the usage of inputname conditional on the input; if nargin == 1 the filenames in cfg.inputfile are used to designate the different conditions. It works now for the test script test_bug272


Jan-Mathijs Schoffelen - 2010-12-15 09:45:52 +0100

why is this reopened?


Roemer van der Meij - 2010-12-15 09:48:23 +0100

This not was I referring to I'm afraid. The current construction with respect to cfg.inputfile loads data from disk and puts it in a data-structure named 'data'. However, all of the subsequent plotting code uses the original 'varargin' array as input. Thus, if one uses cfg.inputfile, nothing will happen, as there is no real data to be plotted. Oh, and I just notice the ft_checkdata call malfunctions as well, as it also operates on the data-structure named 'data'. My guess is we should either rewrite topoplotER to only work with a single data-structure (in concordance with multiplotER, which only takes one input-argument), or modify the code I mentioned to result in changes/assignment to the varargin cell-array. I made a bug out of it because I was unsure whether it is still a good idea to support multiple data-inputs to topoplotER.


Jan-Mathijs Schoffelen - 2010-12-15 10:02:40 +0100

Now you are talking about ft_TOPOplotER, while the bug was filed for ft_MULTIplotER. Hence the confusion. I now addressed the issue also in ft_topoplotER and for me it now works. please check test_bug272 (and the code in ft_topoplotER) if you can live with this


Roemer van der Meij - 2010-12-15 10:31:27 +0100

Oh shoot, my apologies. I was actually referring to mulitplot and topoplot incoherently, and was confused. I see now the error of my ways (sorry for reopening).