Skip to content

Source per-AOI relative-angle triplets from whole-screen fixations - #75

Merged
oscararenas12 merged 1 commit into
mainfrom
aoi-angles-whole-screen-fix
May 13, 2026
Merged

Source per-AOI relative-angle triplets from whole-screen fixations#75
oscararenas12 merged 1 commit into
mainfrom
aoi-angles-whole-screen-fix

Conversation

@upgr4de03

@upgr4de03 upgr4de03 commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Stops the per-AOI relative-angle metric from collapsing to (sum=0, mean=NaN, ...) on sparse AOIs.
  • Angles.getAllRelativeAngles now 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.generateResultsHelper builds validAllFixations and threads it to Angles.analyze, mirroring the existing SaccadeVelocity plumbing.
  • Legacy single-arg Angles.analyze / getAllRelativeAngles overloads remain — whole-screen and per-window callers fall back to the in-area-only triplet hunt unchanged.
  • Absolute angles untouched (pair-based; no bug).

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-Gaze PR #31.

Do not merge without Dr. Fu's sign-off.

Test plan

  • mvn -B clean testAnglesTest and all other unrelated tests pass (the pre-existing DataEntryTest.testWriteToCSV failure is unaffected by this change).
  • Pilot run on data/p10_all_gaze.csv and data/p20_all_gaze.csv: every AOI populates sum_of_all_relative_degrees and mean_relative_degree with real values; means in the 53°–132° range across AOIs (e.g. p20 RPM with 54 fixations: mean=116.2°; p20 ASI with 99 fixations: mean=131.5°). No NaN cells anywhere.
  • Spot-check against TIDE-Gaze numbers on the shared pilot before merge.

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.
@oscararenas12
oscararenas12 merged commit a796fa4 into main May 13, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants