Thanks Vladimir, took a closer look at spm_eeg_detect_eyeblinks and see that
Laurence does indeed include a filtering (and a zeroing step) for the
respective EOG channel as per below
>> spm_eeg_detect_eyeblinks.m Rev: 3541 ~line 84
%% filter data at 1-15Hz (eyeblink duration typically 100-300ms) and demean
lp = 2*1./D.fsample;
hp = 2*15./D.fsample;
h1=fir1(1001,[lp hp]);
%to view filter properties can use: fvtool(h1,1,'Fs',D.fsample)
eog_filt = detrend(spm_filtfilt(h1,1,eog_data), 'constant');
%%
Unfortunately it doesn’t seem to remove the DC drift (see attached Image4)
which seems odd because a 1Hz highpass has been applied? I didn’t take
Laurence's excellent suggestion above to find out why using fvtool but
instead tried the 'linear' option with detrend by adding the following line
immediately after the above code:
eog_filt = detrend(eog_filt, 'linear');
This transform seemed to apply the threshold parameter more uniformly across
the recording, resolve/remove the drift and detect eyeblinks (see attached
Image5), although unsure whether this transformation would impact upon any
preceding or subsequent EOG correction steps in MEEG Tools?
Given the drift in this data (1 hour continuous EEG using Biosemi), I'd
appreciate any advice as to whether applying a similar linear detrend on the
EEG channels might be optimal prior to any processing (filtering, artifact
detection, wavelet transform etc), particularly given I want to undertake
source and time-frequency analyses?
Cheers
-Bill
> -----Original Message-----
> From: Vladimir Litvak [mailto:[log in to unmask]]
> Sent: Wednesday, 25 August 2010 5:32 AM
> To: Bill Budd
> Cc: [log in to unmask]; Laurence Hunt
> Subject: Re: [SPM] EOG artefact correction - reference paper?
>
> Dear Bill,
>
> You can just change your EOG channel type (e.g. to LFP), filter and
> then change it back. I actually thought filtering was applied to EOG
> type. I'll re-check when I'm at my desk. Also the eye blink detection
> function has a threshold parameter that you can try to play with. This
> function was written by Laurence and he has more experience with that
> and might be able to advise you.
>
> Best,
>
> Vladimir
>
> Sent from my iPad
>
> On 24 Aug 2010, at 02:08, Bill Budd <[log in to unmask]> wrote:
>
> > Dear Vladimir
> >
> > Many Thanks for the info below as the correction procedure outlined
> below
> > was easy to implement (haven’t tried Berg yet though).
> >
> > On problem I have had with some data is where spm_eeg_detect_eyeblinks
> fails
> > to detect eyeblinks due to a DC drift in the EOG channel. I've attached
> > results showing when the drift is not too severe and the procedure is
> > successful (Image 1) and another when it is not (Image 2).
> >
> > It appears I cannot baseline correct because the
> spm_eeg_detect_eyeblinks
> > operates on continuous data and high pass filtering doesn’t seem to
> apply to
> > EOG channels (although probably not a good idea as may remove signal of
> > interest since I'm limited to 1Hz minimum).
> >
> > I tried creating a bipolar EOG channel (Upper - Lower VEOG) and while
> this
> > removes the drift it often results in detection of both negative and
> > positive blinks (Image3) which seems suboptimal.
> >
> > I'm using Biosemi continuous data and wondered if there was any means to
> > detrend the EOG channel prior to running spm_eeg_detect_eyeblinks to
> > optimize the detection of blinks?
> >
> > Any Advice Appreciated!
> >
> > Cheers
> > -Bill
> >
> >> -----Original Message-----
> >> From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]]
> On
> >> Behalf Of Vladimir Litvak
> >> Sent: Wednesday, 21 July 2010 8:52 PM
> >> To: [log in to unmask]
> >> Subject: Re: [SPM] EOG artefact correction - reference paper?
> >>
> >> Dear Bill,
> >>
> >> These functions are in MEEGTools toolbox where things are not usually
> >> well-documented. But I can help you via the list if necessary. They
> >> work for both EEG and MEG. The method is topography-based so you need
> >> to provide an example of the artefact topography. For instance you can
> >> detect eye blinks in EOG channel or heart beat in ECG (for which there
> >> are also functions in MEEGTools), epoch around these events and
> >> provide either epoched or averaged artefact dataset to the function
> >> called 'Define spatial confounds'. Then choose SVD and select some
> >> number of components (~1-3, you should experiment to see what works
> >> and also whether epoched or averaged artefact works better). Then run
> >> 'Correct sensor data', load the file you want to correct, choose
> >> SPMEEG option and select the artefact dataset where the spatial
> >> confounds were defined. You can try either SSP or Berg options. SSP
> >> removes the subspace of the artefact completely (which is potentially
> >> more distortive) and Berg tries to protect the brain signals. To use
> >> Berg you need to define a forward model in the file via 3D source
> >> reconstruction (no need to invert).
> >>
> >> These methods use more or less the same principle as ICA for artefact
> >> correction but unlike with ICA you can define exactly what you want to
> >> remove and there is no need to run a heavy optimization procedure on
> >> your data and then pick the artefact components in a not always
> >> objective way.
> >>
> >> Best,
> >>
> >> Vladimir
> >>
> >> On Wed, Jul 21, 2010 at 11:35 AM, Bill Budd
> <[log in to unmask]>
> >> wrote:
> >>> Hi Vladimir
> >>>
> >>> I would like to use an EOG correction procedure in SPM8 but don’t see
> it
> >>> referenced anywhere in the manual? Is the procedure available for EEG?
> >>>
> >>> Cheers
> >>> -Bill
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: SPM (Statistical Parametric Mapping)
> [mailto:[log in to unmask]]
> >> On
> >>>> Behalf Of Vladimir Litvak
> >>>> Sent: Wednesday, 21 July 2010 6:37 PM
> >>>> To: [log in to unmask]
> >>>> Subject: Re: [SPM] EOG artefact correction - reference paper?
> >>>>
> >>>> Hi Melanie,
> >>>>
> >>>> The reference for the 'Berg' option is:
> >>>>
> >>>> A multiple source approach to the correction of eye artifacts.
> >>>> Berg P, Scherg M.
> >>>> Electroencephalogr Clin Neurophysiol. 1994 Mar;90(3):229-41.
> >>>>
> >>>> For SSP there is a recent paper:
> >>>>
> >>>> Phys Med Biol. 2001 Nov;46(11):2873-87.
> >>>> Partial signal space projection for artefact removal in MEG
> >>>> measurements: a theoretical analysis.
> >>>> Nolte G, Hämäläinen MS.
> >>>>
> >>>> It has some references to earlier applications of the method. The
> >> earliest
> >>>> is:
> >>>>
> >>>> Huotilainen M, Ilmoniemi R J, Titiinen H, Lavikainen J, Alho K,
> Simola
> >>>> M and Naatanen R 1993 Eye-blink removal
> >>>> for multichannel MEG measurements Abstract Int. Conf. on Biomagnetism
> >>>> (Vienna, Austria) pp 209–10
> >>>>
> >>>> Best,
> >>>>
> >>>> Vladimir
> >>>>
> >>>>
> >>>>
> >>>> Here is the most specific paper I found. It has some references to
> >>>> earlier papers at the beginning, but they are not specifically about
> >>>> SSP.
> >>>>
> >>>> On Tue, Jul 20, 2010 at 10:59 PM, Melanie Boly
> >> <[log in to unmask]>
> >>>> wrote:
> >>>>> Hi Vladimir,
> >>>>>
> >>>>> Someone asked me a reference paper for the method you use to correct
> >> eye
> >>>>> movements artefacts in SPM, in order to better understand it: it's
> >>>> working
> >>>>> so well :)
> >>>>>
> >>>>> Could you remind me where to look for that?
> >>>>>
> >>>>> Thanks :)
> >>>>>
> >>>>> Melanie
> >>>>>
> >>>>>
> >>>
> > <Image3.gif>
> > <Image1.gif>
> > <Image2.gif>
|