<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi All,<div class=""><br class=""></div><div class="">Sorry to bother you all, but I was wondering if I may have found a possible bug. If so, I’ll submit a request to the bugzilla subsection. I am not completely sure the issue is not my own incompetence though. The error occurs when using a neuromag dataset that was read in with an old fieldtrip version (i.e. from 2015), and having it undergo ft_artifact_zvalue from a newer version of fieldtrip. </div><div class=""><br class=""></div><div class="">In short, I use the following code:</div><div class=""><div class=""> <span class="Apple-tab-span" style="white-space:pre"> </span></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>load('<span class="">MEGGRAD_Visual_clean_combinedscripts</span><span class="">')</span></div><div class=""> </div><div class=""> datanoline=[]</div><div class=""> datanoline=data_clean</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>load('/MEGGRADfinal_cleaned_jumpartifact_outputcfg_redone_Visual.mat') </div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""> </div></blockquote><div class=""><div class=""><br class=""></div><div class=""> cfgaj = [];</div><div class=""><br class=""></div><div class=""> % channel selection, cutoff and padding</div><div class=""> cfgaj.artfctdef.zvalue.channel = allchanell;</div><div class=""> cfgaj.artfctdef.zvalue.cutoff = cfgajout.artfctdef.zvalue.cutoff</div><div class=""> cfgaj.artfctdef.zvalue.trlpadding = 0;</div><div class=""> cfgaj.artfctdef.zvalue.artpadding = 0;</div><div class=""> cfgaj.artfctdef.zvalue.fltpadding = 0.0;</div><div class=""><br class=""></div><div class=""> % algorithmic parameters</div><div class=""> cfgaj.artfctdef.zvalue.cumulative = 'yes'; </div><div class=""> cfgaj.artfctdef.zvalue.medianfilter = 'yes';</div><div class=""> cfgaj.artfctdef.zvalue.medianfiltord = 9;</div><div class=""> cfgaj.artfctdef.zvalue.absdiff = 'yes';</div><div class=""> <span class="Apple-tab-span" style="white-space:pre"> </span>% cfgaj.artfctdef.zvalue.interactive = 'yes';</div><div class=""><br class=""></div><div class=""> [cfgajout, artifact_jump] = ft_artifact_zvalue(cfgaj,datanoline);</div><div class=""><br class=""></div><div class="">When I run this code in a 2015 version of fieldtrip, it works fine (without any error). On the other hand, in the 2016 version of fieldtrip I have (as well as in the latest version which I downloaded this weekend), I get the following error:</div><div class=""><br class=""></div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><div class="">Error using ft_datatype_sens (line 278)</div></div></div><div class=""><div class=""><div class="">unexpected number of coils (408)</div></div></div><div class=""><div class=""><div class="">contributing to channel MEG0113 (1)</div></div></div><div class=""><div class=""><div class=""><br class=""></div></div></div><div class=""><div class=""><div class="">Error in ft_datatype_raw (line 141)</div></div></div><div class=""><div class=""><div class=""> data.grad =</div></div></div><div class=""><div class=""><div class=""> ft_datatype_sens(data.grad);</div></div></div><div class=""><div class=""><div class=""><br class=""></div></div></div><div class=""><div class=""><div class="">Error in ft_checkdata (line 236)</div></div></div><div class=""><div class=""><div class=""> data = ft_datatype_raw(data,</div></div></div><div class=""><div class=""><div class=""> 'hassampleinfo', hassampleinfo);</div></div></div><div class=""><div class=""><div class=""><br class=""></div></div></div><div class=""><div class=""><div class="">Error in ft_artifact_zvalue (line 215)</div></div></div><div class=""><div class=""><div class=""> data = ft_checkdata(data, 'datatype',</div></div></div><div class=""><div class=""><div class=""> 'raw', 'hassampleinfo', 'yes’);</div></div></div></blockquote><div class=""><br class=""></div><div class=""><div class=""><br class=""></div><div class="">The dataset datanoline (as well as cfgaj) are linked to below (sorry it’s dropbox, but I’m not quite sure how to do it otherwise).</div><div class=""><br class=""></div><div class=""><a href="https://www.dropbox.com/s/86t5agwv2vanrh3/MEGGRAD_Visual_clean_combinedscripts.mat?dl=0" class="">https://www.dropbox.com/s/86t5agwv2vanrh3/MEGGRAD_Visual_clean_combinedscripts.mat?dl=0</a></div><div class=""><br class=""></div><div class=""><a href="https://www.dropbox.com/s/rw8e7mof8plss72/MEGGRADfinal_cleaned_jumpartifact_outputcfg_redone_Visual.mat?dl=0" class="">https://www.dropbox.com/s/rw8e7mof8plss72/MEGGRADfinal_cleaned_jumpartifact_outputcfg_redone_Visual.mat?dl=0</a></div><div class=""><br class=""></div><div class="">Sorry for the bother,</div><div class="">Russ</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> </div></div></body></html>