Back to the main page.

Bug 479 - ft_singleplotTFR: coherence data with labelcmb field will not plot

Status CLOSED FIXED
Reported 2011-02-08 01:52:00 +0100
Modified 2011-03-09 15:34:53 +0100
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: Macintosh
Operating System: Mac OS
Importance: P1 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Matt Mollison - 2011-02-08 01:52:12 +0100

I'm using fieldtrip-20110204 on a Mac Pro, OS X 10.6.6 (I can see there have been no updates to ft_singleplotTFR so I felt OK using this version from last week). Problem: ft_singleplotTFR tries to access data.label on line 135, but if I'm using coherence data from ft_connectivityanalysis and didn't calculate coherence for all combinations of channels, my data struct does not have a label field and instead has a labelcmb field. This makes the script crash. (I don't know what happens if you don't specify cfg.channelcmb and thus calculate all channel combinations—matlab crashed on me when I did this even though I have plenty of RAM but I don't want to recompute them right now) Solution: if you move the line 135-140 code chunk to the "general solution" in the following "if" statement, it plots and no errors occur (and it should work fine if isfull == 1). I know JM revamped ft_singleplotER recently, so maybe he's going to do the same for ft_singleplotTFR, but this is at least a temporary fix that seems to work. Cheers, Matt