<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Dear all<div><br></div><div>I recently made a change in ft_rejectvisual that some of you might want to be aware of. It has to do with keeping track of rejected data segments and the change was made in revision 9881, which you can see in detail at <a href="https://code.google.com/p/fieldtrip/source/detail?r=9881">https://code.google.com/p/fieldtrip/source/detail?r=9881</a></div><div><br></div><div>It used to be that with</div><div><font face="Andale Mono" color="#0096ff"><span style="font-size: 11px;">dataout = ft_rejectvisual(cfg, datain);</span></font></div><div>you would get</div><div><font face="Andale Mono" color="#0096ff"><span style="font-size: 11px;">dataout.cfg.artifact</span></font></div><div>as a Nx2 matrix with the data segments that were marked as artifact. </div><div><br></div><div>The new behaviour is that the Nx2 matrix is now to be found in either one of</div><div><div><font face="Andale Mono" color="#0096ff"><span style="font-size: 11px;">dataout.cfg.artfctdef.summary.artifact</span></font></div></div><div><div><div><font face="Andale Mono" color="#0096ff"><span style="font-size: 11px;">dataout.cfg.artfctdef.trial.artifact</span></font></div></div></div><div><div><font face="Andale Mono" color="#0096ff"><span style="font-size: 11px;">dataout.cfg.artfctdef.channel.artifact</span></font></div></div><div>depening on whether cfg.method=summary/trial/channel.</div><div><br></div><div>This makes ft_rejectvisual compatible with the other ft_artifact_xxx functions. So, you can now do</div><div><span style="font-size: 11px; font-family: 'Andale Mono';"><font color="#0096ff">cfg.keeptrial = ‘yes’</font></span></div><div><font face="Andale Mono" color="#0096ff"><span style="font-size: 11px;">cfg.keepchannel = ‘yes’</span></font></div><div><div><font face="Andale Mono" color="#0096ff"><span style="font-size: 11px;">dataout = ft_rejectvisual(cfg, datain);</span></font></div></div><div>where dataout still contains all trials and channels, but subsequently you can use</div><div><span style="font-size: 11px; font-family: 'Andale Mono';"><font color="#0096ff">dataclean = ft_rejectartifact(dataout.cfg, datain) </font></span></div><div>to remove them explicitly.</div><div><br></div><div>This facilitates repeated passes of ft_rejectartifact for different channel types (EEG, planar gradiometers, magnetometers) and to store the manual work in between.</div><div><br></div><div>best regards,</div><div>Robert</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></body></html>