[FieldTrip] fieldtrip Digest, Vol 144, Issue 14

Gyori Edit Lelle edit.gyori at gmail.com
Fri Nov 18 23:29:03 CET 2022


On Fri, 18 Nov 2022 at 15:15, <fieldtrip-request at science.ru.nl> wrote:

> Send fieldtrip mailing list submissions to
>         fieldtrip at science.ru.nl
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> or, via email, send a message with subject or body 'help' to
>         fieldtrip-request at science.ru.nl
>
> You can reach the person managing the list at
>         fieldtrip-owner at science.ru.nl
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of fieldtrip digest..."
>
>
> Today's Topics:
>
>    1. Re: Help with ft_sourcestatistics (Schoffelen, J.M. (Jan Mathijs))
>    2. Re: Help needed for timelock analysis
>       (Francisco Javier Quirant Agulló)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 18 Nov 2022 14:09:28 +0000
> From: "Schoffelen, J.M. (Jan Mathijs)"
>         <janmathijs.schoffelen at donders.ru.nl>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: Re: [FieldTrip] Help with ft_sourcestatistics
> Message-ID: <F2D7B73C-A0E7-4529-87AD-510992F431B0 at donders.ru.nl>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Francisco,
>
> The fieldname ‘avg’, in the source reconstructed data has a historical
> reason, but is a bit unlucky and misleading. Indeed it refers to the fact
> that the numeric data in the sub-structure reflects an average (across a
> bunch observations). In your case it is the signal power in the baseline
> and in the post stimulus respectively.
>
> Now, if you want to run a permutation test, you need a sufficient amount
> of subjects (which in this case serve as the ‘observations’). This is what
> Stephan refers to in his earlier reply in this thread. Given that you used
> only 1 subject worth of data, the code throws an error (and correctly so),
> because there is not much to permute. To do a meaningful statistical
> inference you need at least results from 15 or so (but ideally more)
> subjects.
>
> If, on the other hand, you want to perform the statistics within the
> subject (i.e. using the individual trials as units-of-observation for the
> permutation) you need to set up your analysis in a slightly different way.
>
> Best wishes,
>
> Jan-Mathijs
>
>
> On 18 Nov 2022, at 14:20, FRANCISCO JAVIER GÓMEZ CAMPOS via fieldtrip <
> fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:
>
>
> Dear Stephan,
>
> Thank you for your response, but in this case our source analysis data
> does not contain the average across subjects. If you refer to the ‘avg’
> structure, it is one of the outputs coming from performing the source
> analysis by contrasting the pre and post stimulus interval. During the
> process, I calculate an inverse filter calculated from both intervals
> together and then applied separately to each interval, from this process I
> obtain the output ‘avg’, I do this for each subject and each condition.
>
> You can see it in more detail at this link
> https://www.fieldtriptoolbox.org/tutorial/beamformer/<
> https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/tutorial/beamformer/__;!!HJOPV4FYYWzcc1jazlU!6N5sAUOLFHX5VmnV9FuI390JcfBKDqKW5I94Eju8n6bs515XFjjjZfbDgj9-ZJOis1KRANuRDSZRpVED-QyvuI2uvBEic1IE_2mg0g$>
> in the section ‘Source Analysis: Contrasting activity to another interval’.
>
> Our source data are distributed as follows, for each subject I have the
> mean power of each voxel for each condition independently, perhaps best
> understood with the following image: <
> https://urldefense.com/v3/__https://gyazo.com/00af9e5ca9647bec71d561c4197eefc5__;!!HJOPV4FYYWzcc1jazlU!6N5sAUOLFHX5VmnV9FuI390JcfBKDqKW5I94Eju8n6bs515XFjjjZfbDgj9-ZJOis1KRANuRDSZRpVED-QyvuI2uvBEic1KfbWELHw$>
> https://gyazo.com/39bb9c919f469d95f984a68b6dca6e18<
> https://urldefense.com/v3/__https://gyazo.com/39bb9c919f469d95f984a68b6dca6e18__;!!HJOPV4FYYWzcc1jazlU!6N5sAUOLFHX5VmnV9FuI390JcfBKDqKW5I94Eju8n6bs515XFjjjZfbDgj9-ZJOis1KRANuRDSZRpVED-QyvuI2uvBEic1JEfrkLwg$
> >
>
> [
> https://lh6.googleusercontent.com/fLsaCgJYAhYIaQRGNxzNEdwzQN7n10QBbjS-oOeTbhvP68qQ3rBW8dnFa37-Vg2pzaNbY2NiVPCW4YCNLwwed-IpPQfXo-RzL1Sh9ac7LgqEkClX4kIr79C_BAfOvGhmtIMeW-wgY5VYJ31TSbyQpcllTBTnD13S5roabFDKvjtghYDMV7sr-2Kz1Hanbg
> ]
> We suspect that the problem could stem from the fact that our data
> structure differs from the one described in the tutorial for
> ft_sourcestatistics in that we do not provide sources from each trail, but
> the average source of each condition instead. So, our question is whether
> with this data structure we can perform a nonparametric randomization test,
> by creating the null hypothesis distribution shuffling voxels between
> conditions and then obtain an 'average' null distribution across subjects.
> I am not sure if this makes sense. Another way could be to shuffle
> conditions across subjects and obtain a null hypothesis distribution from
> this shuffle.
>
>
> Thank you again,
>
> Best,
>
> Francisco Javier Gómez
>
> Instituto de Biomedicina de Sevilla(IBIS)
>
>
> ________________________________
> De: STEPHAN MORATTI <smoratti at psi.ucm.es<mailto:smoratti at psi.ucm.es>>
> Enviado: jueves, 17 de noviembre de 2022 14:44
> Para: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:
> fieldtrip at science.ru.nl>>
> Cc: FRANCISCO JAVIER GÓMEZ CAMPOS <fjgomez-ibis at us.es<mailto:
> fjgomez-ibis at us.es>>
> Asunto: Re: [FieldTrip] Help with ft_sourcestatistics
>
> Dear Francisco,
>
> It seems that in your source data you probably have the average across
> subjects, but the individual source data for each subject is missing. You
> may store them in individual cells and then submit these cells to the
> source statistics.
>
> Best,
>
> Stephan
>
>
> El jue, 17 nov 2022 a las 11:32, FRANCISCO JAVIER GÓMEZ CAMPOS via
> fieldtrip (<fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>)
> escribió:
> Dear community,
>
> I am having problems using the ft_sourcestatistics function. I would like
> to use this function
> to conduct a within-subject analysis to establish which areas show
> differences between two
> experimental conditions. I mainly have doubts about two aspects, the first
> one is about how to
> attach the source analysis data, and the second one is about the design of
> the design matrix.
>
> Regarding the data coming from the source analysis, I have the sources
> separated by
> conditions (obtained by following this tutorial
> https://www.fieldtriptoolbox.org/tutorial/beamformer/<
> https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/tutorial/beamformer/__;!!HJOPV4FYYWzcc1jazlU!6N5sAUOLFHX5VmnV9FuI390JcfBKDqKW5I94Eju8n6bs515XFjjjZfbDgj9-ZJOis1KRANuRDSZRpVED-QyvuI2uvBEic1IE_2mg0g$
> >):
>
> Source analysis data for each condition:
> freq: 4.8302
> cfg: [1×1 struct]
> dim: [85 110 132]
> inside: [1234200×1 logical]
> pos: [1234200×3 double]
> method: 'average'
> avg: [1×1 struct]
>
> avg:
> pow: [1234200×1 double]
> noise: [1234200×1 double]
> filter: {1234200×1 cell}
> label: {61×1 cell}
> filterdimord: '{pos}_ori_chan'
>
> The code I use is the following (based on this code in this tutorial
> https://www.fieldtriptoolbox.org/example/source_statistics/<
> https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/example/source_statistics/__;!!HJOPV4FYYWzcc1jazlU!6N5sAUOLFHX5VmnV9FuI390JcfBKDqKW5I94Eju8n6bs515XFjjjZfbDgj9-ZJOis1KRANuRDSZRpVED-QyvuI2uvBEic1IM6xnJLg$>
> ) :
>
> design=[1 2]; %for 2 conditions
> % run sourcestatistics using cluster based correction %
> cfg = [];
> cfg.dim = sourceanalysis_condition1(1).dim;
>
> cfg.method = 'montecarlo';
> cfg.statistic = 'ft_statfun_depsamplesT';
> cfg.parameter = 'pow';
> cfg.correctm = 'cluster';
> cfg.numrandomization = 'all';
> cfg.alpha = 0.05; % note that this only implies single-sided testing
> cfg.tail = 0;
> cfg.design(1,:) = [1:length(find(design==1)) 1:length(find(design==2))];
> cfg.design(2,:) = design;
> cfg.uvar = 1; % row of design matrix that contains unit variable (in this
> case: trials)
> cfg.ivar = 2; % row of design matrix that contains independent variable
> (the conditions)
> stat = ft_sourcestatistics(cfg, sourceanalysis_condition1,
> sourceanalysis_condition2)
>
> When I run this code, I get the following error:
> Error using ft_statfun_depsamplesT (line 83)
> The data must contain at least two units of observation (trials or
> subjects).
>
> I understand that my design matrix and/or the structure of
> sourceanalysis_condition are
> wrong, I have tried different combinations and I cannot find the solution.
> I hope you can
> guide me in this regard so that I can adapt it to the conditions of my
> study.
>
> Thanks,
> Francisco Javier Gómez,
> Instituto de Biomedicina de Sevilla (IBIS)
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202<
> https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!6N5sAUOLFHX5VmnV9FuI390JcfBKDqKW5I94Eju8n6bs515XFjjjZfbDgj9-ZJOis1KRANuRDSZRpVED-QyvuI2uvBEic1IhCnYeZw$
> >
>
>
> --
>
> Stephan Moratti, PhD
> Profesor de Psicología Experimental
> Departamento de Psicología Experimental
> Facultad de Psicología
> Center for Cognitive and Computational Neuroscience
> Universidad Complutense de Madrid
> smoratti at ucm.es<mailto:smoratti at ucm.es>
>
> [http://www.ucm.es/logo/ucm.png]
>
> La información contenida en este correo es CONFIDENCIAL, de uso exclusivo
> del destinatario/a arriba mencionado. Si ha recibido este mensaje por
> error, notifíquelo inmediatamente por esta misma vía y proceda a su
> eliminación, ya que ud. tiene totalmente prohibida cualquier utilización
> del mismo, en virtud de la legislación vigente.
>
> Los datos personales recogidos serán incorporados en la actividad de
> tratamiento 'Correoweb', bajo la titularidad del Vicerrectorado de
> Tecnologías de la Información, y en él el interesado/a podrá ejercer los
> derechos de acceso, rectificación, supresión u oposición ante el mismo
> (artículos 15-21 del Reglamento UE 2016/679 de 27 de abril de 2016).
>
> [http://www.ucm.es/logo/ambiente.png] Antes de imprimir este correo
> piense si es necesario: el medio ambiente es cosa de todos.
>
> This message is private and confidential and it is intended exclusively
> for the addressee. If you receive this message by mistake, you should not
> disseminate, distribute or copy this e-mail. Please inform the sender and
> delete the message and attachments from your system, as it is completely
> forbidden for you to use this information, according to the current
> legislation. No confidentiality nor any privilege regarding the information
> is waived or lost by any mistransmission or malfunction.
>
> The personal data herein will be collected in the file "Correoweb", under
> the ownership of the Vice-Rectorate for Information Technologies, in which
> those interested may exercise their right to access, rectify, erasure or
> right to object the contents (article 15-21 of Regulation (EU) 2016/679,
> General Data Protection Regulation).
>
> [http://www.ucm.es/logo/ambiente.png] Before printing this mail please
> consider whether it is really necessary: the environment is a concern for
> us all.
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!6N5sAUOLFHX5VmnV9FuI390JcfBKDqKW5I94Eju8n6bs515XFjjjZfbDgj9-ZJOis1KRANuRDSZRpVED-QyvuI2uvBEic1IhCnYeZw$
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221118/c672a283/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 2
> Date: Fri, 18 Nov 2022 14:46:13 +0000
> From: Francisco Javier Quirant Agulló  <FJQUIAGU at upv.edu.es>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: Re: [FieldTrip] Help needed for timelock analysis
> Message-ID:
>         <
> DB6P190MB0055EF7B329F4780D5C4191FF9099 at DB6P190MB0055.EURP190.PROD.OUTLOOK.COM
> >
>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Jan,
>
> Thank you very much for your patience and efforts. You are very much
> right, I have gotten those results some minutes before your email and was
> collecting information for calling Fixed on the mailing list. Truly i must
> have passed on something trivial because for the past week i was getting
> something more like this:
>
> [cid:c47d9644-6773-45ba-b28c-2f924dfc1937]
>
> This screenshot is from checking the sent code yesterday.
>
> Answering your side note, i was trying to separate the single trial in to
> multiple because of a coment on the ft_timelockanalysis function. While
> trying to pass the variables directly it gave an error but when i called a
> file didn't say anything so i kept it that way. Now that it works properly
> on single trial this piece will be erased.
>
> Thanks a lot again for your time and help,
> Greetings,
> Javier.
> ________________________________
> De: fieldtrip <fieldtrip-bounces at science.ru.nl> en nombre de Schoffelen,
> J.M. (Jan Mathijs) via fieldtrip <fieldtrip at science.ru.nl>
> Enviado: viernes, 18 de noviembre de 2022 14:27
> Para: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Cc: Schoffelen, J.M. (Jan Mathijs) <janmathijs.schoffelen at donders.ru.nl>
> Asunto: Re: [FieldTrip] Help needed for timelock analysis
>
> Hi Javier,
>
> Thanks for the update, and sorry to continue nagging about this, but it is
> - despite your (and certainly also my) best efforts - still not clear what
> your problem is. I felt lucky, so I downloaded the data, and performed the
> following (inspired by the code that you sent along):
>
> [cid:57062A47-E1C6-468B-8B4D-D779231F63C0]
>
> The call to ft_topoplotER yielded three figures, which clearly show
> different topographies. Note that what is visualized is the (average of
> the) time course, not the covariance. So the interim conclusion is that the
> data is different in the 3 different ‘conditions’, at least in their
> average (which is according to the code that you provided)
>
> [cid:2A726A6B-E907-494C-A646-39A8D1D20FA9]
>
>
> Next, I decided to compute the covariance per condition, and check whether
> they are equal. This does not seem to be the case, because I get:
>
> [cid:771BB67D-CDD4-4865-A6D0-42FFB9CDD0A6]
>
> Visualization of the covariance matrices confirms this
>
> [cid:A811EEE6-5E6D-461C-ABEF-0FCB776E8917]
>
>
> In summary, I don’t think that there is something wrong with
> ft_timelockanalysis, at least not in the sense that the 'covariance
> distributions’ are the same. What makes you (still) think that they are the
> same?
>
>
>
> Also - as a side note - I don’t understand why you first create a data
> structure in fieldtrip style, save it as a mat-file, and then call
> ft_preprocessing on it. What do you think that this step achieves?
>
> Best wishes,
> Jan-Mathijs
>
>
>
>
> On 18 Nov 2022, at 11:44, Francisco Javier Quirant Agulló via fieldtrip <
> fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:
>
> Hi Jan-Mathijs,
>
>
>
> First thank you again for your patience and the suggested links. I
> apologize as trying to be concise I’ve fallen way short. Lets try this
> again with more organized information. Also apologies for any typos as
> English is my second language.
>
>
>
> Goal: As stated in my initial mail the objective is to characterize source
> estimation methods through metrics. Some of this metrics are derived from a
> Resolution matrix that is obtained with the inverse kernel and the
> leadfield matrix (R = KL). Resolution matrices for all source points get
> averaged in a so called empirical Resolution matrix from where the metrics
> get extracted.
>
>
>
> Steps: To obtain this matrix all source model points have to “activate”.
> This is achieved by dividing the brain volume in patches (following
> Desikan-Killiani’s atlas) that activate in different trials or sessions.
> With Brainstorm a step signal of 1000 samples and fs= 500Hz gets generated
> and forced upon those patches, so for every source point within them this
> is the source signal. There are 68 patches that activate in different
> trials or sessions, from each of these a EEG (64 electrode cap) gets
> simulated using a BEM model calculated with Brainstorm default/tutorial
> files. Some amount of noise is added, random noise in the source signals
> distribution and a combination of pink+white noise as sensor noise when
> obtaining the EEG signals. At the end of the day there are 68 different
> source activation maps with their associated EEG level signals. With this
> EEG signals different estimations (dSPM, eLORETA, sLORETA…) will be
> performed and Resolution matrices obtained for each of them.
>
>
>
> From here the EEG files get exported to matlab to calculate eLORETA using
> FieldTrip. eLORETA needs as input the data covariance calculated through
> ft_timelockanalysis to get the results in the time domain, this is at least
> what I understand after reading the function information and the tutorials.
> When calling the function using the code from the first mail and
> independently of the EEG signals used I get the same covariance
> distribution and hence, the exact same source map after applying eLORETA.
> The step signal is the same, true, but the activation region within the
> brain is different and so they are the EEG level signals.
>
>
>
> Why EEG signals derived from different brain activation regions get the
> same covariance distribution when calling ft_timelockanalysis?
>
>
>
> Files and aditional information:
> [
> https://res-geo.cdn.office.net/assets/mail/file-icon/png/generic_16x16.png]files.mat
> <
> https://urldefense.com/v3/__https://upvedues-my.sharepoint.com/:u:/g/personal/fjquiagu_upv_edu_es/EdO01tlTC69Bi6p42iMb63EB9xV8o9BWTZhZ8uWE50KHNg?e=TWKEsU__;!!HJOPV4FYYWzcc1jazlU!9BfdnfX8eW7Tqf2Fa3O6aptGt8B_Auuj6EUkkl5xZdJJRsgsnBYCK7PD8As-zMvgdOk4WJkw1pfWqDzzztCp2BupPB99kYUsxhiHaw$>
> contains the matlab variables where
> - data: is merely a template struc for the code.
> - eeg_01/02/03: these are 3 different EEG level signals for the activation
> of 3 different brain regions.
> - vol: headmodel employed for all inverse problem related calculations.
> - elec: sensor information for EEG channels.
> - sourcemodel_and_leadfield: kind of self explanatory, merely a crappy
> demo for quick calculations.
>
> In [
> https://res-geo.cdn.office.net/assets/mail/file-icon/png/generic_16x16.png]
> code_example.m<
> https://urldefense.com/v3/__https://upvedues-my.sharepoint.com/:u:/g/personal/fjquiagu_upv_edu_es/EdYcnPUx2r5Bl-EAfx-0pBsB0vW0X2Vg-FHzKwD5g8OuBQ?e=oPU19A__;!!HJOPV4FYYWzcc1jazlU!9BfdnfX8eW7Tqf2Fa3O6aptGt8B_Auuj6EUkkl5xZdJJRsgsnBYCK7PD8As-zMvgdOk4WJkw1pfWqDzzztCp2BupPB99kYXjSqDPUQ$>
> there is a demo of what i am doing in matlab using the previous variables.
>
>
> I hope everything is more clear now. Thank you again for your time and
> patience.
>
> Greetings,
> Javier
>
>
>
> De: fieldtrip <fieldtrip-bounces at science.ru.nl<mailto:
> fieldtrip-bounces at science.ru.nl>> En nombre de Schoffelen, J.M. (Jan
> Mathijs) via fieldtrip
> Enviado el: viernes, 18 de noviembre de 2022 7:50
> Para: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:
> fieldtrip at science.ru.nl>>
> CC: Schoffelen, J.M. (Jan Mathijs) <janmathijs.schoffelen at donders.ru.nl
> <mailto:janmathijs.schoffelen at donders.ru.nl>>
> Asunto: Re: [FieldTrip] Help needed for timelock analysis
>
>
>
> Hi Javier,
>
>
>
> Sorry to repeat my self, but you are still not clear.
>
>
>
> You ask ‘why is it giving me always the same result despite being
> completely different EEG signals’.
>
>
>
> I don’t understand what ‘it’ is, and I see nowhere in your messages what
> you mean with ‘completely different EEG signals’. It’s all still Spanish to
> me.
>
>
>
> Different channels? Different simulations? Different step functions?
> Different noise? How did you do the simulations? How do the simulated
> signals look? What forward model was used in the simulation? Did you
> simulate enough variability in the sources’ time courses in order to have a
> chance to observe spatiotemporal variability at the scalp level? What did
> you expect from the call to ft_timelockanalysis?
>
>
>
> Also, please refer to http://www.catb.org/~esr/faqs/smart-questions.html<
> https://urldefense.com/v3/__http://www.catb.org/*esr/faqs/smart-questions.html__;fg!!HJOPV4FYYWzcc1jazlU!9BfdnfX8eW7Tqf2Fa3O6aptGt8B_Auuj6EUkkl5xZdJJRsgsnBYCK7PD8As-zMvgdOk4WJkw1pfWqDzzztCp2BupPB99kYXL7d1FAw$>
> and
> https://www.fieldtriptoolbox.org/faq/how_to_ask_good_questions_to_the_community/
> <
> https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/faq/how_to_ask_good_questions_to_the_community/__;!!HJOPV4FYYWzcc1jazlU!9BfdnfX8eW7Tqf2Fa3O6aptGt8B_Auuj6EUkkl5xZdJJRsgsnBYCK7PD8As-zMvgdOk4WJkw1pfWqDzzztCp2BupPB99kYUHTvfexA$
> >
>
>
>
> Good luck,
>
>
>
> Jan-Mathijs
>
>
>
>
> On 17 Nov 2022, at 18:04, Francisco Javier Quirant Agulló via fieldtrip <
> fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:
>
>
>
> Hi Jan,
>
>
>
> Sorry for not being clear enough. The question is, how should I apply the
> timelock function properly? Or, why is it giving me always the same result
> despite being completely different EEG signals?
>
>
>
> Thanks and greetings,
> Javier
>
>
>
> De: fieldtrip <fieldtrip-bounces at science.ru.nl<mailto:
> fieldtrip-bounces at science.ru.nl>> En nombre de Schoffelen, J.M.
> (JanMathijs) via fieldtrip
> Enviado el: jueves, 17 de noviembre de 2022 17:19
> Para: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:
> fieldtrip at science.ru.nl>>
> CC: Schoffelen, J.M. (Jan Mathijs) <janmathijs.schoffelen at donders.ru.nl
> <mailto:janmathijs.schoffelen at donders.ru.nl>>
> Asunto: Re: [FieldTrip] Help needed for timelock analysis
>
>
>
> Hi Javier,
>
>
>
> What is your question? I don’t manage to distill it from your e-mail.
>
>
>
> Best wishes,
>
>
>
> Jan-Mathijs
>
>
>
>
>
> On 17 Nov 2022, at 15:42, Francisco Javier Quirant Agulló via fieldtrip <
> fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:
>
>
>
> Hello everyone,
>
>
>
>  My name is Javier, I am a student of Biomedical engineering and I am
> working currently on my final master's project. The project aims to compare
> various inverse algorithms with some metrics and characterize them.
>
>
>
> Right now what I am doing is generating a step signal at source level in
> 68 different brain sections and obtaining simulated EEG signals with fs =
> 500 Hz & 2s length (1000 samples) and some noise added. The initial steps
> are performed using BrainStorm and EEGs are exported to matlab to apply
> eLORETA and sLORETA with Fieldtrip.
>
>
>
> For this I am trying to calculate the time domain information for the
> signals withft_timelockanalysis and use the results in ft_sourceanalysis. I
> realized that the source results were identical for the different EEGs
> (each one for a particular brain section), while the EEGs seem right the
> output of the ft_timelockanalysis is the same for all signals. Checking the
> function information I saw a note in line 45 that says: “% FIXME if input
> is one raw trial, the covariance is not computed correctly”. Tried dividing
> the EEG in 4 trials but no difference whatsoever. Spent some time also
> checking results within the function but haven’t made any progress.
>
>
>
> I think I may be using the data with an incorrect format or a wrong cfg,
> any help would be much apreciated. Follows the code.
> -----------------------------------
> data.trial{1} = real(eeg_01.F);% No idea why but EEGs from BrainStorm
> convert to complex in matlab
> data.time{1} = eeg_01.Time;
>
>
>
> save('temp.mat','data');cfg = [];    % This section only when I divide in
> trials (obviously)
> cfg.trialdef.triallength = 0.5;
> cfg.datafile = 'temp.mat';
> cfg.trialdef.eventtype = 'none';
> cfg= ft_definetrial(cfg);
> data = ft_preprocessing(cfg);
> delete 'temp.mat'
>
>
>
> cfg = [];
> cfg.covariance = 'yes';
> cfg.keeptrials = 'yes'; % I comment these two lines for single trial
> cfg.trials = 'all'
> data_cov = ft_timelockanalysis(cfg, data);
>
>
>
> cfg.layout = 'EEG1010.lay';
> ft_topoplotER(cfg,data_cov);   % This to plot the result, I get the same
> for all EEG files.
>
>
>
> -----------------------------------
> Here you have the mat file with all variables and 3 of the EEGs already
> loaded: [
> https://res-geo.cdn.office.net/assets/mail/file-icon/png/generic_16x16.png]
> files.mat<
> https://urldefense.com/v3/__https:/upvedues-my.sharepoint.com/:u:/g/personal/fjquiagu_upv_edu_es/EUPygCCic5NEiZak0leUSHsBSJAOKw9aJ_-ae7oibQIhNQ?e=TPWOkC__;!!HJOPV4FYYWzcc1jazlU!7ZVGIVpHujMhbuqj07PjD4_tJOJIGEhEa9EXa1hIOo6IqWXpztkw-y9kXyF9UpcjBTlphhjSrdqGapjwDYPr0saXmetMS6Y5taMH_w$
> >
>
>
>
>
>
>
> I hope everything is clear enought.
>
>
>
> Greetings,
> Javier
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!7ZVGIVpHujMhbuqj07PjD4_tJOJIGEhEa9EXa1hIOo6IqWXpztkw-y9kXyF9UpcjBTlphhjSrdqGapjwDYPr0saXmetMS6ZuT5is3Q$
> <
> https://urldefense.com/v3/__https:/doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!7ZVGIVpHujMhbuqj07PjD4_tJOJIGEhEa9EXa1hIOo6IqWXpztkw-y9kXyF9UpcjBTlphhjSrdqGapjwDYPr0saXmetMS6ZuT5is3Q$
> >
>
>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!9mv2ZfhmgyQM2cnKYVMi4KmXT2iM-rhDIoKMzszsxvPMLkizmdbFnBJZbfr8a7_O7W5Ao7KPkHOOjvFSJDVKT_VMd2W0uunQbr0MTA$
> <
> https://urldefense.com/v3/__https:/doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!9mv2ZfhmgyQM2cnKYVMi4KmXT2iM-rhDIoKMzszsxvPMLkizmdbFnBJZbfr8a7_O7W5Ao7KPkHOOjvFSJDVKT_VMd2W0uunQbr0MTA$
> >
>
>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!9BfdnfX8eW7Tqf2Fa3O6aptGt8B_Auuj6EUkkl5xZdJJRsgsnBYCK7PD8As-zMvgdOk4WJkw1pfWqDzzztCp2BupPB99kYUS7Ufp-g$
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221118/160b9859/attachment.htm
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Screenshot 2022-11-18 at 14.11.32.png
> Type: image/png
> Size: 164186 bytes
> Desc: Screenshot 2022-11-18 at 14.11.32.png
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221118/160b9859/attachment.png
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Screenshot 2022-11-18 at 14.12.00.png
> Type: image/png
> Size: 612028 bytes
> Desc: Screenshot 2022-11-18 at 14.12.00.png
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221118/160b9859/attachment-0001.png
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Screenshot 2022-11-18 at 14.15.31.png
> Type: image/png
> Size: 292736 bytes
> Desc: Screenshot 2022-11-18 at 14.15.31.png
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221118/160b9859/attachment-0002.png
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Screenshot 2022-11-18 at 14.24.52.png
> Type: image/png
> Size: 369102 bytes
> Desc: Screenshot 2022-11-18 at 14.24.52.png
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221118/160b9859/attachment-0003.png
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: image.png
> Type: image/png
> Size: 61037 bytes
> Desc: image.png
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221118/160b9859/attachment-0004.png
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
>
> ------------------------------
>
> End of fieldtrip Digest, Vol 144, Issue 14
> ******************************************
>
-- 
Edit Lelle Gyori
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221118/2754524e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMG_0589.jpg
Type: image/jpg
Size: 100675 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221118/2754524e/attachment-0001.jpg>


More information about the fieldtrip mailing list