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

Merged DotStim fixes (schofiaj) and added audioDevice preference #1341

Merged
merged 28 commits into from Jan 23, 2017

Conversation

peircej
Copy link
Member

@peircej peircej commented Jan 16, 2017

No description provided.

schofiaj and others added 28 commits January 9, 2017 17:30
The bugs are:

1. Dots that go out of bounds are replaced at a random location. When coherence is high this results in a shift in dot density toward the edge where most dots are going out of bounds. When coherence is low it causes a shift way from all borders. This is because the dots are disappearing at edges to keep the distribution of dots uniform they should be reborn at the opposite edge.

2. When noise dots are in walk mode the dot directions are not updated often enough such that as the coherence changes some noise dots become signal dots but retain the ransom direction they had when they were noise.

3. Dot locations are not refreshed between trials. If dot lifetime is long (esp infinite) one can see clusters of dots consistent from trial to trail. This accentuates the bug in (1) when signal dots reverse direction between trials as the accumulated dots on one side of the field then all charge back across the field together. 



I’ve fixed these by. See dots.py attached
Should be working correctly on pyo, sounddevice and pysoundcard
(but have tested that there are no memory leaks using
  psychopy.info.getRAM()
in a loop)
by not using copy we were actually altering the user's original array
so we have to set the manually immediately after creation
The issues only become apparent on win32 due to limit of 1 stream

Also added some extra checks to block sizes during addition of
hamming window
Hard for the user to know otherwise what the available options are
The fix by @schofiaj is right in principal but currently means that
dots are straying outside the aperture. Will revert to previous
behaviour of random location for out-of-bounds dots until we can fix this
It looks like travis is trying to load the pyo lib, which has no
anti-travis defenses
On ubuntu it seems that the first frame is requested as part of the init
so some of the variables didn't exist yet.

Also we had latency set to 'high' for some testing but should obviously
be 'low' latency
@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 51.799% when pulling 1d3aea6 on peircej:master into 81062c6 on psychopy:master.

@peircej peircej merged commit 7553d97 into psychopy:master Jan 23, 2017
#wind the dots back one step and store as tempary values
if self.noiseDots == 'position':
Copy link
Member Author

Choose a reason for hiding this comment

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

@schofiaj For now I've turned off your wrapping fix and reverted to recreating dots with a new random position, due to the issue with dots appearing outside the aperture. Your other fixes remain in place though.

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.

None yet

3 participants