[FieldTrip] Source reconstruction of combined EEG-MEG data
Kenneth Shinozuka
kennethshinozuka at gmail.com
Tue Jan 14 13:56:46 CET 2025
Dear Jan-Mathijs,
The leadfield code for the combined EEG-MEG data is now causing an error in
one of my subjects' data. Specifically, the following line:
[combined_headmodel{1}, combined_sens{1}] =
> ft_prepare_vol_sens(combined_headmodel{1}, combined_sens{1});
is triggering the error:
Warning: electrodes do not lie on skin surface -> using radial projection
> undoing the reject balancing for the gradiometer definition
> Error using ft_scalingfactor
> cannot convert V to unknown
Error in ft_scalingfactor (line 94)
> factor = cellfun(@ft_scalingfactor, old(:), new(:));
Error in ft_apply_montage (line 337)
> scale = ft_scalingfactor(input.chanunit, montage.chanunitold);
Error in undobalancing (line 37)
> sens = ft_apply_montage(sens, sens.balance.(sens.balance.current),
> 'inverse', 'yes', 'keepunused', 'yes', 'warning', 'no');
Error in channelposition (line 34)
> sens = undobalancing(sens);
Error in ft_prepare_vol_sens (line 628)
> [pos, ori, lab] = channelposition(sens);
Do you know what the cause of this error could be? I explicitly set the
chanunit of elec, which is combined_sens{1}, to 'V', and the chantype of
elec to 'eeg', but the error still persists.
Best regards,
Kenneth
On Tue, Jan 14, 2025 at 6:59 AM Schoffelen, J.M. (Jan Mathijs) via
fieldtrip <fieldtrip at science.ru.nl> wrote:
> For reference:
>
> Hello Jan-Mathijs,
>
> Thank you very much for your reply. My apologies for not referring to the
> example code correctly. When I searched for the page on Google, Google
> indicated that the date of the page was December 4, 2024, hence I thought
> that it was published last month.
>
> I am able to get my own code running with ft_prepare_vol_sens, so I think
> you are right.
>
> Best regards,
> Kenneth
>
> On Mon, Jan 13, 2025 at 7:03 PM Schoffelen, J.M. (Jan Mathijs) via
> fieldtrip <fieldtrip at science.ru.nl> wrote:
>
>> Hi Kenneth,
>>
>> Please note that the documentation on the category ‘examples’ consist of
>> a collection of code/procedural descriptions that worked once-upon-a-time.
>> They are not guaranteed to be backward compatible with a further evolved
>> codebase.
>>
>> So, your statement ‘FieldTrip recently released some new documentation’
>> is not fully appropriate. The example you refer to, is actually already
>> quite old; what may have changed is the name of the page (which may make it
>> look new), the content hasn’t changed. We are in the process of making some
>> important changes to the website (basically aimed at improving the browsing
>> experience), and for that reason we needed to refactor a bit the names of
>> the webpages under the hood.
>>
>> Regarding your question: I think that something has gone wrong at some
>> point when we executed some housekeeping operations on the
>> content-text-files that contain the information on the website. I believe
>> the proper function call should be ft_prepare_vol_sens, rather than
>> ft_prepare_headmodel_sens.
>>
>> Best wishes,
>> Jan-Mathijs
>>
>>
>> On 13 Jan 2025, at 12:51, Kenneth Shinozuka via fieldtrip <
>> fieldtrip at science.ru.nl> wrote:
>>
>> Hello,
>>
>> I am analyzing some simultaneously acquired EEG-MEG data. I saw that
>> FieldTrip recently released some new documentation about this:
>>
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fieldtriptoolbox.org%2Fexample%2Fsourcerecon_meeg%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C4e32224c3f754fd3199a08dd349af212%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638724563626187704%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C20000%7C%7C%7C&sdata=GjY8xDXESCZ1Hk%2FUqp5pAQ05TKWNTI6ZVBygQZzoANs%3D&reserved=0
>> <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fieldtriptoolbox.org%2Fexample%2Fsourcerecon_meeg%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C4e32224c3f754fd3199a08dd349af212%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638724563626210494%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C20000%7C%7C%7C&sdata=5%2BRzjA5jTgEarjCOoGmcAMtuNjd0qnZjiLQl4bGYYKw%3D&reserved=0>
>>
>> The provided code uses a function called “ft_prepare_headmodel_sens,”
>> which does not appear to exist. I get the error: “Unrecognized function or
>> variable ‘ft_prepare_headmodel_sens.’” Is there another function that you
>> intended to use?
>>
>> Best regards,
>> Kenneth
>> _______________________________________________
>> fieldtrip mailing list
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C4e32224c3f754fd3199a08dd349af212%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638724563626227453%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C20000%7C%7C%7C&sdata=wv%2BNvWkZoDe5uLpXrJNG08Sgfdb79tJKbpKGCIIFpws%3D&reserved=0
>> <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C4e32224c3f754fd3199a08dd349af212%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638724563626243777%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C20000%7C%7C%7C&sdata=ZpInj943hWTn%2FPnCksI9Jw720evMz5ayb7FK2jcGFRI%3D&reserved=0>
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C4e32224c3f754fd3199a08dd349af212%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638724563626269487%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C20000%7C%7C%7C&sdata=gtqWrjcE%2Fq1Nc28okuYR%2FVNbZe6IF%2FB4h6zdtxgE7YE%3D&reserved=0
>> <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C4e32224c3f754fd3199a08dd349af212%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638724563626286966%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C20000%7C%7C%7C&sdata=NcBR0zTB1B%2Fd86jdSjiPrYDKnvdi%2FgYdPsC7EGUP2ys%3D&reserved=0>
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C4e32224c3f754fd3199a08dd349af212%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638724563626304357%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C20000%7C%7C%7C&sdata=hiOuIAvEbVY%2B%2BsINKVGVszBc8FcR5Km35fHDD18JXDI%3D&reserved=0
>> <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C4e32224c3f754fd3199a08dd349af212%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638724563626320910%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C20000%7C%7C%7C&sdata=PJpKojO7svmJcFVICuksJT4YPCJGcZjOZJMC6ppevDU%3D&reserved=0>
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C4e32224c3f754fd3199a08dd349af212%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638724563626338163%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C20000%7C%7C%7C&sdata=DXkUaqGuC7kNy8xkNPhuCHFiuc8JM9L9RWyPnhDdpDU%3D&reserved=0
>> <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C4e32224c3f754fd3199a08dd349af212%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638724563626354066%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C20000%7C%7C%7C&sdata=8YcBqd%2Fus3y%2BfLEXJPxDKEAJRdUFY5DmWxLeAuiVYHE%3D&reserved=0>
>>
>
>
> --
> Kenneth Shinozuka
> Harvard College '20 | BA in Neuroscience
> Oxford University '24 | PhD in Psychiatry
> +1 9493028589 (US, WhatsApp)
> +44 07572876618 (UK)
>
> _______________________________________________
> fieldtrip mailing list
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C4e32224c3f754fd3199a08dd349af212%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638724563626370039%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C20000%7C%7C%7C&sdata=wuK8Umoo3imi137H21Q37Tsf2XJnZMtS5uNv8Jr07uk%3D&reserved=0
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C4e32224c3f754fd3199a08dd349af212%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638724563626386400%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C20000%7C%7C%7C&sdata=Z828OE6sEfBpXVfak%2Fqw5xyXAnYjG67leMJCJieZnVk%3D&reserved=0
>
--
Kenneth Shinozuka
Harvard College '20 | BA in Neuroscience
Oxford University '24 | PhD in Psychiatry
+1 9493028589 (US, WhatsApp)
+44 07572876618 (UK)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20250114/5bed5c43/attachment.htm>
More information about the fieldtrip
mailing list