[FieldTrip] Preparing layout from list of 3d coordinates

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Thu Nov 5 08:52:27 CET 2020


Hi Steve,

I think the easiest way to get started for you would be to consult the layout<https://www.fieldtriptoolbox.org/tutorial/layout/> tutorial. At the top it mentions a box which shows what a ‘layout’ variable more or less should look like after reading it in with ft_prepare_layout. In other words, if you manage to convert the x,y,z positions into a nice 2D-projected x,y positions, you’re almost there.
Alternatively, you might need to use ft_prepare_layout to make this 2D projection for you. In that case you probably need to consult the section ‘making a layout from MEG sensors’ and replace the MEG sensor array for your EEG sensor array. This needs to be defined according to https://www.fieldtriptoolbox.org/reference/ft_datatype_sens/

Best wishes,
Jan-Mathijs

On 5 Nov 2020, at 04:11, Stephen Politzer-Ahles <politzerahless at gmail.com<mailto:politzerahless at gmail.com>> wrote:

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/
_______________________________________________
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/20201105/18359d69/attachment.htm>


More information about the fieldtrip mailing list