[SQL/MEG] Add physiological_file.DownloadPath field#10411
[SQL/MEG] Add physiological_file.DownloadPath field#10411MaximeBICMTL wants to merge 1 commit intoaces:mainfrom
physiological_file.DownloadPath field#10411Conversation
jeffersoncasimir
left a comment
There was a problem hiding this comment.
LGTM, but missing change to raisinbread/RB_files/RB_physiological_file.sql
|
@jeffersoncasimir Added the Raisinbread SQL, good catch! |
10bfac2 to
df82158
Compare
|
Merged the main branch to resolve conflict, ready to go! |
|
I am not crazy about this because of the possibility of data between the two getting de-synced and not having a single source of truth, and also because of the data duplication. Is it not possible to either:
|
|
Hhhhm, I see your point but I think it would make the code more complicated and less responsive. IMO storing an archive in the BIDS is a big no-no because that is against the BIDS specification and makes it a lot harder to run BIDS libraries on the dataset, especially dataset-wide analyses where we would have to extract/copy every CTF acquisition in the dataset for each analysis. Regarding the opposite approach, I think tarring the directory on-request for download takes too much time and is not responsive enough. In fact, we already use the "copy multiple files into an archive for download" approach with the |
9470f37 to
7978223
Compare
add raisinbread sql [SQL/MEG] Add the MEG CTF head shape tables (aces#10412) 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 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.
7978223 to
cae8990
Compare
|
Rebased and squashed the commits of this PR to make it easier to work with it locally while waiting to address the comments. |
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.FilePathinto two fieldsFilePath(stays the same) andDownloadPath(new field):FilePathfield points to the directory in the BIDS dataset, and theDownloadPathpoints to an archive of that directory.Whenever computation needs to be done in the dataset, the
FilePathfield is used, whenever the user wants to download an acquisition file,DownloadPathis used.Testing
physiological_file.FilePathin the electrophysiology_modules.DownloadPathto an invalid value only breaks the main file download.