Back to the main page.

Bug 663 - ft_prepare_layout fails for yokogawa64_planar

Status CLOSED WONTFIX
Reported 2011-05-12 17:02:00 +0200
Modified 2019-08-10 12:02:48 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P1 major
Assigned to: Arjen Stolk
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2011-05-12 17:02:11 +0200

Created attachment 50 screenshot showing wiki notes this can be reproduced with ft_layoutplot(cfg, planar) where cfg.grad = rmfield(planar.grad, 'balance') using the attached planar data see screenshot.


Robert Oostenveld - 2011-05-12 17:04:39 +0200

Created attachment 51 example dataset (one second data) that is transformed to planar representation


Robert Oostenveld - 2011-05-12 17:11:39 +0200

a recent improvement in channelposition changed the screen output, but it still does not work


Arjen Stolk - 2012-07-18 10:35:56 +0200

I wonder if this is the case. I'll leave this one open till we make the big step to .mat files (from .lay files).


Arjen Stolk - 2012-09-20 21:50:45 +0200

Hmm, I cannot reproduce this bug by the exact same means. Instead an empty topo with no labels/markers is shown (see attachment). ft_layoutplot(cfg,planar) Warning: could be Yokogawa system > In fileio/private/warning_once at 81 In fileio/private/ft_senstype at 294 In ft_chantype at 87 In ft_chantype at 495 In ft_datatype_sens at 128 In ft_checkconfig at 240 In utilities/private/ft_preamble_trackconfig at 31 In ft_preamble at 54 In ft_layoutplot at 82 undoing the planar balancing Warning: the linear projection for the montage is not full-rank, the resulting data will have reduced dimensionality > In ft_apply_montage at 85 In utilities/private/undobalancing at 30 In utilities/private/channelposition at 39 In ft_datatype_sens at 99 In ft_datatype_timelock at 95 In ft_checkdata at 188 In ft_prepare_layout at 93 In ft_layoutplot at 105 creating layout from cfg.grad creating layout for yokogawa64_planar system the call to "ft_prepare_layout" took 4 seconds and required the additional allocation of an estimated 1 MB the call to "ft_layoutplot" took 8 seconds and required the additional allocation of an estimated 4 MB When additionally specifying: cfg.layout = 'yokogawa440pg.lay' I get a layout that has electrode positions outside the head (see second attachment: B). ft_layoutplot(cfg,planar) undoing the planar balancing Warning: the linear projection for the montage is not full-rank, the resulting data will have reduced dimensionality > In ft_apply_montage at 85 In utilities/private/undobalancing at 30 In utilities/private/channelposition at 39 In ft_datatype_sens at 99 In ft_datatype_timelock at 95 In ft_checkdata at 188 In ft_prepare_layout at 93 In ft_layoutplot at 105 reading layout from file yokogawa440pg.lay the call to "ft_prepare_layout" took 3 seconds and required the additional allocation of an estimated 0 MB the call to "ft_layoutplot" took 5 seconds and required the additional allocation of an estimated 0 MB


Arjen Stolk - 2012-09-20 21:51:13 +0200

Created attachment 314 first


Arjen Stolk - 2012-09-20 21:51:33 +0200

Created attachment 315 second


Arjen Stolk - 2012-09-20 21:53:43 +0200

I recon this requires an image-based layout, preferably stored in a .mat file.


Arjen Stolk - 2013-01-15 21:12:01 +0100

Just replicated the previous again. >> load('yokogawa64_planar.mat'); cfg.grad = rmfield(planar.grad, 'balance'); ft_layoutplot(cfg, planar); << gives an empty topo >> load('yokogawa64_planar.mat'); cfg.grad = rmfield(planar.grad, 'balance'); cfg.layout = 'yokogawa440pg.lay' ft_layoutplot(cfg, planar); << works, but 4 channels are outside the outline ('PG035','PG036','PG099','PG100') How to proceed? There is no specific yokogawa64_planar.lay or .mat layout in our depository.


Robert Oostenveld - 2013-01-16 11:42:23 +0100

Created attachment 404 axial and planar yokogawa64 layouts I see two problems 1) the grad structure is old. >> planar.grad ans = pnt: [128x3 double] ori: [128x3 double] tra: [128x128 double] label: {128x1 cell} unit: 'cm' balance: [1x1 struct] 2) it is a highly unusual system. ---------- cfg = []; cfg.dataset = '2011_01_28_0354_ME053_AEF.con'; data = ft_preprocessing(cfg); nbcfg = []; nbcfg.method = 'distance' nbcfg.neighbourdist = 5 cfg =[]; cfg.neighbours = ft_prepare_neighbours(nbcfg, data) planar = ft_megplanar(cfg, data) figure; ft_layoutplot([], data); figure; ft_layoutplot([], planar);


Robert Oostenveld - 2013-01-16 11:48:38 +0100

(In reply to comment #9) so the code works when reading in everything anew. The planar layout is not really nice, the dH and dV are diagonally shifted. Better would be to have the channels next to each other. But I checked a ctf151 dataset, and it has the same automatic planar layout. So it is consistent. I suggest not to provide a yokogawa64 layout and certainly not a planar version. Since the code now works (albeit not with perfect results), this bug can be closed.


Robert Oostenveld - 2019-08-10 12:02:48 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on https://github.com/fieldtrip/fieldtrip/issues.