response = [0]*len(event.mouseButtons) #initializes it to a list of 0s
with the length equal to the number of active buttons.
mouse.clickReset()
while not any(response):
(response,rt) = mouse.getPressed(getTime=True)
Once the loop exits you'll have your response and RT.
You definitely do not want to put a core.wait(.05) inside the loop
because then you're only checking for responses every 50 ms (and thus
your RTs will all be rounded up <= 50 ms)
-----------------------------------------------------
Gary Lupyan - lup...@wisc.edu
Assistant Professor of Psychology
University of Wisconsin, Madison
http://sapir.psych.wisc.edu
-----------------------------------------------------
> --
> You received this message because you are subscribed to the Google Groups
> "psychopy-users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/psychopy-users/-/-PLycKZMwlwJ.
>
> To post to this group, send email to psychop...@googlegroups.com.
> To unsubscribe from this group, send email to
> psychopy-user...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/psychopy-users?hl=en.
I've just played around with clickReset / getTimes and yeah, it
doesn't seem to work as advertised in the current docs, but I'm
running an older version of Psychopy (1.70). What's happening for me
is that I need to keep checking getPressed() to get accurate times.
Are you running ver 1.73?
-----------------------------------------------------
Gary Lupyan - lup...@wisc.edu
Assistant Professor of Psychology
University of Wisconsin, Madison
http://sapir.psych.wisc.edu
-----------------------------------------------------
> --
> You received this message because you are subscribed to the Google Groups
> "psychopy-users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/psychopy-users/-/leyK2euduUQJ.
Jon, how come 1.72 is still not in the official release?
-----------------------------------------------------
Gary Lupyan - lup...@wisc.edu
Assistant Professor of Psychology
University of Wisconsin, Madison
http://sapir.psych.wisc.edu
-----------------------------------------------------
On 09/01/2012 16:21, Gary Lupyan wrote:
> I am guessing that this is the very problem addressed in ver 1.72:
> "FIXED: buglet with flushing mouse events (thanks Sebastiaan Mathot)"
>
> Jon, how come 1.72 is still not in the official release?
Because while testing I added new features and ended up planning just to
go to v1.73 ;-)
I've just uploaded some test files for that, which will be a full binary
version including the beginnings of a new lib for support of further
hardware from CRS (currently the ColorCAL mkII). And a
psychopy.hardware.joystick submodule
I've just uploaded 1.73.00 for windows, mac version on its way. Have a
go and see if that fixes the problem. I think it's all working fine, but
be wary
Jon
--
Jonathan Peirce
Nottingham Visual Neuroscience
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
I take this thread to ask a pretty basic question for which I don't like to create its own thread: What is the time that is saved in time in: buttons, time = mouse.getPressed(getTime=True) ? I don't understand relative to *what* this time is measured and in which unit.