NeilwBailey / RELAX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A bug when blink removal is disabled

demsarjure opened this issue · comments

Hi!

I have been trying to use RELAX to automate EEG preprocessing for a study I am collaborating on. I think there is a bug in RELAX_excluding_channels_and_epoching.m. If neither of the conditions below is satisfied:

    %% Detect voltage shift in Epoch to identify outlying channels:
    if YouCanRejectThisManyChannelsHere>0 
        if RELAX_cfg.ProbabilityDataHasNoBlinks<2

Two of the variables that are required later on are not set. To fix this I set them to 0 by default. In other words, I added the following code just before the mentioned if statement:

    epochedEEG.RELAXProcessing.Details.NumberOfMuscleContaminatedChannelsRecomendedToDelete=0;
    epochedEEG.RELAX.ExtremeEpochsToIgnoreInMuscleDetectionStep=0;

Hope my solution is OK, if not I would be very grateful if you can point me in the right direction.

I read the code wrong, the issues I have are probably because of YouCanRejectThisManyChannelsHere>0. Maybe a different message that there is too much noise would be useful.

Hi there

Sorry about the slow reply. I have now updated RELAX to v1.1.2 so that this bug will no longer occur. Also, when RELAX has finished processing all the files, a warning box will pop up to recommend files that exceed the electrode rejection threshold should be checked (including instructions for how to identify which files should be checked).

Thank you for letting me know, and I hope you continue to find RELAX useful.

Kind regards,

Neil