-
Notifications
You must be signed in to change notification settings - Fork 98
[MRG] Add motion to BIDSPath #1430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 28 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
5832654
[ADD] describing fields in `event.json` file for the REQUIRED onset a…
JuliusWelzel 9860744
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b1ef7fe
fix line length <88
JuliusWelzel 208885b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8895caf
remove column position from description
JuliusWelzel 74566f2
Merge branch 'main' into main
sappelhoff 61030eb
only provide description and onset for the json
JuliusWelzel 3e31c6b
refine description of sample
JuliusWelzel 6ade344
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 64ec71a
satisfy contributing guidelines
JuliusWelzel eb984b7
Merge branch 'main' of https://github.com/JuliusWelzel/mne-bids
JuliusWelzel 37faafc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3a37466
move author to correct position in CITATION.cff
JuliusWelzel a693a4e
[ADD] adapt the config file to include motion data type
JuliusWelzel 5026015
Merge branch 'main' of https://github.com/JuliusWelzel/mne-bids
JuliusWelzel 31fe43c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5780de7
[ADD] include tracking_system in ENTITY_VALUE_TYPE and BIDSPath class
JuliusWelzel 1bbc42b
Merge branch 'main' of https://github.com/JuliusWelzel/mne-bids
JuliusWelzel 49b5c02
fix tests
drammock 2bcb5b2
[FIX] update spelling of 'tracking-system' in test_path.py with corre…
JuliusWelzel c5a18a1
[ADD] include 'tracking-system' in the list of valid entity values in…
JuliusWelzel 973f536
Merge branch 'main' into main
JuliusWelzel 60e7661
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 0373d18
[FIX] correct spelling of 'tracking-system' to 'tracking_system' in A…
JuliusWelzel 46d1e63
Merge branch 'main' of https://github.com/JuliusWelzel/mne-bids
JuliusWelzel c581f89
[FIX] update entity name from 'tracking-system' to 'tracking_system' …
JuliusWelzel 8f1ff0e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] be2b713
Merge branch 'main' into main
JuliusWelzel 734b427
Merge branch 'main' into main
JuliusWelzel b508ff4
fix whats_new.rst
JuliusWelzel 14069fb
FIX: tracking_system update in BIDSPath class
JuliusWelzel 35ab863
FIX: correct path reference for BIDSPath initialization in whats_new.rst
JuliusWelzel 8849b22
FEAT: add tracking_system parameter to _filter_fnames function
JuliusWelzel 7124242
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 04bbe04
fix whats_new.rst to ref BIDSPath
JuliusWelzel 2b4a3d2
Merge branch 'main' of https://github.com/JuliusWelzel/mne-bids
JuliusWelzel c235ca2
fix whats_new.rst to ref BIDSPath
JuliusWelzel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,7 +6,7 @@ | |||||
| from mne import io | ||||||
| from mne.io.constants import FIFF | ||||||
|
|
||||||
| BIDS_VERSION = "1.7.0" | ||||||
| BIDS_VERSION = "1.9.0" | ||||||
|
|
||||||
| PYBV_VERSION = "0.7.3" | ||||||
| EEGLABIO_VERSION = "0.0.2" | ||||||
|
|
@@ -15,17 +15,19 @@ | |||||
|
|
||||||
| EPHY_ALLOWED_DATATYPES = ["meg", "eeg", "ieeg", "nirs"] | ||||||
|
|
||||||
| ALLOWED_DATATYPES = EPHY_ALLOWED_DATATYPES + ["anat", "beh"] | ||||||
| ALLOWED_DATATYPES = EPHY_ALLOWED_DATATYPES + ["anat", "beh", "motion"] | ||||||
|
|
||||||
| MEG_CONVERT_FORMATS = ["FIF", "auto"] | ||||||
| EEG_CONVERT_FORMATS = ["BrainVision", "auto"] | ||||||
| IEEG_CONVERT_FORMATS = ["BrainVision", "auto"] | ||||||
| NIRS_CONVERT_FORMATS = ["auto"] | ||||||
| MOTION_CONVERT_FORMATS = ["tsv", "auto"] | ||||||
| CONVERT_FORMATS = { | ||||||
| "meg": MEG_CONVERT_FORMATS, | ||||||
| "eeg": EEG_CONVERT_FORMATS, | ||||||
| "ieeg": IEEG_CONVERT_FORMATS, | ||||||
| "nirs": NIRS_CONVERT_FORMATS, | ||||||
| "motion": MOTION_CONVERT_FORMATS, | ||||||
| } | ||||||
|
|
||||||
| # Orientation of the coordinate system dependent on manufacturer | ||||||
|
|
@@ -147,12 +149,17 @@ | |||||
| ".snirf", # SNIRF | ||||||
| ] | ||||||
|
|
||||||
| allowed_extensions_motion = [ | ||||||
| ".tsv", # Tab-separated values | ||||||
| ] | ||||||
|
|
||||||
| # allowed extensions (data formats) in BIDS spec | ||||||
| ALLOWED_DATATYPE_EXTENSIONS = { | ||||||
| "meg": allowed_extensions_meg, | ||||||
| "eeg": allowed_extensions_eeg, | ||||||
| "ieeg": allowed_extensions_ieeg, | ||||||
| "nirs": allowed_extensions_nirs, | ||||||
| "motion": allowed_extensions_motion, | ||||||
| } | ||||||
|
|
||||||
| # allow additional extensions that are not BIDS | ||||||
|
|
@@ -190,6 +197,7 @@ | |||||
| "physio", | ||||||
| "stim", # behavioral | ||||||
| "nirs", | ||||||
| "motion", # motion | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. redundant comment
Suggested change
|
||||||
| ] | ||||||
|
|
||||||
| # converts suffix to known path modalities | ||||||
|
|
@@ -227,6 +235,7 @@ | |||||
| "description", | ||||||
| "suffix", | ||||||
| "extension", | ||||||
| "tracking_system", | ||||||
| ) | ||||||
| ALLOWED_PATH_ENTITIES_SHORT = { | ||||||
| "sub": "subject", | ||||||
|
|
@@ -239,6 +248,7 @@ | |||||
| "recording": "recording", | ||||||
| "split": "split", | ||||||
| "desc": "description", | ||||||
| "tracksys": "tracking_system", | ||||||
| } | ||||||
|
|
||||||
| # Annotations to never remove during reading or writing | ||||||
|
|
@@ -316,6 +326,7 @@ | |||||
| ALLOWED_SPACES["ieeg"] = BIDS_SHARED_COORDINATE_FRAMES + BIDS_IEEG_COORDINATE_FRAMES | ||||||
| ALLOWED_SPACES["anat"] = None | ||||||
| ALLOWED_SPACES["beh"] = None | ||||||
| ALLOWED_SPACES["motion"] = None | ||||||
|
|
||||||
| # See: https://bids-specification.readthedocs.io/en/latest/appendices/entity-table.html#encephalography-eeg-ieeg-and-meg # noqa: E501 | ||||||
| ENTITY_VALUE_TYPE = { | ||||||
|
|
@@ -331,6 +342,7 @@ | |||||
| "description": "label", | ||||||
| "suffix": "label", | ||||||
| "extension": "label", | ||||||
| "tracking_system": "label", | ||||||
| } | ||||||
|
|
||||||
| # mapping from supported BIDs coordinate frames -> MNE | ||||||
|
|
||||||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be the line causing the issue, which makes sense because the EEG BIDS datasets have sidecar files that are just text files. So adding
.tsvto the allowed datafile extensions seems to be confusing some of mne_bids internal functions..Motion data might be the first modality with data that are stored in simple text files that we are trying to add into MNE-BIDS, which is why we are hitting this problem now. But I know that Eye-tracking BIDS will have the same issue.. So supporting these data might require more refactoring of the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a grumpy sidenote, I never understood why BIDS encourages storing some modalities of data in text files... !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without having looked into it too deeply, that could be something that needs refactoring, yes.