<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 id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p></p>
<div>Hi Fieldtrip community,<br>
 <br>
I have a question regarding the artifcat identification based on continouis data prior to epoching (because I am not going to epoch my data ). In this case I can not use the function ft_rejectvisual, which is specific to epoched data, but I am going to use
 ft_databrowser () to mark the artifact segements. <br>
<br>
I use the following code: <br>
<div style="padding: 30px;">
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<span style="white-space: pre"><span style="color: rgb(0, 128, 19);">% Define the configuration for the data browser</span></span></div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<span style="white-space: pre"><span>cfg = [];</span></span></div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<span style="white-space: pre"><span>cfg.viewmode = </span><span style="color: rgb(167, 9, 245);">'vertical'</span><span>;</span></span></div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<span style="white-space: pre"><span>cfg.continuous = </span><span style="color: rgb(167, 9, 245);">'yes'</span><span>;</span></span></div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<span style="white-space: pre"><span>cfg.artfctdef.visual.artifact = 1; </span><span style="color: rgb(0, 128, 19);">% enable artifact marking mode</span></span></div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<span style="white-space: pre"><span>cfg.artfctdef.visual.continuous = </span><span style="color: rgb(167, 9, 245);">'yes'</span><span>;
</span><span style="color: rgb(0, 128, 19);">% mark continuous segments</span></span></div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<span style="white-space: pre"><span>cfg.artfctdef.visual.channel = {</span><span style="color: rgb(167, 9, 245);">'all'</span><span>};
</span><span style="color: rgb(0, 128, 19);">% mark artifacts across all channels</span></span></div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<span style="white-space: pre"><span>cfg.artfctdef.visual.feedback = </span><span style="color: rgb(167, 9, 245);">'yes'</span><span>;
</span><span style="color: rgb(0, 128, 19);">% show the marked artifacts</span></span></div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
</div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<span style="white-space: pre"><span style="color: rgb(0, 128, 19);">% Launch the data browser and mark segments with artifacts</span></span></div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<span style="white-space: pre"><span>cfg.artfctdef.reject = </span><span style="color: rgb(167, 9, 245);">'complete'</span><span>;
</span><span style="color: rgb(0, 128, 19);">% mark complete segments as artifacts</span></span></div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<span style="white-space: pre"><span>cfg = ft_databrowser(cfg, data);</span></span></div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
</div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<span style="white-space: pre"><span style="color: rgb(0, 128, 19);">% Retrieve the marked artifacts</span></span></div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<span style="white-space: pre"><span>artifacts = cfg.artfctdef.visual.artifact;</span></span></div>
<div style="font-size: 9pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal;">
<br>
</div>
</div>
<br>
But, I have an error : <b>Output argument "trl" (and possibly others) not assigned a value in the execution with "artifact2trl" function.
</b><br>
<br>
<div>Before epoching, has anyone tried to reject artifacts using continuous data. Do you have any insight into this error?
<br>
</div>
<br>
<br>
Many thanks,<br>
<br>
Hasnae AGOURAM</div>
<br>
<p></p>
</div>
</body>
</html>