Script for dot probe

775 views
Skip to first unread message

grego...@hotmail.co.uk

unread,
Feb 5, 2013, 8:41:47 AM2/5/13
to psychop...@googlegroups.com
Hi all,
Completely new to python. I was recommended to come on here to ask as to whether anyone had a template or could help me get starting building a dot-probe task.
I am trying to put together a dot probe task, with each trial containing two images next to one another, followed by a delay and then by a probe in either location. I was just wondering whether you know of any sample scripts to set the ball rolling on making the test as I am currently having some difficulties.


Any help would be greatly appreciated.

Thanks.
Greg.

Jared Roberts

unread,
Feb 5, 2013, 11:26:13 AM2/5/13
to psychop...@googlegroups.com
Hi Greg,

I've put together a quick script to do a series of forced choice trials.  It should be a good starting point.  Check the psychopy for documentation for information on how to add stuff like a fixation dot. 

Here's the script: http://pastebin.com/0Xmvg7iM

Let me know if you have any specific questions.

-Jared

--
Jared Roberts
"A lost cause can be as spiritually satisfying as a victory." - Robert Heinlein

grego...@hotmail.co.uk

unread,
Feb 7, 2013, 8:29:11 AM2/7/13
to psychop...@googlegroups.com
Hi Jared,
Cheers for that.
It's not running on the university computers, is this because of the graphics available, it comes up with :
 
"raise ValueError("Monitor %s has no known size in pixels (SEE MONITOR CENTER)" %monitor.name)
ValueError: Monitor Default has no known size in pixels (SEE MONITOR CENTER)"
 
 
I'm completely new to this so I apologise if i'm frustrating haha!
Thanks for your help.
 
Greg.

Jared Roberts

unread,
Feb 7, 2013, 6:48:38 PM2/7/13
to psychop...@googlegroups.com
Hi Greg,

In that particular script, I am using a feature of PsychoPy that allows you to give it measurements in centimeters rather than in pixels.  In order to do that, you need to go into the monitor center (the icon at the top with two monitors) and create monitor profile that contains information about the physical size and the resolution of of your monitor.   I call my configuration "Default", so you'll either have to call yours "Default" as well, or you'll have to change the code in the script to reflect whatever you call yours.

Otherwise, you can replace the code under the #Setup Screens comment with this:
window = visual.Window(fullscr=True)
#Create the image object. Tell it to use our window object.
CenterImage = visual.ImageStim(window)
LeftImage = visual.ImageStim(window)
LeftImage.setPos((-600,0))
RightImage = visual.ImageStim(window)
RightImage.setPos((600,0))

You'll need to play around with the values sent to the setPos function to get it to fit on your screen where you want it.  I really recommend just setting up your monitor in the monitor center though.  It makes it really easy to move the experiment to another computer and know that your measurements are accurate.


-Jared

--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/psychopy-users/-/THVMkFQvJyMJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Jared Roberts
US2003071783
Reply all
Reply to author
Forward
0 new messages