[FieldTrip] group blocks with preprocessed data (Barbara Tsogli)

Barbara Tsogli Barbara.Tsogli at uib.no
Sun Nov 13 17:16:34 CET 2022


Hello Jan-Mathijs,

I appreciate your detailed response and you are right I should have specified that the preprocessing of the EEG data was carried out in FieldTrip. I will follow your advice and try to work out a way to complete the Time-Frequency analysis on FieldTrip.

Thank you and good continuation with your work,
Vera

________________________________
From: fieldtrip <fieldtrip-bounces at science.ru.nl> on behalf of fieldtrip-request at science.ru.nl <fieldtrip-request at science.ru.nl>
Sent: Saturday, November 12, 2022 1:00 PM
To: fieldtrip at science.ru.nl <fieldtrip at science.ru.nl>
Subject: fieldtrip Digest, Vol 144, Issue 6

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: some general questions about gamma-related analyses
      (Ivaylo Iotchev)
   2. group blocks with preprocessed data (Barbara Tsogli)
   3. Re: group blocks with preprocessed data
      (Schoffelen, J.M. (Jan Mathijs))


----------------------------------------------------------------------

Message: 1
Date: Fri, 11 Nov 2022 17:29:09 +0200
From: Ivaylo Iotchev <ivaylo.iotchev at gmail.com>
To: Tzvetan Popov <tzvetan.popov at uni-konstanz.de>
Cc: FieldTrip discussion list <fieldtrip at science.ru.nl>
Subject: Re: [FieldTrip] some general questions about gamma-related
        analyses
Message-ID:
        <CAO-ud374d6uSqsaEiBLr+x+ideCXH43roc+S=m2iSYA08rAb3A at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

For a second time, a heartfelt thank you!

Ivaylo Iotchev, PhD

Am Fr., 11. Nov. 2022 um 10:39 Uhr schrieb Tzvetan Popov <
tzvetan.popov at uni-konstanz.de>:

> Dear Ivo,
>
> The whole of the gamma range expands well beyond 30 Hz, the noise
> threshold, and thus the first question is whether low-pass filtering below
> 30 Hz is at all applied when looking for gamma coherence, power etc. ...
> One reason I kept the classical filter settings at first is to be
> consistent across the many different analyses I apply to the same data
> sets, not all of which have to do with gamma, but it dawned on me that
> filtering out frequencies above 30 is probably not a good idea(?) for
> gamma-related questions?
>
> No, do not apply 30Hz LP. You filter out your signal of interest.
>
>
> Moreover, is it acceptable to look for the point of maximum coherence
> within that range, rather than average within the range? The data suggests
> that the point of maximum coherence shifts across time to higher and higher
> frequencies, thus I decided for the time being to report the maximum
> coherence (across electrodes) value within the gamma range.
>
> One typically applies smoothening in the frequency domain when evaluating
> gamma (power and coherence). I suggest to study this lecture
> https://www.youtube.com/watch?v=dHTuzMsjVJA. In particular, at minute
> 25:49 the advantage of the freq smoothening is highlighted. Given that
> example your peak frequency will change depending on your decision how much
> to smooth.
>
> Of note, channel level coherence, particularly for gamma is not
> recommended. A lot of other stuff is added to the mix (e.g. cardiac, neck
> muscles etc.). Their contribution will change over time in your experiment.
> At the end you will not be able to interpret the results and/or you might
> be fooled.
> I suggest you also study this lecture
> https://www.youtube.com/watch?v=ZBwh0Vm4fh4 and in particular the issues
> raised from minute 42:49 or so.
>
> Good luck
> Tzvetan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221111/890ebe2e/attachment-0001.htm>

------------------------------

Message: 2
Date: Fri, 11 Nov 2022 19:12:23 +0000
From: Barbara Tsogli <Barbara.Tsogli at uib.no>
To: "fieldtrip at science.ru.nl" <fieldtrip at science.ru.nl>
Subject: [FieldTrip] group blocks with preprocessed data
Message-ID:
        <PAXPR01MB9219DEAC9733AECB200F6B39EE009 at PAXPR01MB9219.eurprd01.prod.exchangelabs.com>

Content-Type: text/plain; charset="utf-8"

Hello Xavier,

Thank you for your response. I have tried ft_appendata and here is the result:
>> cfg = [];
cfg.keepsampleinfo = 'no';
data_all_sbj2 = ft_appenddata(cfg, allData{2,1}, allData{2,2}, allData{2,3});
Error using ft_appenddata
cannot append this data

Do you think a possible reason for this could be that the input datasets do not have the same number of trials or channels?

Block 1: allData{2, 1} has 39 channels and 44 trials
Block 2: allData{2, 2} has 47 channels and 49 trials
Block 3: allData{2, 3} has 45 channels and 57 trials

Is there any other way of doing this other than using the ft_appendata?

Any help is very much appreciated 🙂
Vera


________________________________
From: fieldtrip <fieldtrip-bounces at science.ru.nl> on behalf of fieldtrip-request at science.ru.nl <fieldtrip-request at science.ru.nl>
Sent: Friday, November 11, 2022 1:00 PM
To: fieldtrip at science.ru.nl <fieldtrip at science.ru.nl>
Subject: fieldtrip Digest, Vol 144, Issue 5

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. some general questions about gamma-related analyses
      (Ivaylo Iotchev)
   2. Within/Between Cluster Analysis (Erica Flaten)
   3. group blocks with preprocessed data (Barbara Tsogli)
   4. Re: group blocks with preprocessed data (Xavier Vrijdag)
   5. Re: some general questions about gamma-related analyses
      (Tzvetan Popov)


----------------------------------------------------------------------

Message: 1
Date: Thu, 10 Nov 2022 12:05:34 +0100
From: Ivaylo Iotchev <ivaylo.iotchev at gmail.com>
To: FieldTrip discussion list <fieldtrip at science.ru.nl>
Subject: [FieldTrip] some general questions about gamma-related
        analyses
Message-ID:
        <CAO-ud34t1SzLgrGLyjJTH9TBrSW+Ln1xdPB--ZS-j0zB7HKMzQ at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Dear all,

I am fairly new to frequency-band analyses and have dealt mostly with
transients (sleep spindles) so far. Thus forgive the maybe stupid
questions, however, one on-point professional answer could spare me
scavanging for parts across many unrelated papers.

The whole of the gamma range expands well beyond 30 Hz, the noise
threshold, and thus the first question is whether low-pass filtering below
30 Hz is at all applied when looking for gamma coherence, power etc. ...
One reason I kept the classical filter settings at first is to be
consistent across the many different analyses I apply to the same data
sets, not all of which have to do with gamma, but it dawned on me that
filtering out frequencies above 30 is probably not a good idea(?) for
gamma-related questions?

Moreover, is it acceptable to look for the point of maximum coherence
within that range, rather than average within the range? The data suggests
that the point of maximum coherence shifts across time to higher and higher
frequencies, thus I decided for the time being to report the maximum
coherence (across electrodes) value within the gamma range.

Let me know if there is any additional information I can provide to help
you help me, best wishes and regards,

Ivaylo Iotchev, PhD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221110/2bda60ea/attachment-0001.htm>

------------------------------

Message: 2
Date: Thu, 10 Nov 2022 15:38:04 +0000
From: Erica Flaten <flatene at mcmaster.ca>
To: "fieldtrip at science.ru.nl" <fieldtrip at science.ru.nl>
Subject: [FieldTrip] Within/Between Cluster Analysis
Message-ID:
        <YT2PR01MB82325F6A437A7189D87858B9B5019 at YT2PR01MB8232.CANPRD01.PROD.OUTLOOK.COM>

Content-Type: text/plain; charset="utf-8"

An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221110/faf3d856/attachment-0001.htm>

------------------------------

Message: 3
Date: Thu, 10 Nov 2022 19:51:04 +0000
From: Barbara Tsogli <Barbara.Tsogli at uib.no>
To: "fieldtrip at science.ru.nl" <fieldtrip at science.ru.nl>
Subject: [FieldTrip] group blocks with preprocessed data
Message-ID:
        <PAXPR01MB9219EA0EFE6FD14B0E1BBC9DEE019 at PAXPR01MB9219.eurprd01.prod.exchangelabs.com>

Content-Type: text/plain; charset="iso-8859-1"

Dear FieltTripers,

I was given some preprocessed EEG data in order to perform a Time-Frequency analysis. The experiment has 3 blocks (or sessions); therefore, for each subject, there are 3 different .mat files (Subj1_Block1.mat, Subj1_Block2.mat, Subj1_Block3.mat). Given that we are not interested to consider the block as a factor in our statistical analysis, is there a way to group the 3 .mat files that represent the 3 blocks? in other words, is there a way to create a mat file that contains the information of the 3 blocks (i.e.: Subj1_Block1to3.mat)?

Thank you for your time in advance,
Vera



------------------------------

Message: 4
Date: Thu, 10 Nov 2022 20:47:45 +0000
From: Xavier Vrijdag <x.vrijdag at auckland.ac.nz>
To: FieldTrip discussion list <fieldtrip at science.ru.nl>
Subject: Re: [FieldTrip] group blocks with preprocessed data
Message-ID: <ED515986-3152-4117-8CFF-2120F0F7FFC9 at auckland.ac.nz>
Content-Type: text/plain; charset="utf-8"

Hello Vera,

If the .mat files contain fieldtrip data structures, you can use ft_appenddata to concatenate them into one data structure. You than can save that data structure into a new .mat file.

Regards,

Xavier

Dr Xavier Vrijdag, MSc PhD

Research fellow
Department of Anaesthesiology │ School of Medicine
Faculty of Medical & Health Sciences │ The University of Auckland
Private Bag 92019 │ Auckland 1142 │ New Zealand

M +64 21 0230 4558
E x.vrijdag at auckland.ac.nz<mailto:x.vrijdag at auckland.ac.nz>

[FMHS Logo]




From: fieldtrip <fieldtrip-bounces at science.ru.nl> on behalf of Barbara Tsogli via fieldtrip <fieldtrip at science.ru.nl>
Reply to: FieldTrip discussion list <fieldtrip at science.ru.nl>
Date: Friday, 11 November 2022 at 8:59 AM
To: "fieldtrip at science.ru.nl" <fieldtrip at science.ru.nl>
Cc: Barbara Tsogli <Barbara.Tsogli at uib.no>
Subject: [FieldTrip] group blocks with preprocessed data

Dear FieltTripers,

I was given some preprocessed EEG data in order to perform a Time-Frequency analysis. The experiment has 3 blocks (or sessions); therefore, for each subject, there are 3 different .mat files (Subj1_Block1.mat, Subj1_Block2.mat, Subj1_Block3.mat). Given that we are not interested to consider the block as a factor in our statistical analysis, is there a way to group the 3 .mat files that represent the 3 blocks? in other words, is there a way to create a mat file that contains the information of the 3 blocks (i.e.: Subj1_Block1to3.mat)?

Thank you for your time in advance,
Vera

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
https://doi.org/10.1371/journal.pcbi.1002202<https://doi.org/10.1371/journal.pcbi.1002202>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221110/1eb4cfda/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 22260 bytes
Desc: image001.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221110/1eb4cfda/attachment-0001.png>

------------------------------

Message: 5
Date: Fri, 11 Nov 2022 09:39:08 +0100
From: Tzvetan Popov <tzvetan.popov at uni-konstanz.de>
To: FieldTrip discussion list <fieldtrip at science.ru.nl>
Subject: Re: [FieldTrip] some general questions about gamma-related
        analyses
Message-ID: <C996C864-719A-49C0-8F7A-43A8F5903DB3 at uni-konstanz.de>
Content-Type: text/plain; charset="utf-8"

Dear Ivo,

> The whole of the gamma range expands well beyond 30 Hz, the noise threshold, and thus the first question is whether low-pass filtering below 30 Hz is at all applied when looking for gamma coherence, power etc. ...  One reason I kept the classical filter settings at first is to be consistent across the many different analyses I apply to the same data sets, not all of which have to do with gamma, but it dawned on me that filtering out frequencies above 30 is probably not a good idea(?) for gamma-related questions?
No, do not apply 30Hz LP. You filter out your signal of interest.
>
> Moreover, is it acceptable to look for the point of maximum coherence within that range, rather than average within the range? The data suggests that the point of maximum coherence shifts across time to higher and higher frequencies, thus I decided for the time being to report the maximum coherence (across electrodes) value within the gamma range.
One typically applies smoothening in the frequency domain when evaluating gamma (power and coherence). I suggest to study this lecture https://www.youtube.com/watch?v=dHTuzMsjVJA <https://www.youtube.com/watch?v=dHTuzMsjVJA>. In particular, at minute 25:49 the advantage of the freq smoothening is highlighted. Given that example your peak frequency will change depending on your decision how much to smooth.

Of note, channel level coherence, particularly for gamma is not recommended. A lot of other stuff is added to the mix (e.g. cardiac, neck muscles etc.). Their contribution will change over time in your experiment. At the end you will not be able to interpret the results and/or you might be fooled.
I suggest you also study this lecture https://www.youtube.com/watch?v=ZBwh0Vm4fh4 <https://www.youtube.com/watch?v=ZBwh0Vm4fh4> and in particular the issues raised from minute 42:49 or so.

Good luck
Tzvetan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221111/c7a3f586/attachment-0001.htm>

------------------------------

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 5
*****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221111/841229dc/attachment-0001.htm>

------------------------------

Message: 3
Date: Sat, 12 Nov 2022 10:57:26 +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] group blocks with preprocessed data
Message-ID: <92BFE485-60FB-42F9-B593-EDC946C4B0A2 at donders.ru.nl>
Content-Type: text/plain; charset="utf-8"

Hi Vera,

To be honest, the amount of relevant information you have providing us with so far, has been qualitatively a bit inferior, which leaves the readership of this list a bit ‘in the unknown’. We therefore, we can only randomly guess as to what the best answer to your question would be.

As Xavier mentioned in his earlier response in this thread provided “the .mat files contain fieldtrip data structures, you can use ft_appenddata to concatenate them into one data structure”.
In short, all of this starts with the valid assumption that the contents of the .mat files (note that the extension .mat just means that it the file most likely is a file that contains binary data that can be read by MATLAB, so nothing specific to fieldtrip yet) are a valid FieldTrip data structure (https://www.fieldtriptoolbox.org/faq/how_are_the_various_data_structures_defined/), more specifically a data structure according to ft_datatype_raw (the first one in the list). In that sense, Xavier made a lucky guess and pointed you into the right direction. Keep them coming, those answers, Xavier!

Yet, reading the help section of ft_appenddata https://github.com/fieldtrip/fieldtrip/blob/master/ft_appenddata.m it should be clear what can be expected from ft_appenddata. Indeed, if the input data does not match along at least one of the dimensions of the input (i.e. same collection of trials with identical time axes, but collected with different sets of channels, or a collection of different trials collected with a set of identical channels), then the function fails, as you report.

If your individual blocks have different channels, then you need to prune the data first such that all data objects contain only the intersection of the channels. If the aim is to combine across trials, it does not make sense to include channels for which not all trials contain data. Selection of channels can be achieved with the ft_selectdata function.

Apart from this practical tip, I would however first consult the people who gave you the data, to get some understanding of why the data are incompatible across blocks, in order to avoid the risk of comparing apples with oranges. Also, it would be crucial to understand and know about the processing steps that have been applied to the recorded data in order to create the mat-files on disk.

-Can it be assumed that the channels that have the same label across blocks were collected from the same position on the cap?
-Has any frequency filtering been applied? (not good for time-frequency analysis)
-What is the cause of the missing channels? Were those channels classified as ‘bad’? If so, why?
-Has any spatial filtering been applied? e.g. ICA followed by backprojection of identified components? -> in general not good if done per block
-...

Good luck,

Jan-Mathijs






On 11 Nov 2022, at 20:12, Barbara Tsogli via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Hello Xavier,

Thank you for your response. I have tried ft_appendata and here is the result:
>> cfg = [];
cfg.keepsampleinfo = 'no';
data_all_sbj2 = ft_appenddata(cfg, allData{2,1}, allData{2,2}, allData{2,3});
Error using ft_appenddata
cannot append this data

Do you think a possible reason for this could be that the input datasets do not have the same number of trials or channels?

Block 1: allData{2, 1} has 39 channels and 44 trials
Block 2: allData{2, 2} has 47 channels and 49 trials
Block 3: allData{2, 3} has 45 channels and 57 trials

Is there any other way of doing this other than using the ft_appendata?

Any help is very much appreciated 🙂
Vera


________________________________
From: fieldtrip <fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl>> on behalf of fieldtrip-request at science.ru.nl<mailto:fieldtrip-request at science.ru.nl> <fieldtrip-request at science.ru.nl<mailto:fieldtrip-request at science.ru.nl>>
Sent: Friday, November 11, 2022 1:00 PM
To: fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl> <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Subject: fieldtrip Digest, Vol 144, Issue 5

Send fieldtrip mailing list submissions to
        fieldtrip at science.ru.nl<mailto: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<mailto:fieldtrip-request at science.ru.nl>

You can reach the person managing the list at
        fieldtrip-owner at science.ru.nl<mailto: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. some general questions about gamma-related analyses
      (Ivaylo Iotchev)
   2. Within/Between Cluster Analysis (Erica Flaten)
   3. group blocks with preprocessed data (Barbara Tsogli)
   4. Re: group blocks with preprocessed data (Xavier Vrijdag)
   5. Re: some general questions about gamma-related analyses
      (Tzvetan Popov)


----------------------------------------------------------------------

Message: 1
Date: Thu, 10 Nov 2022 12:05:34 +0100
From: Ivaylo Iotchev <ivaylo.iotchev at gmail.com<mailto:ivaylo.iotchev at gmail.com>>
To: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Subject: [FieldTrip] some general questions about gamma-related
        analyses
Message-ID:
        <CAO-ud34t1SzLgrGLyjJTH9TBrSW+Ln1xdPB--ZS-j0zB7HKMzQ at mail.gmail.com<mailto:CAO-ud34t1SzLgrGLyjJTH9TBrSW+Ln1xdPB--ZS-j0zB7HKMzQ at mail.gmail.com>>
Content-Type: text/plain; charset="utf-8"

Dear all,

I am fairly new to frequency-band analyses and have dealt mostly with
transients (sleep spindles) so far. Thus forgive the maybe stupid
questions, however, one on-point professional answer could spare me
scavanging for parts across many unrelated papers.

The whole of the gamma range expands well beyond 30 Hz, the noise
threshold, and thus the first question is whether low-pass filtering below
30 Hz is at all applied when looking for gamma coherence, power etc. ...
One reason I kept the classical filter settings at first is to be
consistent across the many different analyses I apply to the same data
sets, not all of which have to do with gamma, but it dawned on me that
filtering out frequencies above 30 is probably not a good idea(?) for
gamma-related questions?

Moreover, is it acceptable to look for the point of maximum coherence
within that range, rather than average within the range? The data suggests
that the point of maximum coherence shifts across time to higher and higher
frequencies, thus I decided for the time being to report the maximum
coherence (across electrodes) value within the gamma range.

Let me know if there is any additional information I can provide to help
you help me, best wishes and regards,

Ivaylo Iotchev, PhD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221110/2bda60ea/attachment-0001.htm>

------------------------------

Message: 2
Date: Thu, 10 Nov 2022 15:38:04 +0000
From: Erica Flaten <flatene at mcmaster.ca<mailto:flatene at mcmaster.ca>>
To: "fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>" <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Subject: [FieldTrip] Within/Between Cluster Analysis
Message-ID:
        <YT2PR01MB82325F6A437A7189D87858B9B5019 at YT2PR01MB8232.CANPRD01.PROD.OUTLOOK.COM<mailto:YT2PR01MB82325F6A437A7189D87858B9B5019 at YT2PR01MB8232.CANPRD01.PROD.OUTLOOK.COM>>

Content-Type: text/plain; charset="utf-8"

An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221110/faf3d856/attachment-0001.htm>

------------------------------

Message: 3
Date: Thu, 10 Nov 2022 19:51:04 +0000
From: Barbara Tsogli <Barbara.Tsogli at uib.no<mailto:Barbara.Tsogli at uib.no>>
To: "fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>" <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Subject: [FieldTrip] group blocks with preprocessed data
Message-ID:
        <PAXPR01MB9219EA0EFE6FD14B0E1BBC9DEE019 at PAXPR01MB9219.eurprd01.prod.exchangelabs.com<mailto:PAXPR01MB9219EA0EFE6FD14B0E1BBC9DEE019 at PAXPR01MB9219.eurprd01.prod.exchangelabs.com>>

Content-Type: text/plain; charset="iso-8859-1"

Dear FieltTripers,

I was given some preprocessed EEG data in order to perform a Time-Frequency analysis. The experiment has 3 blocks (or sessions); therefore, for each subject, there are 3 different .mat files (Subj1_Block1.mat, Subj1_Block2.mat, Subj1_Block3.mat). Given that we are not interested to consider the block as a factor in our statistical analysis, is there a way to group the 3 .mat files that represent the 3 blocks? in other words, is there a way to create a mat file that contains the information of the 3 blocks (i.e.: Subj1_Block1to3.mat)?

Thank you for your time in advance,
Vera



------------------------------

Message: 4
Date: Thu, 10 Nov 2022 20:47:45 +0000
From: Xavier Vrijdag <x.vrijdag at auckland.ac.nz<mailto:x.vrijdag at auckland.ac.nz>>
To: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Subject: Re: [FieldTrip] group blocks with preprocessed data
Message-ID: <ED515986-3152-4117-8CFF-2120F0F7FFC9 at auckland.ac.nz<mailto:ED515986-3152-4117-8CFF-2120F0F7FFC9 at auckland.ac.nz>>
Content-Type: text/plain; charset="utf-8"

Hello Vera,

If the .mat files contain fieldtrip data structures, you can use ft_appenddata to concatenate them into one data structure. You than can save that data structure into a new .mat file.

Regards,

Xavier

Dr Xavier Vrijdag, MSc PhD

Research fellow
Department of Anaesthesiology │ School of Medicine
Faculty of Medical & Health Sciences │ The University of Auckland
Private Bag 92019 │ Auckland 1142 │ New Zealand

M +64 21 0230 4558
E x.vrijdag at auckland.ac.nz<mailto:x.vrijdag at auckland.ac.nz><mailto:x.vrijdag at auckland.ac.nz>

[FMHS Logo]




From: fieldtrip <fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl>> on behalf of Barbara Tsogli via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Reply to: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Date: Friday, 11 November 2022 at 8:59 AM
To: "fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>" <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Cc: Barbara Tsogli <Barbara.Tsogli at uib.no<mailto:Barbara.Tsogli at uib.no>>
Subject: [FieldTrip] group blocks with preprocessed data

Dear FieltTripers,

I was given some preprocessed EEG data in order to perform a Time-Frequency analysis. The experiment has 3 blocks (or sessions); therefore, for each subject, there are 3 different .mat files (Subj1_Block1.mat, Subj1_Block2.mat, Subj1_Block3.mat). Given that we are not interested to consider the block as a factor in our statistical analysis, is there a way to group the 3 .mat files that represent the 3 blocks? in other words, is there a way to create a mat file that contains the information of the 3 blocks (i.e.: Subj1_Block1to3.mat)?

Thank you for your time in advance,
Vera

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://mailman.science.ru.nl/mailman/listinfo/fieldtrip><https://mailman.science.ru.nl/mailman/listinfo/fieldtrip%3Chttps://mailman.science.ru.nl/mailman/listinfo/fieldtrip%3E>
https://doi.org/10.1371/journal.pcbi.1002202<https://doi.org/10.1371/journal.pcbi.1002202><https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202*3Chttps:/*doi.org/10.1371/journal.pcbi.1002202*3E__;JS8l!!HJOPV4FYYWzcc1jazlU!6GId_Hulr8-Sb9Hre-1ZSkNuE_E7behI0w_V59XmmbJ-EelRQG8DTFdyJ_j14uzbRU2KvIjv3r41LcaaZaDX6CPEORuXdhQoDMMC3Q$>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221110/1eb4cfda/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 22260 bytes
Desc: image001.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221110/1eb4cfda/attachment-0001.png>

------------------------------

Message: 5
Date: Fri, 11 Nov 2022 09:39:08 +0100
From: Tzvetan Popov <tzvetan.popov at uni-konstanz.de<mailto:tzvetan.popov at uni-konstanz.de>>
To: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Subject: Re: [FieldTrip] some general questions about gamma-related
        analyses
Message-ID: <C996C864-719A-49C0-8F7A-43A8F5903DB3 at uni-konstanz.de<mailto:C996C864-719A-49C0-8F7A-43A8F5903DB3 at uni-konstanz.de>>
Content-Type: text/plain; charset="utf-8"

Dear Ivo,

> The whole of the gamma range expands well beyond 30 Hz, the noise threshold, and thus the first question is whether low-pass filtering below 30 Hz is at all applied when looking for gamma coherence, power etc. ...  One reason I kept the classical filter settings at first is to be consistent across the many different analyses I apply to the same data sets, not all of which have to do with gamma, but it dawned on me that filtering out frequencies above 30 is probably not a good idea(?) for gamma-related questions?
No, do not apply 30Hz LP. You filter out your signal of interest.
>
> Moreover, is it acceptable to look for the point of maximum coherence within that range, rather than average within the range? The data suggests that the point of maximum coherence shifts across time to higher and higher frequencies, thus I decided for the time being to report the maximum coherence (across electrodes) value within the gamma range.
One typically applies smoothening in the frequency domain when evaluating gamma (power and coherence). I suggest to study this lecture https://www.youtube.com/watch?v=dHTuzMsjVJA<https://urldefense.com/v3/__https://www.youtube.com/watch?v=dHTuzMsjVJA__;!!HJOPV4FYYWzcc1jazlU!6GId_Hulr8-Sb9Hre-1ZSkNuE_E7behI0w_V59XmmbJ-EelRQG8DTFdyJ_j14uzbRU2KvIjv3r41LcaaZaDX6CPEORuXdhRmJKagdA$><https://www.youtube.com/watch?v=dHTuzMsjVJA<https://urldefense.com/v3/__https://www.youtube.com/watch?v=dHTuzMsjVJA__;!!HJOPV4FYYWzcc1jazlU!6GId_Hulr8-Sb9Hre-1ZSkNuE_E7behI0w_V59XmmbJ-EelRQG8DTFdyJ_j14uzbRU2KvIjv3r41LcaaZaDX6CPEORuXdhRmJKagdA$>>. In particular, at minute 25:49 the advantage of the freq smoothening is highlighted. Given that example your peak frequency will change depending on your decision how much to smooth.

Of note, channel level coherence, particularly for gamma is not recommended. A lot of other stuff is added to the mix (e.g. cardiac, neck muscles etc.). Their contribution will change over time in your experiment. At the end you will not be able to interpret the results and/or you might be fooled.
I suggest you also study this lecture https://www.youtube.com/watch?v=ZBwh0Vm4fh4<https://urldefense.com/v3/__https://www.youtube.com/watch?v=ZBwh0Vm4fh4__;!!HJOPV4FYYWzcc1jazlU!6GId_Hulr8-Sb9Hre-1ZSkNuE_E7behI0w_V59XmmbJ-EelRQG8DTFdyJ_j14uzbRU2KvIjv3r41LcaaZaDX6CPEORuXdhR10amViA$><https://www.youtube.com/watch?v=ZBwh0Vm4fh4<https://urldefense.com/v3/__https://www.youtube.com/watch?v=ZBwh0Vm4fh4__;!!HJOPV4FYYWzcc1jazlU!6GId_Hulr8-Sb9Hre-1ZSkNuE_E7behI0w_V59XmmbJ-EelRQG8DTFdyJ_j14uzbRU2KvIjv3r41LcaaZaDX6CPEORuXdhR10amViA$>> and in particular the issues raised from minute 42:49 or so.

Good luck
Tzvetan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221111/c7a3f586/attachment-0001.htm>

------------------------------

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<https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!6GId_Hulr8-Sb9Hre-1ZSkNuE_E7behI0w_V59XmmbJ-EelRQG8DTFdyJ_j14uzbRU2KvIjv3r41LcaaZaDX6CPEORuXdhTCvoxIBQ$>


------------------------------

End of fieldtrip Digest, Vol 144, Issue 5
*****************************************
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!6GId_Hulr8-Sb9Hre-1ZSkNuE_E7behI0w_V59XmmbJ-EelRQG8DTFdyJ_j14uzbRU2KvIjv3r41LcaaZaDX6CPEORuXdhTCvoxIBQ$

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221112/52d763ae/attachment-0001.htm>

------------------------------

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 6
*****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221113/a00fc8a9/attachment.htm>


More information about the fieldtrip mailing list