[FieldTrip] Frequency shift after source reconstruction

Luca La Fisca 534843 at umons.ac.be
Wed May 27 09:33:58 CEST 2020

```Dear community,

I'm Luca La Fisca, PhD student in Belgium and I'm validating the source
reconstruction algorithm using "ft_dipolesimulation".

After having performed a frequency analysis, I noticed the reconstructed
sources have twice the initial frequencies as shown in the following
figures (initial dipole frequencies = 10 and 85 Hz) :

Timelock:
[image: image.png]

Reconstructed sources:
[image: image.png]

Here is the code used to get the timelock signal:
fs = 2048;
fs_down = 512;

% generate EEG pseudo-signal
cfg      = [];
cfg.elec = elec_aligned;
cfg.channel = elec_aligned.label(1:64);

cfg.dip.pos = [
-1 65 36           % dipole left
1 -62 43          % dipole right
];

unif_dip = 3^(1/2)/3;
cfg.dip.mom = ...
[ unif_dip unif_dip unif_dip 0 0 0 ]' + ...
[ 0 0 0 unif_dip unif_dip unif_dip ]';

event = event(3:end);
signal1 = zeros(length(eeg_data.trial));
signal2 = zeros(length(eeg_data.trial));
val = [event.value];
for s = drange([event(val==10).sample, event(val==11).sample,
event(val==12).sample])
time = (0:ceil(fs*0.5))/fs;
signal1(s:s+ceil(fs*0.5)) = 10*sin(10*time*2*pi);
signal2(s:s+ceil(fs*0.5)) = 30*cos(85*time*2*pi);
end

cfg.dip.signal = {[signal1; signal2]};
cfg.fsample = fs;
raw1 = ft_dipolesimulation(cfg);

% Timelock analysis
% define trials
cfg = [];
cfg.dataset = EEG_FILE;
cfg.trialdef.eventtype  = 'STATUS';
cfg.trialdef.eventvalue = [10 11 12];
cfg.trialdef.prestim    = 0.5;
cfg.trialdef.poststim   = 1;
cfg = ft_definetrial(cfg);
data_trial = ft_redefinetrial(cfg, raw1);

% downsample
cfg = [];
cfg.resamplefs = fs_down;
data_trial = ft_resampledata(cfg,data_trial);

cfg = [];
timelock = ft_timelockanalysis(cfg, data_trial);

Here the code related to the source reconstruction:
cfg = [];
cfg.sourcemodel = sourcemodel;    %% where are the sources?
cfg.elec        = elec_aligned; %% where are the sensors?
cfg.channel = elec_aligned.label(1:64);

% Source reconstruction
cfg                     = [];
cfg.method              = 'mne';
cfg.elec                = elec_aligned;             %the electrodes
cfg.channel             = elec_aligned.label(1:64); %the useful channels
cfg.mne.prewhiten       = 'yes';                    %prewhiten data
cfg.mne.lambda          = 0.01;                     %regularisation
parameter
cfg.mne.scalesourcecov  = 'yes';                %scaling the source
covariance matrix
minimum_norm_eeg        = ft_sourceanalysis(cfg,timelock);

Here the code to perform the frequency analysis:
tmp_pow = minimum_norm_eeg.avg.pow;
pow_fft = fft(tmp_pow'); %freq analysis of reconstructed sources
% pow_fft = fft(timelock.avg'); %freq analysis of timelock signal
% (un)comment depending on the desired one

L = length(timelock.avg);
f = fs_down*(0:(L/2))/L;

P2 = abs(pow_fft/L);
P1 = P2(1:L/2+1,:);
P1 = P1.*f';

figure()
plot(f,P1)
title('Single-Sided Amplitude Spectrum of Reconstructed Sources')
xlabel('f (Hz)')
ylabel('|P1(f)|')

Do you have any idea of what is responsible to this double frequency?
Do you think it is a general issue?
Is it a major issue leading to wrong analysis of the reconstructed signal
(e.g. connectivity analysis)?

Best regards,

*Luca La Fisca*
*PhD Student*
Service d'Information, Signal et Intelligence Artificielle

Boulevard Dolez, 31

7000 Mons

+32 (0)65/37.40.83

*Luca.LAFISCA at umons.ac.be <Luca.LAFISCA at umons.ac.be>*

Garanti
sans virus. www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200527/c1d6bdbc/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 99182 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200527/c1d6bdbc/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 99627 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200527/c1d6bdbc/attachment-0003.png>
```