-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible bug in ft_rejectartifact #2427
Comments
Hi @vlitlak, I'd be happy to look into this, but in order to do so: could you share a snippet of code + cfg? |
fs = 1e3; raw = []; trl = 1:fs:size(raw.trial{1}, 2); cfg = []; |
hmm, do you have a particular expectation with respect to the function's behavior if you input both a data object AND a cfg.trl (even if the cfg.trl were consistent with the data object)?
or
Admittedly it could be that the mutually exclusive scenarios are not well enough documented. I think that the required behavior would be something like:
then:
then:
|
Ah, yes. I suspected I was missing something. Still, I think this behaviour is a bit intransparent, also because FT functions are rarely called with just the cfg. Better documentation or a more meaningful error message would definitely help here. |
OK, thanks. I built in an error check, and added a small sentence to the docstring |
Hi guys,
I was helping a colleague with his script and we came across an issue that I think is a bug but maybe I misunderstood the code intention. What we wanted to do is review some continuous data in databrowser, mark bad segments by eye and then epoch the data and exclude any trials that overlap with those marked segments.
To do that, we passed the continuos data and the trl in cfg.trl to ft_rejectartifact hoping to get a modified trl back. But around line 204, our trl gets replaces with one from data.sampleinfo. If I remove the sampleinfo field it doesn't help because just before that, line 201 reinstates it. So the way I see this code, lines 207-215 cannot be reached.
Hope all is well otherwise,
Vladimir
The text was updated successfully, but these errors were encountered: