[FieldTrip] DICS in fieldtrip: Hermitian vs not Hermitian spectral matrix computations - Multiple frequencies

Enrico Sozza enrico.sozza at ub.edu
Thu Mar 27 16:17:30 CET 2025


Hello FieldTrip community allies,

I come to seek your help in a field that goes way deeper than what my background allows me to understand, so forgive me beforehand if my questions come as no-sense or missing solid theoretical bases.

I am trying to source localize oscillatory EEG data through DICS beamforming and I came across some theoretical/methodological doubts that I couldn't clarify through the available documentation.

The first is related to the 'equivalence' of the output of ft_sourceanalysis with method DICS depending on what type of data you input: for what I read, it seems you can feed it with frequency data as output of ft_freqanalysis with either output 'fourier' or 'powandcsd' and expect the same computation.
Yet, after a deep dive into the functions, it seems that in ft_checkdata, with freq.fourierspctrm as input, computes just a symmetrical matrix (Cf, to be inverted later on) but not the Hermitan transpose with the complex conjugates (Actual CSD matrix), which seems to be critical for an adequate estimation of spectral properties and spatial relationship. So, I would say it is not actually the same, and I would say is mathematically 'invalid' (?).  If so, why is it implemented in FieldTrip? Why does it compute
data.fourierspctrm = reshape(data.fourierspctrm, [nrpt nchn nfrq*ntim]);
crsspctrm = complex(zeros(nchn,nchn,nfrq*ntim));
for k = 1:nfrq*ntim
tmp = transpose(data.fourierspctrm(:,:,k));
tmp(~isfinite(tmp)) = 0;
n = sum(tmp~=0,2);
crsspctrm(:,:,k) = tmp*tmp'./n(1);
end
instead of:

     crsspctrm(:,:,k) = tmp*conj(tmp')./n(1);

I guess manually changing the function it is somehow not suggested, otherwise it would have been coded as such since the beginning, but I am still left with quite a bit of uncertainty in such regard.




My other question is:
I know DICS is implemented to computing spatial filters tailored to a specific frequency, due to the process of averaging CSDs across trials before computing the inverse. Yet, I also saw that at the end with 'cfg.realfilter = yes' it only works with the real part of the matrix, keeping only the information regarding near zero-lag correlated signal and ignoring any phase-related relationship.
Keeping this into consideration, and assuming neurobiologically that activity ad different frequencies come from the same neural generators, would it be mathematically inappropriate or impossible to interpret to compute DICS feeding it with fft coefficients computed at different frequencies across trials? Again, bearing in mind that the goal is source localizing oscillatory activity (i.e., power) at those different frequencies in different trials, assuming they come from the same sources.



I am learning so much about this in-depth physics of signal processing and it's quite exciting, but my resources are quite limited, and I therefore would really value and appreciate any insight from you guys, hoping that I am not already blindingly hitting a wall.


Thank you very much in advance for the time you took to read this email and for your help.
Best of luck with your work
Regards


Enrico Sozza, PhD Student

Brainlab – Cognitive Neuroscience Research Group

Department of Clinical Psychology and Psychobiology

Institute of Neurosciences

University of Barcelona

P. Vall d'Hebron 171, 08035 Barcelona, Catalonia-Spain
Tel: +34 933 125 058 – Fax: +24 934 021 584

https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ub.edu%2Fbrainlab%2Fteam-post%2Fenrico-sozza&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cc0923e00815a471c943f08dd6d4281a1%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638786854611752295%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=jc%2BUhuGe%2BdFmAikQyIRaBTLiOg%2FSFMmSg90OPzuwjEw%3D&reserved=0

https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.neurociencies.ub.edu%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cc0923e00815a471c943f08dd6d4281a1%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638786854611773036%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=1qmtK7RH3LFgueKA40aD%2F0uRh3699yGYCwyZ5kByni0%3D&reserved=0<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.neurociencies.ub.edu%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cc0923e00815a471c943f08dd6d4281a1%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638786854611790122%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=siUrshPvTc2w7Zu7WIThoRaYr%2Fa%2F7d9XEnF86DdOTP4%3D&reserved=0>


Aquest missatge, i els fitxers adjunts que hi pugui haver, pot contenir informació confidencial o protegida legalment i s’adreça exclusivament a la persona o entitat destinatària. Si no consteu com a destinatari final o no teniu l’encàrrec de rebre’l, no esteu autoritzat a llegir-lo, retenir-lo, modificar-lo, distribuir-lo, copiar-lo ni a revelar-ne el contingut. Si l’heu rebut per error, informeu-ne el remitent i elimineu del sistema tant el missatge com els fitxers adjunts que hi pugui haver.

Este mensaje, y los ficheros adjuntos que pueda incluir, puede contener información confidencial o legalmente protegida y está exclusivamente dirigido a la persona o entidad destinataria. Si usted no consta como destinatario final ni es la persona encargada de recibirlo, no está autorizado a leerlo, retenerlo, modificarlo, distribuirlo o copiarlo, ni a revelar su contenido. Si lo ha recibido por error, informe de ello al remitente y elimine del sistema tanto el mensaje como los ficheros adjuntos que pueda contener.

This email message and any attachments it carries may contain confidential or legally protected material and are intended solely for the individual or organization to whom they are addressed. If you are not the intended recipient of this message or the person responsible for processing it, then you are not authorized to read, save, modify, send, copy or disclose any part of it. If you have received the message by mistake, please inform the sender of this and eliminate the message and any attachments it carries from your account.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20250327/a2b60210/attachment.htm>


More information about the fieldtrip mailing list