<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi FieldTrip community!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
My name is Alex Aabedi. I'm a medical student at the University of California San Francisco researching speech responses in patients with brain tumors undergoing invasive electrophysiology. I'm very excited and grateful to be joining the FieldTrip ecosystem
 to perform our analyses.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'm having trouble masking the subthreshold t-statistics I derived from ft_freqstatistics with ft_sourceplot. It appears that ft_sourceplot is ignoring the cfg.maskparameter call altogether (for instance, I don't get an error even if I specify a non-existent
 field in my stats structure). It looks like a colleague asked a similar question back in 2015 (<a href="https://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008924.html" id="LPlnk189019">https://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008924.html</a>)
 but I don't see a response.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Here's a snippet of the code used to generate the sourceplot. It works fine, except it doesn't mask the channels with 0s in the mask field. The 'stats' structure (and all subfields) in the ft_sourceplot call is directly from ft_freqstatistics. I also tried
 masking with a dummy mask with all zeros, but to no avail. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica"><span style="font-size: 12pt;">cfg</span><span class="Apple-converted-space" style="font-size: 12pt;">             
</span><span style="font-size: 12pt;">= [];</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica"><span style="font-size: 12pt;">cfg.funparameter =
</span><span style="color: rgb(160, 32, 240); font-size: 12pt;">'stat'</span><span style="font-size: 12pt;">;</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica"><span style="font-size: 12pt;">cfg.maskparameter =
</span><span style="color: rgb(160, 32, 240); font-size: 12pt;">'mask'</span><span style="font-size: 12pt;">;</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica"><span style="font-size: 12pt;">cfg.funcolormap =
</span><span style="color: rgb(160, 32, 240); font-size: 12pt;">'jet'</span><span style="font-size: 12pt;">;</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica"><span style="font-size: 12pt;">cfg.funcolorlim</span><span class="Apple-converted-space" style="font-size: 12pt;"> 
</span><span style="font-size: 12pt;">= [-4 4];</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica"><span style="font-size: 12pt;">cfg.method
</span><span class="Apple-converted-space" style="font-size: 12pt;">      </span>
<span style="font-size: 12pt;">= </span><span style="color: rgb(160, 32, 240); font-size: 12pt;">'surface'</span><span style="font-size: 12pt;">;</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica;color:#a020f0"><span style="color: rgb(0, 0, 0); font-size: 12pt;">cfg.interpmethod =
</span><span style="font-size: 12pt;">'sphere_weighteddistance'</span><span style="color: rgb(0, 0, 0); font-size: 12pt;">;</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica"><span style="font-size: 12pt;">cfg.sphereradius = 8;</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica"><span style="font-size: 12pt;">cfg.camlight
</span><span class="Apple-converted-space" style="font-size: 12pt;">    </span><span style="font-size: 12pt;">=
</span><span style="color: rgb(160, 32, 240); font-size: 12pt;">'no'</span><span style="font-size: 12pt;">;</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica"><span style="font-size: 12pt; background: var(--white);">ft_sourceplot(cfg, stats, mesh);</span><br>
</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica"><span style="font-size: 12pt;">view([-90 20]);</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica"><span style="font-size: 12pt;">material
</span><span style="color: rgb(160, 32, 240); font-size: 12pt;">dull</span><span style="font-size: 12pt;">;</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica"><span style="font-size: 12pt;">lighting
</span><span style="color: rgb(160, 32, 240); font-size: 12pt;">gouraud</span><span style="font-size: 12pt;">;</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:10.0px Helvetica"><span style="font-size: 12pt;">camlight;</span></p>
<br class="Apple-interchange-newline">
Thank you so much for the support.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
All the best,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Alex Aabedi</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</body>
</html>