<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="">Dear Alex,<div class=""><br class=""></div><div class="">Can you please check </div><div class="">1. Is your mask containing 0 and 1 or only 0</div><div class="">2. Can you use ft_sourceplot with method ‘ortho’ and report whether you see your desired result</div><div class=""><br class=""></div><div class="">If the answer to 1 and 2 is yes, I suggest using ft_volumenormalise prior to ft_sourceplot with the method ’surface’. Make 2 calls to ft_volumenormalise for cfg.parameter = ’stat’; and cfg.parameter = ‘mask’;</div><div class=""><br class=""></div><div class="">Hope this works.</div><div class="">Good luck</div><div class="">tzvetan</div><div class=""><br class=""></div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 17 Nov 2020, at 20:00, Aabedi, Alexander <<a href="mailto:Alexander.Aabedi@ucsf.edu" class="">Alexander.Aabedi@ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Hi FieldTrip community!</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">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-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">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" class="">https://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008924.html</a>) but I don't see a response.</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">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-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class=""><span style="font-size: 12pt;" class="">cfg</span><span class="Apple-converted-space" style="font-size: 12pt;">             <span class="Apple-converted-space"> </span></span><span style="font-size: 12pt;" class="">= [];</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class=""><span style="font-size: 12pt;" class="">cfg.funparameter =<span class="Apple-converted-space"> </span></span><span style="color: rgb(160, 32, 240); font-size: 12pt;" class="">'stat'</span><span style="font-size: 12pt;" class="">;</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class=""><span style="font-size: 12pt;" class="">cfg.maskparameter =<span class="Apple-converted-space"> </span></span><span style="color: rgb(160, 32, 240); font-size: 12pt;" class="">'mask'</span><span style="font-size: 12pt;" class="">;</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class=""><span style="font-size: 12pt;" class="">cfg.funcolormap =<span class="Apple-converted-space"> </span></span><span style="color: rgb(160, 32, 240); font-size: 12pt;" class="">'jet'</span><span style="font-size: 12pt;" class="">;</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class=""><span style="font-size: 12pt;" class="">cfg.funcolorlim</span><span class="Apple-converted-space" style="font-size: 12pt;"> <span class="Apple-converted-space"> </span></span><span style="font-size: 12pt;" class="">= [-4 4];</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class=""><span style="font-size: 12pt;" class="">cfg.method<span class="Apple-converted-space"> </span></span><span class="Apple-converted-space" style="font-size: 12pt;">     <span class="Apple-converted-space"> </span></span><span style="font-size: 12pt;" class="">=<span class="Apple-converted-space"> </span></span><span style="color: rgb(160, 32, 240); font-size: 12pt;" class="">'surface'</span><span style="font-size: 12pt;" class="">;</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica; color: rgb(160, 32, 240);" class=""><span style="font-size: 12pt;" class="">cfg.interpmethod =<span class="Apple-converted-space"> </span></span><span style="font-size: 12pt;" class="">'sphere_weighteddistance'</span><span style="font-size: 12pt;" class="">;</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class=""><span style="font-size: 12pt;" class="">cfg.sphereradius = 8;</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class=""><span style="font-size: 12pt;" class="">cfg.camlight<span class="Apple-converted-space"> </span></span><span class="Apple-converted-space" style="font-size: 12pt;">   <span class="Apple-converted-space"> </span></span><span style="font-size: 12pt;" class="">=<span class="Apple-converted-space"> </span></span><span style="color: rgb(160, 32, 240); font-size: 12pt;" class="">'no'</span><span style="font-size: 12pt;" class="">;</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class=""><span style="font-size: 12pt; background: var(--white);" class="">ft_sourceplot(cfg, stats, mesh);</span><br class=""></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class=""><span style="font-size: 12pt;" class="">view([-90 20]);</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class=""><span style="font-size: 12pt;" class="">material<span class="Apple-converted-space"> </span></span><span style="color: rgb(160, 32, 240); font-size: 12pt;" class="">dull</span><span style="font-size: 12pt;" class="">;</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class=""><span style="font-size: 12pt;" class="">lighting<span class="Apple-converted-space"> </span></span><span style="color: rgb(160, 32, 240); font-size: 12pt;" class="">gouraud</span><span style="font-size: 12pt;" class="">;</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class=""><span style="font-size: 12pt;" class="">camlight;</span></div><br class="Apple-interchange-newline">Thank you so much for the support.</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">All the best,</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Alex Aabedi</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">fieldtrip mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="https://doi.org/10.1371/journal.pcbi.1002202" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://doi.org/10.1371/journal.pcbi.1002202</a></div></blockquote></div><br class=""></div></body></html>