Back to the main page.

Bug 3172 - ft_plot_sens doesn't work with electrode templates

Reported 2016-08-17 11:24:00 +0200
Modified 2017-01-17 11:29:40 +0100
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: Macintosh
Operating System: Mac OS
Importance: P5 normal
Assigned to: Robert Oostenveld
Depends on:
See also:

Simon - 2016-08-17 11:24:13 +0200

I tried to use ft_plot_sens for plotting the electrode configuration 'easycap-M1.txt' from the templates and encountered the following error: Reference to non-existent field 'chanori'. Error in ft_plot_sens (line 225) plotcoil(sens.chanpos, sens.chanori, chandir, coilsize, coilshape, 'edgecolor', edgecolor, 'facecolor', facecolor, 'edgealpha', edgealpha, 'facealpha', facealpha); I also tried it for some different templates and got the same error.

Robert Oostenveld - 2016-08-17 11:29:06 +0200

can you give the exact matlab script you are using? Starting from ft_read_sens?

Simon - 2016-08-17 11:32:10 +0200

(In reply to Robert Oostenveld from comment #1) ft_plot_sens(ft_read_sens('easycap-M10.txt'));

Robert Oostenveld - 2016-08-17 14:30:17 +0200

I looked at it (in detail). The logic had gotten incorrect after adding support for square neuromag channels. mac011> git commit ../fileio/ft_read_sens.m [master 5eb4994] FIX - default radius of head as 85 is in mm, not in cm 1 file changed, 2 insertions(+), 2 deletions(-)

Robert Oostenveld - 2016-08-17 14:32:43 +0200

I also made a test script to go over most (but not all) options of inputs. mac011> git commit test/test_bug3172.m plotting/ [master 26cfcc8] FIX - reimplemented logic for all possible combimations of options and input data, see 2 files changed, 191 insertions(+), 57 deletions(-) create mode 100644 test/test_bug3172.m mac011> git push upstream master X11 forwarding request failed on channel 0 You're about to push master, is that what you intended? [y|n] y Counting objects: 10, done. Delta compression using up to 4 threads. Compressing objects: 100% (10/10), done. Writing objects: 100% (10/10), 2.70 KiB | 0 bytes/s, done. Total 10 (delta 7), reused 0 (delta 0) remote: Resolving deltas: 100% (7/7), completed with 6 local objects. To a154eee..26cfcc8 master -> master

Robert Oostenveld - 2017-01-17 11:29:40 +0100

closed multiple bugs that were resolved some time ago