[FieldTrip] Load BIDS motion data

Julius Welzel j.welzel at neurologie.uni-kiel.de
Mon Aug 11 21:05:21 CEST 2025


Hi Katy,

how did you convert your motion data into BIDS? We have a set of 
resources on how to correctly /bidsify /the data overview 
<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjuliuswelzel.github.io%2Fmotion_bids_materials_jw%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C2c01718bb9484aeaacda08ddd90a01b9%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638905359214571388%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=AmEHPWdBkyPbpfMMg0NSXbuiOIbDfNqtSclXqbNdhew%3D&reserved=0>and example 
<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsjeung%2Fmultimodal_XDF-to-BID%2Fblob%2Fmain%2FMoBIDS_handson_1_xdf2bids.m&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C2c01718bb9484aeaacda08ddd90a01b9%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638905359214593682%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=wiKogEPWgGM4uVX7aL8nFZ0V6on8PY0OlmMt2YOFTpM%3D&reserved=0>.

What do you intend to do with the motion data in fieldtrip if I may ask? 
The toolbox is not designed for motion data, however there are a few 
processing steps which might be meaningful to run. If you have any 
questions, please reach out to us :)

Best
Julius

Am 11.08.2025 um 18:02 schrieb Cross, Kathryn A. via fieldtrip:
>
> I am trying to load BIDS formatted motion data and am  unsure of the 
> correct way to do this.
>
> When I try to use ft_read_data I am receiving the below error.
>
> Is my input wrong? It seems to be trying to read a tsv file as a json 
> in line 317 of ft_read_header. I have tried a few variations of 
> headerformat and dataformat arguments without success.
>
> Thank you in advance for any advice!
>
> Katy
>
> data = 
> ft_read_data(‘sub-CM01_task-reaching_tracksys-apdm_run-1_motion.tsv’,’dataformat’,’bids_tsv’);
>
> 208 [filename, headerfile, datafile] = dataset2files(filename, 
> dataformat);
>
> found matching BIDS sidecar 
> 'G:\PROJECTS\Cueing_Noninvasive\data\bids\sub-CM01\motion\sub-CM01_task-reaching_tracksys-apdm_run-1_motion.tsv'
>
> reading 
> 'G:\PROJECTS\Cueing_Noninvasive\data\bids\sub-CM01\motion\sub-CM01_task-reaching_tracksys-apdm_run-1_motion.tsv'
>
> Error using loadjson>error_pos
>
> JSONLAB:JSON:InvalidFormat: Outer level structure must be an object or 
> an array: 3<error>
>
> Error in loadjson (line 143)
>
>                 pos=error_pos('Outer level structure must be an object 
> or an array',inputstr,pos);
>
> Error in ft_read_json (line 45)
>
>   json = loadjson(filename);
>
> Error in ft_read_header (line 317)
>
>       data_json = ft_read_json(sidecar);
>
> Error in ft_read_data (line 223)
>
>   hdr = ft_read_header(filename, 'headerformat', headerformat, 
> 'checkmaxfilter', checkmaxfilter, 'password', password, 'cache', cache);
>
>
> ------------------------------------------------------------------------
>
> UCLA HEALTH SCIENCES IMPORTANT WARNING: This email (and any 
> attachments) is only intended for the use of the person or entity to 
> which it is addressed, and may contain information that is privileged 
> and confidential. You, the recipient, are obligated to maintain it in 
> a safe, secure and confidential manner. Unauthorized redisclosure or 
> failure to maintain confidentiality may subject you to federal and 
> state penalties. If you are not the intended recipient, please 
> immediately notify us by return email, and delete this message from 
> your computer.
>
> _______________________________________________
> 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%7C2c01718bb9484aeaacda08ddd90a01b9%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638905359214615472%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=dUYd%2FX48h0KrwlB%2FeiOMmRt5pqEaEeRZxCZd4DmOsmc%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%7C2c01718bb9484aeaacda08ddd90a01b9%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638905359214631933%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=I4PKeDbwi%2BhdUFPPkpC8XdDkfscXy%2F0In%2F9aiwpOsAc%3D&reserved=0

-- 
Julius Welzel
University of Kiel
Department of Neurology, UKSH Campus Kiel
https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.neurologie.uni-kiel.de%2Fen%2Fneurogeriatrics&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C2c01718bb9484aeaacda08ddd90a01b9%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638905359214648296%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=0OxcawliVUcHauc8lUKdWJAA%2BDKULaMMDJr5f7RlW2g%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20250811/adc29f79/attachment.htm>


More information about the fieldtrip mailing list