Back to the main page.

Bug 1272 - ft_multiplotER - maskparameter does not work

Status CLOSED FIXED
Reported 2012-01-20 10:38:00 +0100
Modified 2012-03-20 17:06:24 +0100
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P3 normal
Assigned to: Roemer van der Meij
URL:
Tags:
Depends on:
Blocks:
See also:

Irina - 2012-01-20 10:38:50 +0100

The original first data input has a field 'mask', and I refer to this field as 'maskparameter' in the configuration. But, after the internal call to timelockanalysis (see code below), this field is lost. So the mask field does not exist anymore at line 576, and the function crashes. >> ft_multiplotER(cfg, avg_c1, avg_c2) the input is timelock data with 273 channels and 631 timebins Warning: the trial definition in the configuration is inconsistent with the actual data > In utilities/private/warning_once at 75 In utilities/private/fixsampleinfo at 68 In ft_checkdata at 604 In ft_timelockanalysis at 120 In ft_multiplotER at 279 Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > In utilities/private/warning_once at 75 In utilities/private/fixsampleinfo at 79 In ft_checkdata at 604 In ft_timelockanalysis at 120 In ft_multiplotER at 279 averaging trials averaging trial 1 of 26 averaging trial 2 of 26 averaging trial 3 of 26 averaging trial 4 of 26 averaging trial 5 of 26 averaging trial 6 of 26 averaging trial 7 of 26 averaging trial 8 of 26 averaging trial 9 of 26 averaging trial 10 of 26 averaging trial 11 of 26 averaging trial 12 of 26 averaging trial 13 of 26 averaging trial 14 of 26 averaging trial 15 of 26 averaging trial 16 of 26 averaging trial 17 of 26 averaging trial 18 of 26 averaging trial 19 of 26 averaging trial 20 of 26 averaging trial 21 of 26 averaging trial 22 of 26 averaging trial 23 of 26 averaging trial 24 of 26 averaging trial 25 of 26 averaging trial 26 of 26 the call to "ft_timelockanalysis" took 0 seconds and an estimated 0 MB the input is timelock data with 273 channels and 631 timebins averaging trials averaging trial 1 of 30 averaging trial 2 of 30 averaging trial 3 of 30 averaging trial 4 of 30 averaging trial 5 of 30 averaging trial 6 of 30 averaging trial 7 of 30 averaging trial 8 of 30 averaging trial 9 of 30 averaging trial 10 of 30 averaging trial 11 of 30 averaging trial 12 of 30 averaging trial 13 of 30 averaging trial 14 of 30 averaging trial 15 of 30 averaging trial 16 of 30 averaging trial 17 of 30 averaging trial 18 of 30 averaging trial 19 of 30 averaging trial 20 of 30 averaging trial 21 of 30 averaging trial 22 of 30 averaging trial 23 of 30 averaging trial 24 of 30 averaging trial 25 of 30 averaging trial 26 of 30 averaging trial 27 of 30 averaging trial 28 of 30 averaging trial 29 of 30 averaging trial 30 of 30 the call to "ft_timelockanalysis" took 0 seconds and an estimated 0 MB reading layout from file CTF275.lay the call to "ft_prepare_layout" took 0 seconds and an estimated 0 MB ??? Reference to non-existent field 'mask'. Error in ==> ft_multiplotER at 576 maskmatrix = varargin{1}.(cfg.maskparameter)(seldat,:);


Jan-Mathijs Schoffelen - 2012-01-27 08:40:00 +0100

assigned bug to get all bugs lined up before the grand bug binge


Roemer van der Meij - 2012-02-01 15:11:20 +0100

Hi Irina, Thanks for the report! Did you add the mask field to the data-structure yourself prior to calling ft_timelockanalysis? In that case, Fieldtrip functions only give back the fields of input structures that are part of the normal output for consistency purposes. However, if it's the case that you called ft_timelockanalysis on output of a ft_XXXstatistics function, then I do think the mask field should be retained, and there is a bug in the code. Best, Roemer


Irina - 2012-02-01 15:46:38 +0100

(In reply to comment #2) Hi Roemer, Hmmm, I am not sure if I understand... The timelockanalysis is called inside the ft_multiplotER function, for some reason that is conditional to my input. I am actually not sure why is it called at all, since my input is already a timelock data. Anyway, after this call, one of the input fields (the mask) is lost, indeed because there are only normal fieldtrip fields in the output. I indeed added the mask field to the first dataset manually, prior to calling the ft_multiplotER. >> avg_c1.mask = mask; This is how it should be done according to the ft_multiplotER help, right? But then the maskparameter does not work. Best, Irina


Roemer van der Meij - 2012-02-01 16:27:20 +0100

Hi Irina, Thank you for your quick reply. It sounds like the issue is a little more complicated. You indeed did it in the correct way I think. Could you maybe upload a small mat-file and some code that replicates the problem (e.g. a few trials and a function call)? That would help me in figuring out where it is going wrong. Best, Roemer


Roemer van der Meij - 2012-03-02 15:30:49 +0100

Hi Irina, By making a few assumptions I was able to fix the bug without data/code for your specific case (probably). The mask field should now be available to the rest of the plotting code. The update should be on our FTP server tonight. Could you check whether it works in your case as well now? Then I can close this bug :). Thanks again for the report! Best, Roemer


Irina - 2012-03-20 16:45:12 +0100

(In reply to comment #5) Hi Roemer, I am sorry that I didn't reply earlier. I checked it now and it works for me! Thanks a lot for your work. best, Irina