[FieldTrip] Preparing layout from list of 3d coordinates

Stephen Politzer-Ahles politzerahless at gmail.com
Thu Nov 5 04:11:36 CET 2020


Hello,

I have electrode channel locations (in x,y,z coordinates) in a file format
that I think is not supported by ft_read_sens. I would like to use
ft_prepare_layout to project these locations into a 2d layout (for plotting
and for cluster-based permutation tests). I see from
https://www.fieldtriptoolbox.org/tutorial/layout/ that it's possible to do,
but I can't figure out exactly how (it just says "you can use
ft_prepare_layout", but not exactly how; I've tried the following two ways
but I get a "no layout detected" error:

cfg = [];
cfg.elec = <the filename for my channel locations>;
lay = ft_prepare_layout(cfg);

cfg = [];
cfg.elec = <a 69x3 matrix of my xyz coordinates>;
lay = ft_prepare_layout(cfg);

Is there an example online somewhere of how to use ft_prepare_layout with
just a set of xyz coordinates rather than loading a filename or template?

Thanks,
Steve


---
Stephen Politzer-Ahles
The Hong Kong Polytechnic University
Department of Chinese and Bilingual Studies
http://www.polyu.edu.hk/cbs/sjpolit/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20201105/dd766127/attachment.htm>


More information about the fieldtrip mailing list