-
Notifications
You must be signed in to change notification settings - Fork 90
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
correctly track anonymization date of empty room recordings when written simultaneously with data #1270
Conversation
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.
LGTM! Thanks, Dan. CI failures are unrelated.
erm = dict() | ||
else: | ||
bids_path.update(task="task", suffix="eeg", datatype="eeg") | ||
# make sure anonymization works when also writing empty room file | ||
erm = dict(empty_room=raw.copy()) | ||
daysback_min, daysback_max = get_anonymization_daysback(raw) | ||
anonymize = dict(daysback=daysback_min + 1) | ||
orig_bids_path = bids_path.copy() | ||
bids_path = write_raw_bids( | ||
raw, bids_path, overwrite=True, anonymize=anonymize, verbose=False | ||
raw, bids_path, overwrite=True, anonymize=anonymize, verbose=False, **erm |
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.
I think this can be simplified to
if subject == "emptyroom":
...
er_raw=None
else:
...
er_raw = raw.copy()
...
write_raw_bids(..., empty_room=er_raw)
or so
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.
Sure, that's a slight improvement I guess
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.
I think we can merge this as is though, I think the difference in code here is miniscule. Thanks for the PR and the reviews.
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.
i don't know, why would you create a dict if you don't need it? just to later unpack the only element it contains 🧐
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.
@hoechenberger see #1274
closes #1269
PR Description
Merge checklist
Maintainer, please confirm the following before merging.
If applicable: