[Eeglablist] fieldtrip2eeglab Channel Locations, Rereference

Delorme, Arnaud adelorme at ucsd.edu
Thu Mar 3 11:43:00 PST 2022


Dear Tim,

You need to call the function fieldtrip2eeglab with 2 argument which uses the FILE-IO API instead of the legacy API.

eeglab_data = fieldtrip2eeglab(ft_data1.hdr, ft_data1.trial);

We have added a warning message to the fieldtrip2eeglab function to make this clearer.
Also, please pull the latest changes from EEGLAB on GitHub (develop branch; the default) as we have fixed an issue associated with channel types when converting channel locations.

Cheers,

Arno

> On Mar 3, 2022, at 9:46 AM, Makoto Miyakoshi via eeglablist <eeglablist at sccn.ucsd.edu> wrote:
> 
> Dear Tim,
> 
> Sorry for the trouble.
> Just a suggestion for a workaround, it seems possible to copy the denoised
> time series data matrix from ft_data1 to EEG.data. Have you tried that?
> 
> Makoto
> 
> On Mon, Feb 28, 2022 at 12:39 PM Redepenning, Tim via eeglablist <
> eeglablist at sccn.ucsd.edu> wrote:
> 
>> Dear list members,
>> 
>> As a matlab beginner I have been trying to set up a pre-processing
>> pipeline with EEGlab.
>> To remove line noise, I found the spectrum interpolation of the fieldtrip
>> toolbox to work well. So, my best idea was to transform my partly
>> pre-processed (re-reference, chanlocs, baseline removal) set-file to
>> fieldtrip, use the interpolation and transform it back.
>> Unfortunately, channel locations and information about rereference get
>> lost in the process. Am I making a mistake or is it not possible to keep
>> this information? In that case what would be the solution - removing the
>> line noise before all the other pre-processing steps?
>> 
>> 
>> Fsample = ALLEEG.srate;
>> data_path = 'D:\EEG_Dok\Neckercube\Pilot\VP09\';
>> cfg = [];
>> cfg.dataset = 'D:\EEG_Dok\Neckercube\Pilot\VP09\VP09_RR_base.set';
>> ft_data1 = ft_preprocessing(cfg);
>> ft_data1.trial{1,1} = ft_preproc_dftfilter(ft_data1.trial{1,1}, Fsample,
>> 50, 'dftreplace','neighbour','dftbandwidth',2,'dftneighbourwidth',1);
>> eeglab_data = fieldtrip2eeglab(ft_data1);
>> EEG = pop_saveset(eeglab_data,
>> 'filename','VP09_RR_base_LNR.set','filepath',data_path);
>> EEG.setname = 'VP09_RR_base_LNR';
>> eeglab redraw
>> 
>> 
>> 
>> Best wishes
>> 
>> Tim Redepenning
>> 
>> 
>> PhD Student | "Motor Control and Training" - Research Group
>> Faculty of Psychology and Sports Science
>> Bielefeld University | Cognitive Interaction Technology - Center of
>> Excellence (CITEC)
>> 33501 Bielefeld
>> Germany
>> 
>> Room: CITEC-1.411 | Phone: +49-(0)521-106-5129
>> E-Mail: tim.redepenning at uni-bielefeld.de<mailto:
>> tim.redepenning at uni-bielefeld.de>
>> 
>> _______________________________________________
>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>> To unsubscribe, send an empty email to
>> eeglablist-unsubscribe at sccn.ucsd.edu
>> For digest mode, send an email with the subject "set digest mime" to
>> eeglablist-request at sccn.ucsd.edu
>> 
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu




More information about the eeglablist mailing list