[FieldTrip] how to concatenate non-continuous data after artifact rejection?

Vera Tsogli Barbara.Tsogli at uib.no
Mon Aug 3 12:24:11 CEST 2020


Hello,

I' m working on my first FieldTrip script to analyse continuous EEG
data. I removed manually some muscular artifacts (ft_databrowser) and
now when I display the data there are gaps and I haven't found a way to
concatenate the non-continuous data. For your information here are the
steps that I followed:
1. Check for bad channels and mark artifacts: artif =
ft_databrowser(cfg, data_all); (continuous data)
2. Channel interpolation: data_fixed = ft_channelrepair(cfg,data_all);
(continuous data)
3. Reject the artifacts: data_clear = ft_rejectartifact(cfg, data_fixed);
After step 3 if I display the data using the databrowser and I can see
that they are not continuous anymore because I have rejected the
segments that contained the artifacts. So, my question is how can I make
the data continuous again?
I tried the following but with no success:
(1) data_final = ft_appendata([], data_clear);
(2) cfg = [];
cfg.trl = [min(data_clear.sampleinfo(:,1))
max(data_clear.sampleinfo(:,2)) 0];
data_concat = ft_redefinetrial(cfg,data_clear);

Thank you in advance for your time.
Vera




More information about the fieldtrip mailing list