Skip to content

[SQL/MEG] Add the MEG CTF head shape tables#10412

Open
MaximeBICMTL wants to merge 1 commit intoaces:mainfrom
MaximeBICMTL:head_shape_tables
Open

[SQL/MEG] Add the MEG CTF head shape tables#10412
MaximeBICMTL wants to merge 1 commit intoaces:mainfrom
MaximeBICMTL:head_shape_tables

Conversation

@MaximeBICMTL
Copy link
Contributor

@MaximeBICMTL MaximeBICMTL commented Mar 16, 2026

Description

The MEG CTF format uses a headshape.pos file to register the head shape of the participant. This file is CTF-specific but BIDS-standard (the BIDS MEG specification basically allows to use native files of all specific data types), and is usually shared across all the MEG acquisitions of a session.

This PR adds some tables to register this data in the LORIS physiological database and link it to the relevant MEG files.

The headshape.pos file format is unfortunately very sparsely documented. It is a textual file format whose contents looks like this:

85
1		5.60644227	-6.38055462	0.79194871
2		8.06310971	-4.72750212	0.59046631
3		7.58675759	-5.78050209	3.05185917
...
NAS	8.57169649	-0.14219376	-3.33998151
LPA	-0.58286578	7.02263278	0.27529669
RPA	-1.40471662	-7.10183109	0.57320080

The first line is the number of points. The coordinates are in centimeters. It might be useful to use a proper physiological_coord_system in the future, but this can easily be added later IMO, so I'd like to start by merging this minimal implementation.

Testing

  • ✅ Ran the SQL patch on Raisinbread.
  • ✅ Use these tables in my BIDS MEG import LORIS Python branch.

@github-actions github-actions bot added the Language: SQL PR or issue that update SQL code label Mar 16, 2026
@MaximeBICMTL MaximeBICMTL added Category: Feature PR or issue that aims to introduce a new feature Difficulty: Simple PR or issue that should be easy to implement, review, or test Release: SQL patch PR that contains an SQL patch to apply labels Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category: Feature PR or issue that aims to introduce a new feature Difficulty: Simple PR or issue that should be easy to implement, review, or test Language: SQL PR or issue that update SQL code Release: SQL patch PR that contains an SQL patch to apply

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant