Handle excluded sessions in subject summaries - #28
Merged
Merged
Conversation
Merged
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.
Closes #27.
visiomode-analysis subjectnow recognises sessions whose trials file carries an exclude suffix after.csv(e.g...._trials.csv.ignore). By default these sessions are kept in the subject summary without metrics, so they still count towardstask_session.--no-ignoredrops them altogether.Changes
.ignore,.ignored,.exclude,.excludedand.skip, matched in any case (EXCLUDE_SUFFIXES, checked byis_excluded()).collate_sessions()now globs*trials.csv*and skips files with any other suffix (e.g..bak).animal_id,session_date,protocol,environment,experiment, read from the file's first row) and every metric set to NaN. The file is never passed tosession.summary(), so a broken or partial session can't stop the run. These rows still count towardssession_idandtask_session.excludedcolumn in the summary CSV (right after the metadata columns) flags these rows. It is always present and is allFalsewith--no-ignore.collate_sessions()andpreprocess_subject()take a newignore: bool = Trueparameter.ignore=False(subject --no-ignore) drops excluded sessions before ranking, and raisesFileNotFoundErrorif no sessions are left.task_sessioncounting, each suffix in mixed case, other suffixes being skipped, dropping with--no-ignoreand the error when nothing is left, plus two command-line tests.## [Unreleased].