[FieldTrip] Calculate epoched time-series in source space (ROI)

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Thu Jun 10 11:26:18 CEST 2021


Dear Myrto,

I think that you first need to get clear on what typo of source reconstruction algorithm you’d need.
I recommend not to use the rawtrial option (which only applies to beamformers anyhow as far as I know).
The strategy would be to call ft_sourceanalysisi with cfg.<method>.keepfilter = ‘yes’;
The result of the call to ft_sourceanalysis can then be used in ft_virtualchannel, to obtain single epoch signals.

Best wishes,
Jan-Mathijs


On 9 Jun 2021, at 18:57, Myrto Mantziara via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Dear Jan-Mathijs,

Thank you for your suggestion - it is very helpful. Your description of it as 'virtual channels' seems to express what we want to do. Before I move on to try this, I wanted to make sure that I can do the source analysis trial by trial. Should be enough if I just choose cfg.rawtrial = 'yes' ? Since the data input in the ft_sourceanalysis are as obtained from ft_timelockanalysis, will ft_sourceanalysis use the 'avg' field of the time-locked data struct or the trial x channel x time data from the 'trial' field (to get this I have chosen cfg.keeptrials = 'yes' in ft_timelockanalysis)?


Regards,
Myrto


--------------------
Myrto Mantziara
PhD Candidate
School of Psychology
Bangor University
United Kingdom
Email: m.mantziara at bangor.ac.uk<mailto:m.mantziara at bangor.ac.uk>
Lab Website: sites.google.com/site/kkornysheva/<http://sites.google.com/site/kkornysheva/>
School Social Media: https://www.bangor.ac.uk/psychology/social-media.php.en<https://urldefense.com/v3/__https://www.bangor.ac.uk/psychology/social-media.php.en__;!!HJOPV4FYYWzcc1jazlU!vY95mN05JIvUb0n-elSglCQbfW_3OEmyBKiQd3eW5F3QkRIQq4ZVleU-LT082aTzIm74LRRI$>

________________________________
From: fieldtrip <fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl>> on behalf of Schoffelen, J.M. (Jan Mathijs) via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Sent: 09 June 2021 16:07
To: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Cc: Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl<mailto:jan.schoffelen at donders.ru.nl>>
Subject: Re: [FieldTrip] Calculate epoched time-series in source space (ROI)

Dear Myrto,

I think that what you ask is ‘how do I create a (set of) virtual channel(s)?’

There is no dedicated documentation for this  yet. First of all, I think that you need to look into source reconstruction. After computing the forward model (a.k.a. as the leadfields) you need to use this in order to ’source reconstruct’ the channel level data, using some sourceanalysis method. More precisely, you need to compute an 'inverse operator’ which can be used to left multiply your sensor data with, in order to obtain single epoch time course of the ‘virtual channels’.

The virtual channels can be computed using the ft_virtualchannel function. Yet, in order to be able to use this, you need to use ft_sourceanalysis first.

Best wishes,
Jan-Mathijs


On 9 Jun 2021, at 16:38, Myrto Mantziara via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Dear Fieldtrip Team,


I would like to extract epoched EEG data from dipole sources in a Region of Interest (ROI). For the forward solution in the source analysis, I reconstructed the sources using the standard BEM headmodel (found in the Fieldtrip directory: fieldtrip-20160814\template\headmodel\standard_bem.mat) and computed the leadfield. Now I would like to apply the dipole leadfield weights to extract epoched time-series from dipoles of interest, e.g., all dipoles located in the primary motor cortex. In other words, I would like to examine the epoched data in source space (amplitude for each dipole for MVPA analysis, and time-frequency data averaged across the ROI). Also, we are not sure which leadfield weight to include (dipole orientations).
Last, do you have a function that does such weighting correctly to achieve orthogonalization in the contribution of other sources (e.g., nearby to the ROI sources) in order to increase specificity.
Perhaps there is an example code or other functions which I have not come across.

We would appreciate your help.



Regards,

Myrto Mantziara


--------------------
Myrto Mantziara
PhD Candidate
School of Psychology
Bangor University
United Kingdom
Email: m.mantziara at bangor.ac.uk<mailto:m.mantziara at bangor.ac.uk>
Lab Website: sites.google.com/site/kkornysheva/<https://urldefense.com/v3/__https://eur01.safelinks.protection.outlook.com/?url=http*3A*2F*2Fsites.google.com*2Fsite*2Fkkornysheva*2F&data=04*7C01*7Cm.mantziara*40bangor.ac.uk*7C456b642a078b4613c37308d92b595c71*7Cc6474c55a9234d2a9bd4ece37148dbb2*7C0*7C0*7C637588485066158963*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C1000&sdata=Y9mO8wbQLzFAWiFX1CniA49LI2bRrMp0xdnxVPjzhfM*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJQ!!HJOPV4FYYWzcc1jazlU!vY95mN05JIvUb0n-elSglCQbfW_3OEmyBKiQd3eW5F3QkRIQq4ZVleU-LT082aTzIrXHPncy$>
School Social Media: https://www.bangor.ac.uk/psychology/social-media.php.en<https://urldefense.com/v3/__https://eur01.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.com*2Fv3*2F__https*3A*2F*2Fwww.bangor.ac.uk*2Fpsychology*2Fsocial-media.php.en__*3B!!HJOPV4FYYWzcc1jazlU!spdDU_sPLbu4E_re5ebsxhNIUhlA9vNHlfEoKCqwt9swcj-gpRkjHNMCMdLhTV_S1dNdkGfA*24&data=04*7C01*7Cm.mantziara*40bangor.ac.uk*7C456b642a078b4613c37308d92b595c71*7Cc6474c55a9234d2a9bd4ece37148dbb2*7C0*7C0*7C637588485066168917*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C1000&sdata=9C33O*2BMtsIXRdXPZ5Gijl*2BNen0LsN611FtuKTgfiI78*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUl!!HJOPV4FYYWzcc1jazlU!vY95mN05JIvUb0n-elSglCQbfW_3OEmyBKiQd3eW5F3QkRIQq4ZVleU-LT082aTzIsfpSm0c$>




Mae croeso i chi gysylltu gyda'r Brifysgol yn Gymraeg neu Saesneg
You are welcome to contact the University in Welsh or English
Rhif Elusen Gofrestredig 1141565 - Registered Charity No. 1141565
Gall y neges e-bost hon, ac unrhyw atodiadau a anfonwyd gyda hi, gynnwys deunydd cyfrinachol ac wedi eu bwriadu i'w defnyddio'n unig gan y sawl y cawsant eu cyfeirio ato (atynt). Os ydych wedi derbyn y neges e-bost hon trwy gamgymeriad, rhowch wybod i'r anfonwr ar unwaith a dilewch y neges. Os na fwriadwyd anfon y neges atoch chi, rhaid i chi beidio a defnyddio, cadw neu ddatgelu unrhyw wybodaeth a gynhwysir ynddi. Mae unrhyw farn neu safbwynt yn eiddo i'r sawl a'i hanfonodd yn unig ac nid yw o anghenraid yn cynrychioli barn Prifysgol Bangor. Nid yw Prifysgol Bangor yn gwarantu bod y neges e-bost hon neu unrhyw atodiadau yn rhydd rhag firysau neu 100% yn ddiogel. Oni bai fod hyn wedi ei ddatgan yn uniongyrchol yn nhestun yr e-bost, nid bwriad y neges e-bost hon yw ffurfio contract rhwymol - mae rhestr o lofnodwyr awdurdodedig ar gael o Swyddfa Cyllid Prifysgol Bangor.
This email and any attachments may contain confidential material and is solely for the use of the intended recipient(s). If you have received this email in error, please notify the sender immediately and delete this email. If you are not the intended recipient(s), you must not use, retain or disclose any information contained in this email. Any views or opinions are solely those of the sender and do not necessarily represent those of Bangor University. Bangor University does not guarantee that this email or any attachments are free from viruses or 100% secure. Unless expressly stated in the body of the text of the email, this email is not intended to form a binding contract - a list of authorised signatories is available from the Bangor University Finance Office.

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://urldefense.com/v3/__https://eur01.safelinks.protection.outlook.com/?url=https*3A*2F*2Fmailman.science.ru.nl*2Fmailman*2Flistinfo*2Ffieldtrip&data=04*7C01*7Cm.mantziara*40bangor.ac.uk*7C456b642a078b4613c37308d92b595c71*7Cc6474c55a9234d2a9bd4ece37148dbb2*7C0*7C0*7C637588485066168917*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C1000&sdata=WyQsTwOn7yS3p*2FyfDtImQiyJaXgjtXIFMlcYXc4PDiE*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSU!!HJOPV4FYYWzcc1jazlU!vY95mN05JIvUb0n-elSglCQbfW_3OEmyBKiQd3eW5F3QkRIQq4ZVleU-LT082aTzIiokQ3FB$>
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!spdDU_sPLbu4E_re5ebsxhNIUhlA9vNHlfEoKCqwt9swcj-gpRkjHNMCMdLhTV_S1a-VbRy_$<https://urldefense.com/v3/__https://eur01.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.com*2Fv3*2F__https*3A*2F*2Fdoi.org*2F10.1371*2Fjournal.pcbi.1002202__*3B!!HJOPV4FYYWzcc1jazlU!spdDU_sPLbu4E_re5ebsxhNIUhlA9vNHlfEoKCqwt9swcj-gpRkjHNMCMdLhTV_S1a-VbRy_*24&data=04*7C01*7Cm.mantziara*40bangor.ac.uk*7C456b642a078b4613c37308d92b595c71*7Cc6474c55a9234d2a9bd4ece37148dbb2*7C0*7C0*7C637588485066178875*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C1000&sdata=SmalI25mveIkP6gHvfAhp1VsrjKw3UDi3ShWfnRn*2BaQ*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSU!!HJOPV4FYYWzcc1jazlU!vY95mN05JIvUb0n-elSglCQbfW_3OEmyBKiQd3eW5F3QkRIQq4ZVleU-LT082aTzIsjK4mdn$>




Mae croeso i chi gysylltu gyda'r Brifysgol yn Gymraeg neu Saesneg
You are welcome to contact the University in Welsh or English
Rhif Elusen Gofrestredig 1141565 - Registered Charity No. 1141565
Gall y neges e-bost hon, ac unrhyw atodiadau a anfonwyd gyda hi, gynnwys deunydd cyfrinachol ac wedi eu bwriadu i'w defnyddio'n unig gan y sawl y cawsant eu cyfeirio ato (atynt). Os ydych wedi derbyn y neges e-bost hon trwy gamgymeriad, rhowch wybod i'r anfonwr ar unwaith a dilewch y neges. Os na fwriadwyd anfon y neges atoch chi, rhaid i chi beidio a defnyddio, cadw neu ddatgelu unrhyw wybodaeth a gynhwysir ynddi. Mae unrhyw farn neu safbwynt yn eiddo i'r sawl a'i hanfonodd yn unig ac nid yw o anghenraid yn cynrychioli barn Prifysgol Bangor. Nid yw Prifysgol Bangor yn gwarantu bod y neges e-bost hon neu unrhyw atodiadau yn rhydd rhag firysau neu 100% yn ddiogel. Oni bai fod hyn wedi ei ddatgan yn uniongyrchol yn nhestun yr e-bost, nid bwriad y neges e-bost hon yw ffurfio contract rhwymol - mae rhestr o lofnodwyr awdurdodedig ar gael o Swyddfa Cyllid Prifysgol Bangor.
This email and any attachments may contain confidential material and is solely for the use of the intended recipient(s). If you have received this email in error, please notify the sender immediately and delete this email. If you are not the intended recipient(s), you must not use, retain or disclose any information contained in this email. Any views or opinions are solely those of the sender and do not necessarily represent those of Bangor University. Bangor University does not guarantee that this email or any attachments are free from viruses or 100% secure. Unless expressly stated in the body of the text of the email, this email is not intended to form a binding contract - a list of authorised signatories is available from the Bangor University Finance Office.

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!vY95mN05JIvUb0n-elSglCQbfW_3OEmyBKiQd3eW5F3QkRIQq4ZVleU-LT082aTzIjGoaaF0$

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210610/65d51c22/attachment.htm>


More information about the fieldtrip mailing list