[SQL/electrophysiology] Fix physiological event sample SQL type#10358
Merged
[SQL/electrophysiology] Fix physiological event sample SQL type#10358
Conversation
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In the LORIS database schema, the
EventSamplefield currently has adecimal(11, 6)type, which can represent decimal values up to 100,000.I have some files for MPN that have event sample values up to 300,000, so a higher maximum is clearly needed. After digging more into it, it appears that this field is not a standard BIDS field, but that it is rather a field produced by MNE-BIDS (this will need to be documented on the Python side). In my dataset, and as well as the
inexistantvery sparse documentation that I could find, it actually seems to me that this value should always be an integer:https://github.com/mne-tools/mne-bids/blob/5dac732153c071a85d25d5dd0f3d7fde7d15bf2b/mne_bids/write.py#L516-L521
https://github.com/mne-tools/mne-bids/blob/5dac732153c071a85d25d5dd0f3d7fde7d15bf2b/mne_bids/read.py#L601
The documented values uses integers rather than decimals.
Moreover, I ran the following query on Raisinbread and C-BIG and did not find any decimal value:
Solution
Change the
EventSamplecolumn type fromDECIMAL(11, 6)toINT(10).