<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</p>
<pre style="white-space: pre-wrap; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">Hi everyone, I try automatically reject segment from my EEG-Data with <meta http-equiv="content-type" content="text/html; charset=utf-8">amplitudes out of the range 200µV.
I use the following function for it:
function [fnData, conf] = rejectForRange(inData)
cfg = [];
cfg.continuous = 'no';
cfg.artfctdef.threshold.bpfilter = 'no';
cfg.artfctdef.threshold.range = 200; %in uV/T, default inf
% cfg.artfctdef.threshold.min = -100; %in uV/T, default -inf
% cfg.artfctdef.threshold.max = 100; %in uV/T, default inf
[conf, artData] = ft_artifact_threshold(cfg, inData);
cfg = [];
cfg.artfctdef.xxx.artifact = artData;
cfg.artfctdef.reject = 'complete';
fnData = ft_rejectartifact(cfg, inData);
The function is evaluated with no errors. But the output is not correct.
Indeed, a lot of artifact-segments are deleted. But there are still a lot of segments with
amplitudes far out of the range of 200µV (visual controlled with ft_rejectvisual()).
If try the rejectForRange()-function once more (on the output-data from the first run), so it founds no artifacts at all.
But they are in the data.
Thank you for any help in advance.
Best regards
Alex
</pre></body></html>