Electrode drift in EEG
I coudn’t find an image of electrode drift for my slides, so here I quickly generated one. The only fancy thing is the usage of datetime to have minutes on the x-axis (I also made this post so I don’t forget this trick ;))
Thanks to Anna Lisa Gert for this dataset
% Load Data EEG = pop_loadeep_v4('subj23.cnt'); % Load filtered data (takes 35min to filter...) EEG_filt = pop_loadset('2_subj23_lowpass_resample_deblank.set'); %% % Convert time to actual time timesnew = datetime(EEG.times/1000,'ConvertFrom','epochtime','Epoch','2000-01-01'); % select random channels chix = [5,63,27]; % Plot the unfiltered data plot(timesnew,EEG.data(chix,:)') % Make the plot beautiful datetick('x','MM','keeplimits','keepticks') % only show minutes xlabel('time [min]') ylabel('voltage [µV]') legend({EEG.chanlocs(chix).labels},'Location','East') box off title('EEG Electrode Drift (DC Amplifier, avg ref)') set(gca,'fontsize', 14) % for a presentation set(gca, 'FontName', 'HelveticaNeueLT Pro 45 Lt') %% % Convert again because data have been resampled timesnew = datetime(EEG_filt.times/1000,'ConvertFrom','epochtime','Epoch','2000-01-01'); plot(timesnew,EEG_filt.data(chix,:)') datetick('x','MM','keeplimits','keepticks') xlabel('time [min]') ylabel('voltage [µV]') legend({EEG.chanlocs(chix).labels}) box off title('EEG Electrode Drift (avg ref, 0.1Hz filter)') set(gca,'fontsize', 14) % for a presentation set(gca, 'FontName', 'HelveticaNeueLT Pro 45 Lt')
Great image! Thanks so much for generating it and making it available. I am using it in my EEG processing course.