[FieldTrip] Problem using ft_sensrorealign with Yokogawa MEG

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Thu Nov 1 09:13:34 CET 2018


Hi Victor,

You don’t mention which fieldtrip version you are currently using, but ft_sensorrealign has been moved to compat/obsolete about a year ago. This means that this particular function is not actively maintained and supported anymore. At the moment, I don’t remember the reason for this, but it would mean that there is functionality in the main fieldtrip functions that got rid of the raison d’etre of ft_sensorrealign.
As is mentioned in the README of the compat/obsolete directory, you should move ft_sensorrealign up a few directories. The reason for this is that the function might rely on low-level functions that are located in fieldtrip/private, which are only visible from function that are located in the directory that contains the private folder. ‘fixpos’ might be one of them.

Best wishes,

Jan-Mathijs

J.M.Schoffelen, MD PhD
Senior Researcher, VIDI-fellow - PI, language in interaction
Telephone: +31-24-3614793
Physical location: room 00.028
Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands


On 30 Oct 2018, at 10:43, Victor RG <victor.rg.gib at gmail.com<mailto:victor.rg.gib at gmail.com>> wrote:

HI Fieldtrip experts!

I'm trying to align a headmodel (the one from example "Subject1") with my MEG sensors (Yokogawa system).

I'm trying to do that interactively, in order to construct a Leadfied matrix as accurate as possible. To do that, I am testing this code:

cfg = [];
cfg.method = 'interactive';
cfg.headshape = vol.bnd(1);
cfg.senstype = 'meggrad';
grad_aligned = ft_sensorrealign(cfg, grad); % Im using ft_sensorrealign cause I think is the MEG version of ft_electroderealign

The variables employed consist of:
>> grad =
struct with fields:

  *   balance: [1×1 struct]
  *   chanori: [160×3 double]
  *   chanpos: [160×3 double]
  *   chantype: {160×1 cell}
  *   chanunit: {160×1 cell}
  *   coilori: [320×3 double]
  *   coilpos: [320×3 double]
  *   label: {160×1 cell}
  *   tra: [160×320 double]
  *   type: 'yokogawa160'
  *   unit: 'cm'
  *   fid: [1×1 struct]

>> vol.bnd(1) =
struct with fields:

  *   pos: [1000×3 double]
  *   tri: [1996×3 double]
  *   coordsys: 'ctf'

I have looked at the tutorial for EEG sensors realignment, and I have copied the procedure, since there is not a specific tutorial for MEG sensors. I thought it would be the same, but when executing it I obtain the following errors:

>> Undefined function 'fixpos' for input arguments of type 'struct'.

Error in ft_sensorrealign (line 255)
headshape = fixpos(cfg.headshape);

Error in generating_leadfield (line 63)
grad_aligned = ft_sensorrealign(cfg, grad);

Does anybody know how to do that, or how to do an interactive realignment with MEG sensors?

Thanks in advance.
Víctor.

Víctor Rodríguez González
Grupo de Ingeniería Biomédica, ETSIT.
Universidad de Valladolid, España.

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181101/2dbf61da/attachment.html>


More information about the fieldtrip mailing list