Questions tagged [psychopy]

PsychoPy is an open-source python module written in python and c libraries for the generation of experiments for neuroscience and experimental psychology. PsychoPy includes Builder and Coder - two graphical interfaces to build experiments using the psychopy python module.

PsychoPy is an open-source Python module written in Python and C libraries for the generation of experiments for neuroscience and experimental psychology. PsychoPy includes Builder and Coder - two graphical interfaces to build experiments using the PsychoPy Python module.

Links:

See the project website for documentation and more information about PsychoPy.

All support now takes place in the psychopy forum

See Github for psychopy's source code. Contributions are very welcome!

521 questions
0
votes
1 answer

How to make 1 of 2 stimuli disappear after 1 is replaced?

I am using the Builder view to create a Dot-Probe Task. My task starts with a fixation cross, followed by two words being presented. After 500ms, 1 of the words is replaced by a probe (3mm dot). I created the dot with the "Image" component. My…
0
votes
3 answers

Randomizing in all possible combinations in Python

Here is my code: if condition == '1': a = glob.glob("DDtest/targetimagelist1/*") b = glob.glob("DDtest/distractorimagelist1/*") c = glob.glob("DDtest/targetimagelist2/*") d = glob.glob("DDtest/distractorimagelist3/*") e =…
y3trgfhsfgr
  • 467
  • 8
  • 17
0
votes
1 answer

multiple contingencies in python

Here is my code (though incomplete): for k in range(len(ace)): recognitionstim.image = ace[k] old.draw() new.draw() if ace[k] in ac: recog = 'old' else: recog = 'new' win.flip() trialClock.reset() …
y3trgfhsfgr
  • 467
  • 8
  • 17
0
votes
0 answers

Read buttons from joystick with pygame

I'm new to PsychoPy and am testing a few tasks. As a response mechanism I use the buttons on a joystick (logitech G27). I import pygame, and can detect button presses in (the Sternberg example of) PsychoPy, so that's okay. However, after a…
0
votes
1 answer

Fatal Python error: (pygame parachute) Bus Error

Here is my code: from psychopy import visual, event, gui, data, core import random, os from random import shuffle from PIL import Image import glob a = glob.glob("DDtest/targetimagelist1/*") b = glob.glob("DDtest/distractorimagelist1/*") c =…
y3trgfhsfgr
  • 467
  • 8
  • 17
0
votes
1 answer

Modify the length of a sequence based on two list lengths

here is my code: from psychopy import visual, event, gui import random, os from random import shuffle from PIL import Image import glob # import images sequences and randomize in the same order a = glob.glob("DDtest/targetimagelist1/*") b =…
y3trgfhsfgr
  • 467
  • 8
  • 17
0
votes
0 answers

image randomization in Psychopy

I am trying to make an experiment in Psychopy where I will project an image on the screen and will ask for a response from the tester. I would like for the images to come up randomly in a loop but after the tester has selected a response to the…
Dominic
  • 1
  • 1
0
votes
1 answer

Psychopy: how to reference value in conditions file for feedback

I'm sure this is deadly simple, but I'm new to Psychopy and Python, so here goes: I have a conditions file similar to the following (in builder): text correctAns trialType text1 Ans1 TrialA text2 Ans2 TrialB When giving…
Devin
  • 3
  • 3
0
votes
1 answer

ValueError: Unrecognized Mode

Here is my code: import Image img = Image.new("RBG",(649,489),(0,0,255)) for x in xrange(649): for y in xrange(489): img.putpixel((x,y),(0,255,0)) img.show() When I try to run this code I get a "ValueError: unrecognized mode", does…
y3trgfhsfgr
  • 467
  • 8
  • 17
0
votes
1 answer

Is there any way I can enlarge a stimulus in #psychopy without losing image quiality?

I'm importing my stimulus from a folder. I would like to make them bigger *the actual image size is 120 pix (height) x 170 pix (width). I've tried to double the size by using this code in the PsychoPy Coder: stimuli.append(visual.ImageStim(win=win,…
0
votes
1 answer

How can I speed up presentation of stimuli that use multiple simultaneous windows?

We are trying to recreate a 3x3 grid of simultaneous windows in PsychoPy, each displaying a radial optic flow pattern, as described by Cardin and Smith (2010). When we run the code the stimuli is too slow (taking a while to load). How can this be…
0
votes
0 answers

Psychopy GetKeys trouble

I've been battling this issue for several hours and my attempts to find a solution online have come up blank. Hopefully someone here has some insight. In the course of an experiment, participants see a series of stimuli followed by masks with no…
Ben
  • 29
  • 1
  • 3
0
votes
1 answer

PsychoPy Coder: define image duration based on frames

I have some experience in Matlab, but am very new to PsychoPy. For now I would like to continuously switch between two images until there is a keyboard response. Each image should stay on the screen exactly for 100ms, and I want to be able to verify…
0
votes
0 answers

Staircase frequency differences of sine wave sounds - auditory adaptive oddball paradigm

I try to create an auditory oddball experiment using PsychoPy. The standard sound should be a sine wave sound (440 HZ), the odds should be sounds at different frequencies. If the odd was detected, the difference between the odd and the standard…
Johannes
  • 11
  • 2
0
votes
1 answer

Recording all key presses, as well as waiting on keys, in PsychoPy?

I am using PsychoPy for an experiment. I have a simple experiment, where the screen changes every time a certain key is pressed. This is simple, and I have used event.waitKeys() for this. However, I would like a 'background' process (not sure of the…
user1566200
  • 1,826
  • 4
  • 27
  • 47