<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="Georgia">Hi Katy,<br>
      <br>
      how did you convert your motion data into BIDS? We have a set of
      resources on how to correctly <i>bidsify </i>the data <a
        href="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%7C638905359214679918%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=y57HPjW59aXoMsFB3%2FehiCwm59BHeMYTWGhC4sTxxXw%3D&reserved=0" originalSrc="https://juliuswelzel.github.io/motion_bids_materials_jw/">overview
      </a>and <a
href="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%7C638905359214699687%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=Vd%2Bv3RJiudevJ5flnekD3PPVrXTuDmmBg3iOJKSVZvg%3D&reserved=0" originalSrc="https://github.com/sjeung/multimodal_XDF-to-BID/blob/main/MoBIDS_handson_1_xdf2bids.m">example</a>.<br>
      <br>
      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 :)<br>
      <br>
      Best<br>
      Julius<br>
    </font><br>
    <div class="moz-cite-prefix">Am 11.08.2025 um 18:02 schrieb Cross,
      Kathryn A. via fieldtrip:<br>
    </div>
    <blockquote type="cite"
cite="mid:IA1PR12MB7616B2FE04E0146EAEA58FCD9328A@IA1PR12MB7616.namprd12.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator"
        content="Microsoft Word 15 (filtered medium)">
      <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Aptos;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;
        mso-ligatures:standardcontextual;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}div.WordSection1
        {page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size:11.0pt">I am trying
            to load BIDS formatted motion data and am  unsure of the
            correct way to do this.
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">When I try
            to use ft_read_data I am receiving the below error.
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">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.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">Thank you in
            advance for any advice!<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">Katy<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">data =
ft_read_data(‘sub-CM01_task-reaching_tracksys-apdm_run-1_motion.tsv’,’dataformat’,’bids_tsv’);<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal">208 [filename, headerfile, datafile] =
          dataset2files(filename, dataformat);<o:p></o:p></p>
        <p class="MsoNormal">found matching BIDS sidecar
'G:\PROJECTS\Cueing_Noninvasive\data\bids\sub-CM01\motion\sub-CM01_task-reaching_tracksys-apdm_run-1_motion.tsv'<o:p></o:p></p>
        <p class="MsoNormal">reading
'G:\PROJECTS\Cueing_Noninvasive\data\bids\sub-CM01\motion\sub-CM01_task-reaching_tracksys-apdm_run-1_motion.tsv'<o:p></o:p></p>
        <p class="MsoNormal">Error using loadjson>error_pos<o:p></o:p></p>
        <p class="MsoNormal">JSONLAB:JSON:InvalidFormat: Outer level
          structure must be an object or an array: 3<error><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Error in loadjson (line 143)<o:p></o:p></p>
        <p class="MsoNormal">                pos=error_pos('Outer level
          structure must be an object or an array',inputstr,pos);<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Error in ft_read_json (line 45)<o:p></o:p></p>
        <p class="MsoNormal">  json = loadjson(filename);<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Error in ft_read_header (line 317)<o:p></o:p></p>
        <p class="MsoNormal">      data_json = ft_read_json(sidecar);<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Error in ft_read_data (line 223)<o:p></o:p></p>
        <p class="MsoNormal">  hdr = ft_read_header(filename,
          'headerformat', headerformat, 'checkmaxfilter',
          checkmaxfilter, 'password', password, 'cache', cache);<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <br>
      <hr>
      <font face="Arial" color="Navy" size="2"><br>
        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.<br>
      </font>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre wrap="" class="moz-quote-pre">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-freetext" href="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%7C638905359214714864%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=btWpXsJ0YK4od81DTdvHnJLIqJTJUQhGcTRvliv65yc%3D&reserved=0" originalSrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a>
<a class="moz-txt-link-freetext" href="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%7C638905359214730103%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=M6OYh4tMssHIhtYdRUx23aSJy3Lk%2F6nzD0KaQCPc7jU%3D&reserved=0" originalSrc="https://doi.org/10.1371/journal.pcbi.1002202">https://doi.org/10.1371/journal.pcbi.1002202</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Julius Welzel
University of Kiel
Department of Neurology, UKSH Campus Kiel
<a class="moz-txt-link-freetext" href="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%7C638905359214747104%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=4OlJOrpAwatxizm8K4N2%2BFDK%2FINCYmAnb2U4LeyXcSE%3D&reserved=0" originalSrc="http://www.neurologie.uni-kiel.de/en/neurogeriatrics">http://www.neurologie.uni-kiel.de/en/neurogeriatrics</a></pre>
  </body>
</html>