Source per-AOI relative-angle triplets from whole-screen fixations - #75
Merged
Conversation
Per-AOI fixation IDs are rarely consecutive, so the in-AOI-only triplet hunt collapsed sparse AOIs to (sum=0, mean=NaN). Hunt A->B->C in the whole-screen fixation list and credit the triplet to an AOI when B's fid is in that AOI. Mirrors the SaccadeVelocity plumbing and TIDE-Gaze PR #31. Whole-screen and per-window callers fall back to the legacy in-area triplet hunt via a null allScreenData parameter.
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.
Summary
(sum=0, mean=NaN, ...)on sparse AOIs.Angles.getAllRelativeAnglesnow accepts both the per-AOI and the whole-screen fixation lists; A->B->C triplets are hunted in the whole-screen list (where consecutive fids are common) and credited to an AOI when the middle fixation B's fid is also in that AOI.Analysis.generateResultsHelperbuildsvalidAllFixationsand threads it toAngles.analyze, mirroring the existingSaccadeVelocityplumbing.Angles.analyze/getAllRelativeAnglesoverloads remain — whole-screen and per-window callers fall back to the in-area-only triplet hunt unchanged.This is a definitional change: the metric now reports "turn angle at this AOI" rather than "turn angle while staying inside this AOI". Matches the parallel TIDE-Gaze fix on
TheD2Lab/TIDE-GazePR #31.Do not merge without Dr. Fu's sign-off.
Test plan
mvn -B clean test—AnglesTestand all other unrelated tests pass (the pre-existingDataEntryTest.testWriteToCSVfailure is unaffected by this change).data/p10_all_gaze.csvanddata/p20_all_gaze.csv: every AOI populatessum_of_all_relative_degreesandmean_relative_degreewith real values; means in the 53°–132° range across AOIs (e.g. p20RPMwith 54 fixations: mean=116.2°; p20ASIwith 99 fixations: mean=131.5°). NoNaNcells anywhere.