Back to the main page.
Bug 682 - MEG64
Status | CLOSED FIXED |
Reported | 2011-05-24 08:01:00 +0200 |
Modified | 2011-11-11 11:19:49 +0100 |
Product: | FieldTrip |
Component: | yokogawa |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P1 normal |
Assigned to: | Tilmann Sander-Thommes |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Paul Sowman - 2011-05-24 08:01:53 +0200
Trying to read Yokogawa 64 >> grad = ft_read_sens('2009_10_30_0209_ME039_B1.con'); Warning: could be Yokogawa system > In fileio\private\ft_senstype at 233 In ft_read_sens at 233 Hi, thanks for your efforts on supporting the Yokogawa format. We have a Yokogawa 64 channel paediatric system along with the meg160. I wonder if I supplied some data for this system if it could be integrated into the read routines. The header is essentially the same but currently the routines throw up warnings due to it not being included in ft_read_sens. Thanks, Paul
Tilmann Sander-Thommes - 2011-05-24 11:29:54 +0200
Created attachment 56 test script Yokogawa input old routines
Tilmann Sander-Thommes - 2011-05-24 11:31:29 +0200
Hi Paul, At present the Yokogawa MEG input in FT is in a state of transition as Yokogawa has released an official input toolbox. The integration of the new toolbox will take about 2-3 weeks and the result will be anounced. We will try to recognize all Yokogawa systems in ft_senstype, but this is not easy as the Yokogawa design is very flexible and almost all systems are slightly different. For most purposes you can ignore the warnings. To test the current routines with Sydney data please use the attached script, which refers already to some data from Sydney (via Doug). If you want to have correct gain for your data before the transition is accomplished, then do the following change to bypass a bug in the old Yokogawa routines (change gain to match your recording condition): read_yokogawa_header.m: ... 66 % amp_gain = GetMeg160AmpGainM(fid); 67 amp_gain = 500 ... Yours, Till
Tilmann Sander-Thommes - 2011-10-21 11:21:30 +0200
Today I submitted my main changes to FieldTrip to support the YokogawaMEG Reader 1.4 toolbox. Minor changes will follow. They are in ft_read_header, ft_read_data and the new functions read_yokogawa_data_new, read_yokogawa_header_new, yokogawa2grad_new are added to fileio/private. yokogawa2grad_new supports the new grad-structure. To use them one needs to have the YokogawaMEGReader_R1.04.00 directory in fieldtrip/external. I will attach the zip-archive from Yogawa just below. After the testing phase the toolbox will added to the official external directory. You do not need to remove the old toolboxes from external, the MEG Reader is programmed as first choice. If you want to revert to the old toolboxes just remove the MEG Reader directory from your path. For testing use code such as %******** ft_defaults cfg = []; cfg.dataset = [filepath filename]; % to be defined beforehand cfg.demean = 'no'; cfg.channel = 'AG*'; % magnetometers: cfg.channel = 'M*'; % planar gradiometers: cfg.channel = 'PG*'; % all: cfg.channel = 'all'; data = ft_preprocessing(cfg); % data.grad.label contains only valid channels, bad channels marked % by the user in the Yokogawa MegLaboratory software are excluded % (MegLaboratoy: Open original file, then menu: Edit -> Channel Info, % select channel, change Channel Type to Nullchannel; Then save file % using a new name) % plot sensor geometry figure('name','sensor'); nr_chan = size(data.grad.chanpos,1); plot3(data.grad.chanpos(1:nr_chan,1), data.grad.chanpos(1:nr_chan,2),data.grad.chanpos(1:nr_chan,3),'d') xlim([-15,15]); zlim([-15,15]); ylim([-15,15]); %plot sensor layout figure('name','layout'); cfg_topo = []; lay = ft_prepare_layout(cfg_topo, data); cfg_topo.layout = lay; ft_layoutplot(cfg_topo, data); %******** Yours, Till
Tilmann Sander-Thommes - 2011-10-21 11:22:46 +0200
Created attachment 169 Yokoagawa MEG Reader 1.4 toolbox, not yet officially part of FT.
Tilmann Sander-Thommes - 2011-10-21 11:33:48 +0200
For people using downloaded zip-archives of FieldTrip please bear in mind, that the changes will take about 2 days to appear in the zip-archive.
Robert Oostenveld - 2011-10-21 15:56:22 +0200
in revision 4561 I have added a test script based on the code below. It now works fine with the latest version of fieldtrip. I will attach the figures that I get. The layout is not ideal, because a bit asymmetric, but that probably reflects the position of the helmet relative to the head. The size of the helmet looks ok for a pediatric system.
Robert Oostenveld - 2011-10-21 15:57:27 +0200
Created attachment 171 screenshot after fixing, the 3D position of the channels
Robert Oostenveld - 2011-10-21 15:57:59 +0200
Created attachment 172 screenshot after fixing, the 2D projected layout of the channels