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
-1
votes
1 answer

python/psychopy: for loop to split image names

I have a list of images and I want to split their names at the '=' symbol. e.g. from: 'set_one-C:\Users\Documents\stim\01=aa.png' to 'aa.png' I have tried to create a 'for loop' to run through each item in the list and split the names in turn.…
Steve
  • 327
  • 2
  • 3
  • 15
-1
votes
1 answer

ValueError: need more than 1 value to unpack psychopy: haven't touched the script since it was working yesterday and am suddenly getting this error

I recognize there are a decent amount of ValueError questions on here, but it seems none are specifically related to psychopy or my issue. I am coding an experiment from scratch on psychopy (no builder involved). Yesterday, my script was running…
boxcar44
  • 1
  • 3
-1
votes
1 answer

What python distribution should I download for PsychoPy so that I won't run into version errors?

It's been a painful weekend of learning how picky PsychoPy is...It only likes 32-bit Python above 2.5 and below 3, and many of the scripts have to be specific versions as well. That said, I am currently using the distribution provided here (Option…
-1
votes
1 answer

Can't access elements from an image array using python/psychopy/numpy

Using Python/Psychopy/numpy I have created an array containing 6 different sets of images. I am trying to display an image by accessing elements of the array. It is my understanding that [0][0] (I have also tried [0,0]) will access the first image…
Steve
  • 327
  • 2
  • 3
  • 15
-1
votes
1 answer

Error in Python with for loop being out of range

I am writing a program in PsychoPy (a software meant for psychology experiments using Python) and keep getting a 'list index out of range' error. The problem appears on the line that says "if already_used_values[a] == value:". The only possible…
-2
votes
2 answers

Is there a python code for tracking all keypresses (getting timeline for each keypress)?

I am using OpenSesame (which runs on Python) for creating an experiment. I need a code for getting a timeline for each keypress (1, 2, 3, 4, space). For example, key 1 pressed at 12223ms, key 3 at 15452ms, key 1 again at 19112ms. Here, I need to…
Adarsh
  • 3
  • 2
-2
votes
3 answers

Using python code to set stimuli to certain locations from excel conditions file

I am a final year undergraduate doing my dissertation. I am replicating Reagh's (2016) Mnemonic Similarity Task and am struggling with coding for the Spatial Task. What I want to achieve is all stimuli coded '5' in my excel file to appear on the…
-2
votes
1 answer

How can I code a moving circle according to gravitational acceleration?

New programmer here - Used PsychoPy to generate a circle moving across the screen. Super basic, but I want to simulate different realistic acceleration profiles. Basically I want one of the profiles to be the circle moving at the acceleration of…
-2
votes
1 answer

How to open my favorite editor from PsychoPy Builder

I'm using PsychoPy Builder. I'd like to write codes with vim. How should I open it from PsychoPy Builder? Sorry about my poor English.
hrsma2i
  • 4,045
  • 6
  • 15
  • 24
-2
votes
1 answer

psychopy website does not give a fix for output file doubeling data

Here is some of the code... Whenever I get an output file I get a doubling of data. #For each record in keypress, a line is created in the file keyPress = [] …
-4
votes
1 answer

Understanding the random function in Python coding

I would appreciate it if someone can help me understand the random function in Python? nLines=500 xys = random([nLines,2])*500-250 oris = random(nLines)*180 In the example here, the values of the oris will be between 0-180. (based on what the…
1 2 3
34
35