eog artifact rejection
Sameer Walawalkar
sameer at ANDREW.CMU.EDU
Wed Feb 21 16:13:10 CET 2007
Dear JM and Christian,
On Tue, 20 Feb 2007, Jan Mathijs Schoffelen wrote:
> Dear sameer,
>
> Ad problem 1: Please specify:
>
> cfg.vartrllength = 2, prior to doing the timelockanalysis
This fixed the problem, thanks.
> Ad problem 2: Please specify:
>
> cfg.channelcmb = {'all' 'EOG'}, prior to doing freqdescriptives. (instead of
> {'all' 'ECG'}
Actually, I was using EOG, forgot to change it in the notes. so it is
still not working.
But I think I'll follow Christian's suggestion. I did not think of trying
that with Fieldtrip data structure. I am assuming if I find components
with artifacts, in one set of trials, the same components will be blink
artifacts in all trials as the ICAs = W * trialdata.
sameer
>
>
> JM
>
> -----Original Message-----
> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf
> Of Sameer Walawalkar
> Sent: Tuesday, February 20, 2007 5:07 PM
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] eog artifact rejection
>
> I am interested in removing blink artifacts. Unfortunately, with
> fieldtrip component analysis, it is difficult to identify the independent
> component corresponding to blinks by visual inspection due to the short
> timecourse over which they are presented (trial length).
>
> There are essentially two errors:
> 1> ??? Error using ==> timelockanalysis
> data has variable trial lengths, you specified not to accept that !
> 2> fdcomp.cohspctrm does not exist.
>
> I tried to follow instructions under independent component analysis (ICA)
> to remove ECG artifacts replacing eog for ecg. (I did not do any
> resampling). (Is this a good idea?)
>
> So I did,
> % go back to the raw data on disk and detect the peaks in the EOG channel,
> cfg = same.old.cfg.used.for.component.analysis.of.data;
> cfg.artfctdef.eog.pretim = 0.25;
> cfg.artfctdef.eog.psttim = 0.50-1/1200;
>
> [cfg, artifact] = artifact_eog(cfg); (found 11 artifacts)
>
>
> % preprocess the data around the peaks, i.e. read the segments of raw data
> containing the EOG artifact
> cfg = [];
> cfg.dataset = 'JD_012507_Beeps_One.fif';
> cfg.datatype = 'continuous';
> cfg.padding = 10;
> cfg.dftfilter = 'yes';
> cfg.blc = 'yes';
> cfg.trl = [artifact zeros(size(artifact,1),1)];
> cfg.channel = {'MEG' 'EOG'};
> data_eog = preprocessing(cfg)
>
> % decompose the ECG-locked datasegments into components, using the
> previously found (un)mixing matrix
> cfg = [];
> cfg.topo = compRR_orig.topo;
> cfg.topolabel = compRR_orig.topolabel;
> comp_eog = componentanalysis(cfg, data_eog);
> selecting 307 channels
> baseline correcting data
> starting decomposition using predetermined mixing matrix
> total time in componentanalysis 1.2 seconds
>
>
> % compute a frequency decomposition of all components and the ECG
>
> cfg = [];
> timelock = timelockanalysis(cfg, comp_eog);
> applying preprocessing options
> ??? Error using ==> timelockanalysis
> data has variable trial lengths, you specified not to accept that !
>
> % compute a frequency decomposition of all components and the ECG
>
> cfg = [];
> cfg.method = 'mtmfft';
> cfg.output = 'fourier';
> cfg.foilim = [0 100];
> cfg.taper = 'hanning';
> cfg.pad = 'maxperlen';
> freq = freqanalysis(cfg, comp_ecg);
>
>
> % compute coherence between all components and the ECG
> cfg = [];
> cfg.channelcmb = {'all' 'ECG'};
> cfg.jackknife = 'no';
> fdcomp = freqdescriptives(cfg, freq);
>
> Even though I get computing cross-spectral densities message, I do not get
> .cohspctrm.
>
> fdcomp =
>
> dimord: 'chan_freq'
> freq: [1x155 double]
> label: {307x1 cell}
> powspctrm: [307x155 double]
> dof: [307x155 double]
> cfg: [1x1 struct]
>
>
> Sorry for the long email, and thanks for your help.
>
> sameer
>
>
More information about the fieldtrip
mailing list