Skip to content
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

rest condition should have task name starting with rest not == to rest #585

Merged
merged 12 commits into from
Sep 2, 2022

Conversation

agramfort
Copy link
Member

ok for you @sappelhoff @hoechenberger ?

see at https://bids-specification.readthedocs.io/en/stable/04-modality-specific-files/01-magnetic-resonance-imaging-data.html

The task label included in the file name is derived from this "TaskName" field by removing all non-alphanumeric ([a-zA-Z0-9]) characters. For example "TaskName" "faces n-back" will correspond to task label facesnback. A RECOMMENDED convention is to name resting state task using labels beginning with rest.

@hoechenberger
Copy link
Member

hoechenberger commented Aug 7, 2022

On the one hand, I agree we're currently being too strict.

On the other hand, we might produce false-positives here. Imagine a task restless, or restore, or restricted, or restaurant, … you get the idea.

I'm starting to think we should introduce a config option, allowing the user to specify whether the data at hand is a resting-state recording or not.

WDYT?

@agramfort
Copy link
Member Author

yes I think you are right. How would you write such an option @hoechenberger ?

@hoechenberger
Copy link
Member

@agramfort

Since we currently only allow to process a single task, we could simply have

task_is_resting_state: bool = False

Super low-effort and not very flexible, but I think absolutely sufficient for now. WDYT?

@hoechenberger
Copy link
Member

hoechenberger commented Aug 8, 2022

task_is_resting_state: bool = False

Maybe better:

task_is_resting_state: Optional[bool] = None

and if None, we apply the existing heuristic (task name equal to "rest"); and with a boolean value, the user can force the treatment of any task as either resting-state or not.

@agramfort
Copy link
Member Author

@agramfort
Copy link
Member Author

@hoechenberger please have a look at this one when you have a moment. 🙏

Copy link
Member

@hoechenberger hoechenberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nitpicks, otherwise LGTM!

config.py Outdated Show resolved Hide resolved
config.py Outdated Show resolved Hide resolved
config.py Outdated Show resolved Hide resolved
config.py Outdated Show resolved Hide resolved
config.py Outdated Show resolved Hide resolved
tests/configs/config_ds003775.py Outdated Show resolved Hide resolved
@hoechenberger hoechenberger enabled auto-merge (squash) September 2, 2022 09:24
@hoechenberger hoechenberger merged commit 2b16d44 into mne-tools:main Sep 2, 2022
@agramfort
Copy link
Member Author

🙏 @hoechenberger

@hoechenberger
Copy link
Member

Thanks @agramfort!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants