[FieldTrip] Problem plotting independent components

Johanna Zumer johanna.zumer at donders.ru.nl
Wed Dec 7 12:59:48 CET 2011


Hi Dave,
Perhaps this error is due to the complex data that ft_databrowser cannot
plot?  If you re-calculate the components and get out real-only values, do
you still get this error?

Best,
Johanna

On 7 December 2011 02:07, Dave Deriso <dderiso at ucsd.edu> wrote:

> I should also note that when I tried the *ft_databrowser* function it was
> unable to plot the component topographies because there weren't enough grid
> points. Have you encountered this before? Thanks again for all of your
> great help!!
>
> My code:
>
> cfg = [];
> cfg.viewmode = 'component'
> ft_databrowser(cfg, comp);
>
>
> Output:
>
> creating layout from cfg.grad
> creating layout for neuromag306alt system
> the input is component data with 306 components and 306 original channels
> detected   0 visual artifacts
> redrawing with viewmode component
> fetching data... done
> fetching artifacts... done
> preprocessing data... done
> plotting artifacts...
> plotting events...
> plotting data...
>
> Warning: Imaginary parts of complex X and/or Y arguments ignored
> > In ft_plot_vector at 191
>   In ft_databrowser>redraw_cb at 1309
>   In ft_databrowser at 508
> Warning: Imaginary parts of complex X and/or Y arguments ignored
> > In ft_plot_vector at 191
>   In ft_databrowser>redraw_cb at 1309
>   In ft_databrowser at 508
>                                           ****** these errors repeat about
> 10 times, then:
> plotting component topographies...
> Error using griddata (line 79)
> Not enough unique sample points specified.
>
> Error in ft_plot_topo (line 153)
> [Xi,Yi,Zi] = griddata(chanX', chanY, dat, xi', yi, interpmethod); %
> interpolate the topographic data
>
> Error in ft_databrowser>redraw_cb (line 1377)
>       ft_plot_topo(chanx, chany, chanz, 'mask', laychan.mask, 'interplim',
> 'mask', 'outline', laychan.outline, 'tag', 'topography',
>       ...
>
> Error in ft_databrowser (line 508)
> redraw_cb(h);
>
>
>
>
>
> Cheers,
> Dave
>
>
> On Tue, Dec 6, 2011 at 11:17 AM, Dave Deriso <dderiso at ucsd.edu> wrote:
>
>> Dear JM and Jörn,
>>
>> Thank you so much for your helpful suggestions. Matlab could not
>> find/open layout file: *NM306.lay* with both *ft_topoplotTFR* and*
>>  ft_topoplotIC*. I have also tried each of the following layouts without
>> success:
>>
>> cfg.layout    =3D data.grad;
>> cfg.layout    =3D 'neuromag306all.lay';
>> cfg.layout    =3D 'neuromag306cmb.lay';
>> cfg.layout    =3D 'neuromag306mag.lay';
>> cfg.layout    =3D 'neuromag306planar.lay';
>> (and no layout cfg, as prescribed by the bottom of
>> http://fieldtrip.fcdonders.nl/reference/ft_topoplotic)
>>
>>
>> As Jörn mentioned, the IC and sensor labels are different and,
>> therefore, doing a string comparison will return an error. The question is
>> then, how can I project the ICs back into sensor space and plot them
>> topographically using the pre-existing sensor layouts? If this accomplished
>> by the *ft_topoplotIC* function, shouldn't it expect the IC labels to be
>> different from the layout labels?
>>
>> Thanks again for all of your help!
>>
>> Cheers,
>> Dave Deriso
>>
>> --
>> UCSD Institute for Neural Computation
>> UCSD Department of Neurosurgery
>>
>>
>>
>>
>> On Tue, Dec 6, 2011 at 3:55 AM, "Jörn M. Horschig" <
>> jm.horschig at donders.ru.nl> wrote:
>>
>>>  Dear Dave,
>>>
>>> the labels do not match indeed, because ICs do not correspond to single
>>> channel (obviously). I am not exactly sure how ft_topoplotIC is built, but
>>> you could try using ft_databrowser instead, with cfg.viewmode = 'component'
>>> Hope that at least circumvents your problem.
>>>
>>> Best,
>>> Jörn
>>>
>>>
>>> On 12/6/2011 2:45 AM, Dave Deriso wrote:
>>>
>>> Dear Fieldtrip Users,
>>>
>>>  I am trying to implement the tutorial on using ICA to extract eyeblink
>>> artifacts (
>>> http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica_to_remove_eog_artifacts).
>>> Everything works, except that the labels from the IC data do not match the
>>> labels from the layout file, causing an error in the topoplotIC
>>> function. Your help in solving this is most appreciated.
>>>
>>>
>>>  Layout labels (I am using a Neuromag 306 MEG):
>>>  'MEG0113'
>>> 'MEG0112'
>>> 'MEG0111'
>>> 'MEG0122'
>>> 'MEG0123'
>>>
>>>  IC labels:
>>>  'runica001'
>>> 'runica002'
>>> 'runica003'
>>> 'runica004'
>>> 'runica005'
>>>
>>>   Matlab Output:
>>>  ft_topoplotIC(cfg, comp);
>>> creating layout from data.grad
>>> creating layout for neuromag306alt system
>>> Error using ft_topoplotTFR (line 659)
>>> labels in data and labels in layout do not match
>>> Error in ft_topoplotIC (line 122)
>>> ft_topoplotTFR(cfg, varargin{:});
>>>
>>>
>>>
>>>  Cheers,
>>> Dave Deriso
>>>
>>> --
>>> UCSD Institute for Neural Computation
>>> UCSD Department of Neurosurgery
>>>
>>>
>>>
>>> _______________________________________________
>>> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>>
>>>
>>>
>>> --
>>> Jörn M. Horschig
>>> PhD Student
>>> Donders Institute for Brain, Cognition and Behaviour
>>> Centre for Cognitive Neuroimaging
>>> Radboud University Nijmegen
>>> Neuronal Oscillations Group
>>>
>>> P.O. Box 9101
>>> NL-6500 HB Nijmegen
>>> The Netherlands
>>>
>>> Contact:
>>> E-Mail: jm.horschig at donders.ru.nl
>>> Tel:    +31-(0)24-36-68493
>>> Web: http://www.ru.nl/donders
>>>
>>> Visiting address:
>>> Trigon, room 2.30
>>> Kapittelweg 29
>>> NL-6525 EN Nijmegen
>>> The Netherlands
>>>
>>>
>>> _______________________________________________
>>> fieldtrip mailing list
>>> fieldtrip at donders.ru.nl
>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>>
>>
>>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111207/75d26146/attachment-0002.html>


More information about the fieldtrip mailing list