-
Notifications
You must be signed in to change notification settings - Fork 92
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
fix doc and logging mark_channels #1293
Conversation
@@ -2565,7 +2564,7 @@ def mark_channels(bids_path, *, ch_names, status, descriptions=None, verbose=Non | |||
idx = tsv_data["name"].index(ch_name) | |||
logger.info( | |||
f"Processing channel {ch_name}:\n" | |||
f" status: bad\n" | |||
f" status: {status_}\n" |
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.
no idea why this was just bad
before 🤔 especially because the column is initialized with all good
if it wasn't present before.
# Read sidecar and create required columns if they do not exist.
if "status" not in tsv_data:
logger.info('No "status" column found in input file. Creating.')
tsv_data["status"] = ["good"] * len(tsv_data["name"])
I think this is also why in the docstring it said something about "default is 'bad'". If we start writing the status for a few channels only, the status for all other channels gets automatically set. However it gets set to "good", not "bad", ... which I find reasonable, but which was misleading in the function docstr.
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.
ok, I followed up on this in 5c04279
Thanks for making me aware of this @drammock, I think the present PR should fix a thing or two. |
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'm about to open a separate issue about this, but FWIW the behavior of "empty list means mark all channels" was really surprising and caused me to have to alter and re-run my dataset preparation script (no big deal, this is why we dry-run those scripts with only 2 subjs/2 sessions).
Co-authored-by: Daniel McCloy <[email protected]>
Co-authored-by: Daniel McCloy <[email protected]>
Co-authored-by: Daniel McCloy <[email protected]>
Thanks for the review, yes let's discuss your concerns in a separate issue. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1293 +/- ##
==========================================
- Coverage 97.61% 97.45% -0.17%
==========================================
Files 40 40
Lines 8685 8717 +32
==========================================
+ Hits 8478 8495 +17
- Misses 207 222 +15 ☔ View full report in Codecov by Sentry. |
test failures are unrelated, merging. |
PR Description
Merge checklist
Maintainer, please confirm the following before merging.
If applicable: