<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!
<div class=""><br class="">
</div>
<div class="">I am trying to plot the topography of my LDA weights, but am having some trouble. I am using my own script to calculate the weights rather than any packages (e.g. DMLT, or MVPA-light), so the tutorials on the fieldtrip site haven’t been able to
 help me. So far, I’ve simply tried adding the weights (a 306x1 length vector) as a field to my data structure. And trying this code:</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">data.weights = weights;</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">cfg = [];</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">cfg.xlim =<span style="color: #a020f0" class="">'maxmin'</span>;</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">cfg.zlim =
<span style="color: #a020f0" class="">'maxmin'</span>;</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(160, 32, 240);" class="">
<span style="color: #000000" class="">cfg.layout = </span>'neuromag306all.lay'<span style="color: #000000" class="">;</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">cfg.channel =
<span style="color: #a020f0" class="">'MEG'</span>;</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(34, 139, 34);" class="">
<span style="color: #000000" class="">cfg.parameter = </span><span style="color: #a020f0" class="">'weights'</span><span style="color: #000000" class="">; </span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">figure; ft_topoplotER(cfg,data); colorbar</div>
<p style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 12px;" class="">
 <br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 14px;" class="">
Unsurprisingly, this doesn’t work. It results in the error 'field “weights" not present in data’. I assume because the weights field is not interpretable by the fieldtrip code. I guessed the lack of a dimord field for the weights might be underlying its lack
 of interpretability, but playing around with that has not worked either. I’ve tried adding a ‘weightsdimord’ field with the [306x1] dimensions, but this also - unsurprisingly - didn’t work.</div>
</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 14px;" class="">
<br class="">
</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 14px;" class="">
Is there a way around this? Will I need to use lower level functions than ft_topoplotER? If so, can anyone advise on how I might implement this?</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 14px;" class="">
<br class="">
</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 14px;" class="">
Many thanks for your time,</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 14px;" class="">
Benjy</div>
</body>
</html>