Back to the main page.
Bug 1853 - coherence data cannot be topoplotted by default
| Status | CLOSED FIXED |
| Reported | 2012-11-26 15:00:00 +0100 |
| Modified | 2014-03-12 12:21:33 +0100 |
| Product: | FieldTrip |
| Component: | core |
| Version: | unspecified |
| Hardware: | PC |
| Operating System: | Windows |
| Importance: | P3 normal |
| Assigned to: | Jörn M. Horschig |
| URL: | |
| Tags: | |
| Depends on: | |
| Blocks: | |
| See also: |
Jörn M. Horschig - 2012-11-26 15:00:11 +0100
I want to plot a coherencespectrum as a topoplot The coherence structure is obtained by the following: cfg = []; cfg.method = 'coh'; coh(s) = ft_connectivityanalysis(cfg, freq); Plotting is done like this: cfg = []; cfg.layout = 'EEG1010.lay'; ft_topoplotER(cfg, coh(s)); ft_topoplot fails because the coh-structure does not have a .labelcmb field. I's a bit nested, the actual error is: ??? Undefined function or variable "sel1". Error in ==> ft_topoplotTFR at 652 sel1 = intersect(sel1, sellab); Error in ==> ft_topoplotER at 164 cfg = ft_topoplotTFR(cfg, varargin{:}); But sel1 is not defined because it does not enter the if-statement properly (because labelcmb is missing in the data). Should the labelcmb always be present?
Jörn M. Horschig - 2012-11-26 15:02:24 +0100
of course I also need to define cfg.refchannel, but it does not even come to the place where that is needed ;)
Jan-Mathijs Schoffelen - 2012-11-26 15:13:10 +0100
if the dimord = 'chan_chan_freq' no labelcmb is needed, just a label please specify cfg.parameter='cohspctrm'; cfg.refchannel = 'gui'; (or a named channel) I agree that perhaps catching the incomplete cfg should be in order here
Jörn M. Horschig - 2012-11-26 15:22:15 +0100
ah ye, cfg.parameter was missing. By default it tries to plot 'powspctrm' - would have liked to get an error about that though ;) I'm gonna add that, something like if ~isfield(data, cfg.parameter) error('Stupid user forgot to specify cfg.parameter'); end k?
Jan-Mathijs Schoffelen - 2012-11-26 15:27:26 +0100
very much so.