Unrecognised field "eyeblinkmask" and "NoiseMaskFullLength"
EliseJis opened this issue · comments
Hi Neil,
I'm preprocessing 5-minutes resting-state eyes-closed data without MWF. For a while, the code worked fine but now I start getting errors that certain fields are not recognised. When debugging the code, the fields are never created but I can't figure out why. I set RELAX_cfg.ProbabilityDataHasNoBlinks=2; because if when set to 1, I got the following error for one of my participants:
Array indices must be positive integers or logical values.
Error in RELAX_blinks_IQR_method (line 127)
continuousEEG.RELAXProcessing.Details.eyeblinkmask(round(BlinkMaxLatency(1,x)-(400/RELAX_cfg.ms_per_sample)):round(BlinkMaxLatency(1,x)+(400/RELAX_cfg.ms_per_sample)))=1;
Error in RELAX_excluding_channels_and_epoching (line 140)
[continuousEEG_initialblinkmarking, ~] = RELAX_blinks_IQR_method(continuousEEG, epochedEEG, RELAX_cfg);
Error in RELAX_Wrapper (line 192)
[continuousEEG, epochedEEG] = RELAX_excluding_channels_and_epoching(continuousEEG, RELAX_cfg); % Epoch data, detect extremely bad data, delete channels if over the set threshold for proportion of data affected by extreme outlier for each electrode
Error in RELAX_SET_PARAMETERS_AND_RUN (line 377)
RELAXProcessing_ICA_AllParticipants, RELAXProcessingRoundThreeAllParticipants, RELAX_issues_to_check, RELAXProcessingExtremeRejectionsAllParticipants] = RELAX_Wrapper (RELAX_cfg);
Setting the RELAX_cfg.ProbabilityDataHasNoBlinks=2;, resulted in the following error:
Unrecognized field name "eyeblinkmask".
Error in RELAX_Wrapper (line 225)
Marking_all_artifacts_for_SER_ARR.RELAXProcessing.Details.NoiseMaskFullLength(continuousEEG.RELAX.eyeblinkmask==1)=1;
Error in RELAX_SET_PARAMETERS_AND_RUN (line 377)
RELAXProcessing_ICA_AllParticipants, RELAXProcessingRoundThreeAllParticipants, RELAX_issues_to_check, RELAXProcessingExtremeRejectionsAllParticipants] = RELAX_Wrapper (RELAX_cfg);
I've attached the output from the Command Window.
For another participant, I got a similar error but then for the field "NoiseMaskFullLength" and was able to circumvent the error by running this code during debugging:
continuousEEG.RELAXProcessing.Details.NoiseMaskFullLength = NaN(size(continuousEEG.RELAXProcessing.Details.horizontaleyemask));
I'm not sure whether that will still result in correctly cleaned data but I reckon the error is caused by a similar issue as with "eyeblinkmask"? Could it be my EEG data or is it likely to be some bug in the code? Thank you!
Update: I re-downloaded the RELAX_wrapper script and that seemed to have solved the "Unrecognised field eyeblinkmask" issue. However, I still experience the issue with NoiseMaskFullLength for several files:
Unrecognized field name "NoiseMaskFullLength".
Error in RELAX_horizontaleye (line 294)
for e=1:size(continuousEEG.RELAXProcessing.Details.NoiseMaskFullLength,2)
Error in RELAX_Wrapper (line 219)
[Marking_artifacts_for_SER_ARR] = RELAX_horizontaleye(continuousEEG, RELAX_cfg);
Error in RELAX_SET_PARAMETERS_AND_RUN (line 377)
RELAXProcessing_ICA_AllParticipants, RELAXProcessingRoundThreeAllParticipants, RELAX_issues_to_check, RELAXProcessingExtremeRejectionsAllParticipants] = RELAX_Wrapper (RELAX_cfg);
Relax parameters are mostly set to default.