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
Timing improvements #2557
Timing improvements #2557
Conversation
Now providing a default window to sync to (like the when arg in play()) Fixed issue with extra stopping logging items
In the past we were deciding whether to draw for one more frame based on a guess about when the next frame will occur, but not trying to determine how far we are from that flip time: ``` if tDesired > (t-frameInterval*0.5): #guess we switch ``` Window now has a method to estimate time of next flip: ``` timeNextFlip = win.getFutureFlipTime() if tDesired > timeNextFlip-tolerance: #we're more confident based on actual predicted frame time ``` On my tests this has made the stimulus timing very accurate whereas before it was often out by a frame
…ming-improvements # Conflicts: # psychopy/experiment/components/sound/__init__.py # psychopy/sound/backend_ptb.py # psychopy/visual/window.py
Codecov Report
@@ Coverage Diff @@
## master #2557 +/- ##
==========================================
+ Coverage 44.43% 44.45% +0.02%
==========================================
Files 234 234
Lines 41255 41275 +20
Branches 7115 7121 +6
==========================================
+ Hits 18331 18349 +18
- Misses 20966 20970 +4
+ Partials 1958 1956 -2
Continue to review full report at Codecov.
|
This pull request introduces 1 alert and fixes 1 when merging 12d4781 into 4011fe0 - view on LGTM.com new alerts:
fixed alerts:
This project has automated code review enabled, but doesn't use the LGTM GitHub App. Migrate over by installing the app. Read about the benefits of migrating to GitHub Apps in the blog. Comment posted by LGTM.com |
Using the
Window.getFutureFlipTime()
, created for PTB sound timing, we can make more accurate timing decisions for Builder output code as well.