Skip to content

DIE physiological.py DIE (electrodes import refactor) (PR 2) - #1509

Open
MaximeBICMTL wants to merge 3 commits into
aces:mainfrom
MaximeBICMTL:electrodes-import-refactor
Open

MaximeBICMTL wants to merge 3 commits into
aces:mainfrom
MaximeBICMTL:electrodes-import-refactor

Conversation

@MaximeBICMTL

@MaximeBICMTL MaximeBICMTL commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #1508 (diff)

Description

Refactor electrodes.tsv import to use the ORM database abstraction, good layering in loris_bids_utils, loris_core lib, loris_bids_importer, and typed code.

A notable design change is that the previous code proceeded in this order:

  1. Import electrodes.
  2. Import coordinate system.
  3. Associate electrodes to their coordinate system.

But this design is not ideal, because if step 2 fails, then electrodes are left without link to their coordinate system (and thus their acquisition file given the current table architecture).

The new import order is:

  1. Import coordinate system.
  2. Import electrodes and link them to that coordinate system.

This order is simpler, more error-resilient, and easier to extend to other modalities like MEG (which is currently not integrated with coordinate systems yet).

This PR notably finally gets rid of physiological.py, which is a very good thing that we should celebrate. The table design is still horrendous but that can now be more easily improved on after this PR.

@github-actions github-actions Bot added Language: Python Issue or PR related to the Python codebase Package: BIDS importer PR or issue related to the BIDS importer Package: BIDS utilities PR or issue related to the BIDS utilities labels Oct 6, 2026
@MaximeBICMTL MaximeBICMTL added the Category: Refactor Issue or PR that aims to improve the existing code label Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category: Refactor Issue or PR that aims to improve the existing code Language: Python Issue or PR related to the Python codebase Package: BIDS importer PR or issue related to the BIDS importer Package: BIDS utilities PR or issue related to the BIDS utilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant