[Eeglablist] Using two different caps together

Downey, Ryan J RDowney at bme.ufl.edu
Tue Feb 19 07:49:15 PST 2019


Sorry. I didn't realize you were wanting to use the built in comparison across datasets. I assumed you were going to create the ERPs individually and then compare.

The code you wrote looks like it would re-order EEG1 to match EEG2 for the most part but you may still have issues if one dataset has an extra channel that the other dataset doesn't have. The way I would probably go about it is to use EEGLAB's interpolation function  (Tools/Interpolate Electrodes). Note that if both datasets have the exact same list of channels but in a different order, the interpolation function won't work (it'll notice there are no missing channels and then do nothing). In that scenario I would use the code you wrote. However, since you mentioned you are missing channel Iz in one of the datasets, the interpolation function will fill in the missing Iz data and then rearrange the channels properly which is exactly what you wanted.

Assuming data from two caps, EEG1 and EEG2, where EEG2 contains ALL the channels in EEG1 but EEG1 is missing one or more channels from EEG2 and the ordering of channels differs across datasets. Then call:

EEG1_reorderedAndInterp = pop_interp(EEG1, EEG2.chanlocs,'spherical');

Your new EEG1 dataset will now have the exact same channels as EEG2 in the exact same order. Note you will need to have channel location information for the interpolation to work. 

One last thing, did your two caps have the same reference channel? Your ERPs won't make sense if you are comparing different references.

Sincerely,
Ryan Downey



-----Original Message-----
From: Emmanuelle Renauld <emmanuelle.renauld.1 at ulaval.ca> 
Sent: Tuesday, February 19, 2019 8:40 AM
To: Downey, Ryan J <RDowney at bme.ufl.edu>; eeglablist at sccn.ucsd.edu
Subject: RE: Using two different caps together

Hi,

Thank you for this useful line, I will keep it. However, it doesn't completely solve my problem if I want to use pop_erpcomp:

pop_erpcomp(ALLEEG,  1, [1 2], 'chans', chInd) 

It still supposes that FP1 would be the same index in both datasets. Actually, even without using the 'chans' option, I still can't use pop_erpcom(ALLEEG): it stops telling me that the two datasets don't have the same number of channels. That's why I think that I will have to completly change the order of the channels. Would this be enough (supposing that I don't have any icaact computed)? Is there another field I need to change?


EEG1_newOrder = EEG1;

my_order = {EEG2.chanlocs.labels};
for c =1:length(my_order)
        chInd1 = find(strcmp(my_order{c},{EEG1.chanlocs.labels}));        
        EEG1_newOrder.data(c,:) = EEG1.data(chInd1,:);
        EEG1_newOrder.chanlocs(c) = EEG1.chanlocs(chInd1); end

Emmanuelle
________________________________________
De : Downey, Ryan J <RDowney at bme.ufl.edu> Envoyé : 18 février 2019 15:48 À : eeglablist at sccn.ucsd.edu Cc : Emmanuelle Renauld Objet : RE: Using two different caps together

You can try something like:

chLabel = 'FP1';
chInd = find(strcmp(chLabel,{EEG.chanlocs.labels}));

Then use "chInd" wherever you would otherwise type 'chans',1.

Sincerely,

Ryan J. Downey
Postdoctoral Associate
Human Neuromechanics Laboratory
University of Florida


-----Original Message-----
From: eeglablist <eeglablist-bounces at sccn.ucsd.edu> On Behalf Of Emmanuelle Renauld
Sent: Monday, February 18, 2019 12:20 PM
To: eeglablist at sccn.ucsd.edu
Subject: [Eeglablist] Using two different caps together


Hi everyone,

I would like to know the easiest way to deal with multiple EEG datasets with different chanlocs when plotting my final ERP. For instance, using pop_comperp, if I want to plot only one channel, I can't use  the option 'chans', 1 because 1 doesn't refer to the same channel in every dataset. It would be nice if I could say 'chans', 'FP1' but I can't.

I could manually inverse the order of all my channels in all my datasets so that they would be the same. I don't think it exists, does it? Something like pop_rearrange_chanorders(EEG, new_order). The two caps contain nearly all the same channels, except for Iz that I would have to forget in one of the caps.

Or is there another way to use pop_comperp? Can you help?


Thanks!


Emmanuelle


P.S I know that comparing two datasets recorded with two different caps is not the best way but our cap was broken and we had to continue with another one... :(








_______________________________________________
Eeglablist page: https://urldefense.proofpoint.com/v2/url?u=http-3A__sccn.ucsd.edu_eeglab_eeglabmail.html&d=DwICAg&c=pZJPUDQ3SB9JplYbifm4nt2lEVG5pWx2KikqINpWlZM&r=KssPiEhnhBiSJO8B8Z52FmDLXXIqSZMVgZMN9FykiAE&m=QDWNEiTL5OMCEL9kL-POyR00Y7cvpP2HEHi2uVCHNJM&s=rtoX7hzTaFP9RWC4PHP-QysrZICON0zNod4tAQIzv0s&e=
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