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.
Running
visiomode-analysis sessionon a 2021singletargetsession in which every trial was a miss failed withIndexError: index -1 is out of bounds for axis 0 with size 0. Three problems were stacked: the reaction-time plots callednp.percentileon an empty array;singletarget(the pre-rename spelling oftargetonly) fell through to the Go/NoGo and 2AFC code paths, so the report tried to plot hit/false-alarm RTs; and the legacyhit/false_alarm/missoutcome labels were only remapped after flattening, so the per-trial SDT inference never matched them and every trial came out unclassified. This branch also mergesmainback in so the PR does not revert the v0.2.0 release.Changes
plots.plot_rt_median/plot_rt_medians_from_dictreturn NaN markers for empty RT arrays and leave the y-axis to auto-range when the stimulus duration is unknown (legacy sessions without aspecreport it as -1 ms, which produced a[0, -0.001]range).session.TARGETONLY_PROTOCOLS/session.is_targetonly()centralise thetargetonlyandsingletargetalias; used in_flatten_trials,generate_report, and the report template (via a newis_targetonlytemplate variable). Output filenames keep the original protocol token._flatten_trials(_normalise_legacy_outcome) before stimulus reconstruction and SDT inference; the post-flatten DataFrame remap is kept as a no-op safety net.write_legacy_singletarget_jsonconftest factory; regression tests for the empty-RT plots, unknown stimulus duration, thesingletargetalias, legacy label normalisation,summary(),generate_report(), and the CLI. 105 tests pass, mypy is clean.## [Unreleased]/### Fixed.