Skip to content
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

add peak velocity and peak acceleration #253

Merged
merged 4 commits into from
Nov 10, 2023

Conversation

ZoeJacky
Copy link
Collaborator

mouse_positions:[[x0, y0], [x1, y1], ...]
mouse_times:[t0, t1, ...]

velocity:
[[Vx0,Vy0],[Vx1,Vy1], ...]
Vx0 = (x1-x0)/(t1-t0)
Vy0 = (y1-y0)/(t1-t0)
....
acceleration:
[[Ax0,Ay0],[Ax1,Ay1], ...]
Ax0 = (Vx1-Vx0)/(t1-t0)
Ay0 = (Vy1-Vy0)/(t1-t0)
....

peak velocity = max(velocity)
peak acceleration = max(acceleration)

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #253 (8f29c0c) into main (daacd30) will increase coverage by 0.18%.
Report is 2 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #253      +/-   ##
==========================================
+ Coverage   89.82%   90.01%   +0.18%     
==========================================
  Files          19       19              
  Lines        1573     1602      +29     
==========================================
+ Hits         1413     1442      +29     
  Misses        160      160              
Files Coverage Δ
src/vstt/display.py 100.00% <ø> (ø)
src/vstt/stats.py 99.01% <100.00%> (+0.14%) ⬆️
src/vstt/vis.py 95.14% <100.00%> (ø)
src/vstt/vtypes.py 98.71% <100.00%> (+0.03%) ⬆️

Copy link
Member

@lkeegan lkeegan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add definitions/descriptions of these two new statistics to docs/reference/statistics.rst?

Otherwise looks good!

src/vstt/stats.py Show resolved Hide resolved
Copy link
Member

@lkeegan lkeegan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor comments, otherwise looks good!

(the CI is failing due to wxPython being down, not related to your changes)

docs/reference/statistics.rst Outdated Show resolved Hide resolved
docs/reference/statistics.rst Outdated Show resolved Hide resolved
docs/reference/statistics.rst Outdated Show resolved Hide resolved
docs/reference/statistics.rst Outdated Show resolved Hide resolved
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@lkeegan lkeegan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@ZoeJacky ZoeJacky requested a review from lkeegan November 10, 2023 15:02
@ZoeJacky
Copy link
Collaborator Author

I will merge the code to the main branch, thank you, Liam!

@ZoeJacky ZoeJacky merged commit 96270c0 into main Nov 10, 2023
16 checks passed
@ZoeJacky ZoeJacky deleted the peak_velocity_and_acceleration branch November 10, 2023 15:04
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