<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Steve,
<div class=""><br class="">
<div class="">I think the easiest way to get started for you would be to consult the <a href="https://www.fieldtriptoolbox.org/tutorial/layout/" class="">layout</a> 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.</div>
<div class="">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 <a href="https://www.fieldtriptoolbox.org/reference/ft_datatype_sens/" class="">https://www.fieldtriptoolbox.org/reference/ft_datatype_sens/</a></div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 5 Nov 2020, at 04:11, Stephen Politzer-Ahles <<a href="mailto:politzerahless@gmail.com" class="">politzerahless@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">Hello,
<div class=""><br class="">
</div>
<div class="">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 <a href="https://www.fieldtriptoolbox.org/tutorial/layout/" class="">https://www.fieldtriptoolbox.org/tutorial/layout/</a> 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:</div>
<div class=""><br class="">
</div>
<div class="">cfg = [];</div>
<div class="">cfg.elec = <the filename for my channel locations>;</div>
<div class="">lay = ft_prepare_layout(cfg);</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">cfg = [];</div>
<div class="">cfg.elec = <a 69x3 matrix of my xyz coordinates>;</div>
<div class="">lay = ft_prepare_layout(cfg);</div>
<div class=""><br class="">
</div>
<div class="">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?</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class="">Steve</div>
<div class=""><br clear="all" class="">
<div class="">
<div dir="ltr" class="gmail_signature">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div class=""></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="">
<div dir="ltr" class="gmail_signature">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class=""><br class="">
</div>
<span class="">
<div class="">---<br class="">
</div>
Stephen Politzer-Ahles<br class="">
The Hong Kong Polytechnic University<br class="">
Department of Chinese and Bilingual Studies<br class="">
<a href="http://www.polyu.edu.hk/cbs/sjpolit/" target="_blank" class="">http://www.polyu.edu.hk/cbs/sjpolit/</a></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>