Skip to content

[SQL/MEG] Add physiological_file.DownloadPath field#10411

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

[SQL/MEG] Add physiological_file.DownloadPath field#10411
MaximeBICMTL wants to merge 1 commit intoaces:mainfrom
MaximeBICMTL:physio_file_download_path

Conversation

@MaximeBICMTL
Copy link
Contributor

As discussed on Slack.

Problem

For the EEG data types that LORIS currently handles, the acquisition files are "real" files, which is very nice. However, for the MEG CTF data types, the acquisition files are actually directories. The BIDS specification says that these MEG CTF acquisitions must be stored as directories, not as archives, and the neuroscience libraries like MNE only work on directories. As such, it makes sense to store the MEG CTF as directories in the LORIS BIDS dataset. However, the users must also be able to download these acquisition files, which is problematic if those are directories.

Solution

Split physiological_file.FilePath into two fields FilePath (stays the same) and DownloadPath (new field):

  • For "real" files, like those we currently have with EEG, the values of these fields are identical, as they both point to the same file.
  • For directories, the FilePath field points to the directory in the BIDS dataset, and the DownloadPath points to an archive of that directory.

Whenever computation needs to be done in the dataset, the FilePath field is used, whenever the user wants to download an acquisition file, DownloadPath is used.

Testing

  • ✅ Ran the patch on Raisinread.
  • ✅ Looked for all occurences of physiological_file.FilePath in the electrophysiology_modules.
  • ✅ Downloaded a main EEG acquisition file and its associated files, and confirmed that changing the DownloadPath to an invalid value only breaks the main file download.

@github-actions github-actions bot added Language: SQL PR or issue that update SQL code Language: PHP PR or issue that update PHP code Module: electrophysiology_browser PR or issue related to electrophysiology_browser module labels Mar 12, 2026
@MaximeBICMTL MaximeBICMTL added Category: Refactor PR or issue that aims to improve the existing code Difficulty: Simple PR or issue that should be easy to implement, review, or test labels Mar 12, 2026
@MaximeBICMTL MaximeBICMTL added Category: Feature PR or issue that aims to introduce a new feature and removed Category: Refactor PR or issue that aims to improve the existing code 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: PHP PR or issue that update PHP code Language: SQL PR or issue that update SQL code Module: electrophysiology_browser PR or issue related to electrophysiology_browser module

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant