Decrease in channels after re-referencing

Dear community,

I am using a dataset for which 61 actively-amplified electrodes and one ground electrode were used according to Easycap M10 layout. I have some concerns regarding the preprocessing steps I’m taking. I shall be extremely grateful to get any comment and advice on this.

The raw data has the following structure:
[
hdr (1x1 struct)
label (62x1 cell)
time (1x1 cell)
trial (1x1 cell)
fsample - 500
sampleinfo [1, 366525]
cfg (1x1 struct)
]

Here, cfg has refchannel =[ ] and refmethod = ‘avg’. label has total 62 entries which are: 1 to 61 (except 29), VEOG, and aux5.

A proc structure containing the preprocessing parameters has been given which includes trl, badchans, implicitref as 29 and refchannels as 25 and 29.

I have used ft_redefinetrial to get epoched data followed by ft_preprocess to apply hpfilter, followed by ft_channelrepair to fill values for bad channels (here I added 29 as the missing channel). The data until now has 61 channels.

Then I use the following cfg for re-referencing:

cfg_reref.implicitref = ‘29’;
cfg_reref.reref = ‘yes’;
cfg_reref.refchannel = proc.proc.refchannels;

rereferenced_data = ft_preprocessing(cfg_reref, repaired_data);

Now, the label of rereferenced_data has 59 channels only.

Could someone please tell why this is happening and if the preprocessing steps are in the right order? I can give link to raw data, proc file and my script if needed.

I am working with EEG for the first time. Any help would be highly appreciated.

I have posted this to FieldTrip mailing list as well.

Thanking you,

Sincerely,
Akshi
IIIT-Bangalore, India

1 Like

Dear community,

On closer inspection, I found out that there were some discrepancies between the neighbourplot I was getting using the layout I had and the ideal neighbourplot. This led me to prepare my own layout by plotting electrode positions manually and the issue is now resolved.

Thanks and regards,
Akshi