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

Coordinates of a target location within an ImageStim at the ‘click-point’ in Psychopy/python code

I am working on an experimental design and code for a psychopy/python course. I am very new to coding, so excuse any jargon mistakes. Design: Where's Waldo search experiment. Between-subjects, IDV: manipulates the size of the image to reduce visual…
1
vote
2 answers

Trying to get a loop to restart when using a shuffled array

Dear Stackoverflow fam, I wish to run some experiments whereby I import some parameters for a stimulus (random dot kinematogram) and I chose to do this by creating a CSV with said parameters (total of 8 parameters I wish to cycle through). I need to…
PillowTalk
  • 11
  • 2
1
vote
1 answer

How can I make a circular visual object with its area evenly divided among three or more colors?

Background: A little new to python and psychopy. I’m trying to build a function that would sort of functionally replicate a roulette wheel and I’ve essentially done so. This function will revolve a small circle around a large circle and pressing…
1
vote
2 answers

How to shuffle my array with no repetitions?

I'm trying to create an array of 256 stimuli that represents the frequency value to input into my sound stimuli. So far I have created an array of 4 numbers representing the 4 different frequency levels for my audio tones: #Pitch list - create an…
Evan Canny
  • 11
  • 1
1
vote
0 answers

pytest_postgresql example does not find file

I am currently trying to get pytest_postgresql running in my enviroment. so I copyed the Sample test out of github readme: def test_example_postgres(postgresql): """Check main postgresql fixture.""" cur = postgresql.cursor() …
1
vote
0 answers

Issue with core.quit() when using PsychoPy through Spyder

I am using Spyder (5.2.2; Python 3.9.10) to run PsychoPy (in a dedicated Conda environment) on my M1 MacBook (Monterey, 12.0.1), but I cannot exit experiments using core.quit(). The experiment works fine using the PsychoPy coder. For reference, my…
jc1100011
  • 11
  • 1
1
vote
0 answers

Replacing dots with symbols RDK

I was wondering if you can replace dots with another symbol in the Random Dot Kinematogram (RDK) component? https://www.psychopy.org/builder/components/dots.html#dots
JgIXG071
  • 11
  • 1
1
vote
1 answer

ExperimentHandler CSV output value separator environment dependant

(I'm not a pyschologist nor pysychopy export but helping one) We're developing an expirement using the Coder (not Builder). The output of an experiment is written out using the data.ExperimentHandler.addData(). When I run the application on my…
Conffusion
  • 4,335
  • 2
  • 16
  • 28
1
vote
1 answer

Two while loops on a countdown seem to be overlapping and running at the same time

I am using the psychopy code from this publication: "Using a variant of the optomotor response as a visual defect detection assay in zebrafish". The code is a series of while loops on a countdown. Each loop should run for 10 seconds. I want to add…
Chris
  • 150
  • 14
1
vote
2 answers

How to make sound read by PsychoPy

I'm trying to figuring the problem out I'm facing with PsychoPy. When I try to upload this file that actually is a .svp file I get this error: RuntimeError: Error opening 'audio_track.svp': File contains data in an unknown format. ##### Experiment…
12666727b9
  • 1,133
  • 1
  • 8
  • 22
1
vote
2 answers

Psychopy stack smashing detected

I am trying to execute the following basic psychopy (version 2021.2.3) code through the Python 3.6.13 console: import psychopy.visual as pv pv.Window() Which gives the following error. *** stack smashing detected ***: terminated Aborted…
Mitchell van Zuylen
  • 3,905
  • 4
  • 27
  • 64
1
vote
0 answers

Psychopy in python : having two answers once when the key is pressed and the second when is released

I need to modify a script in psychopy. The thing I need is the subject to press and hold a buttom in the keyboard, but I'd like to have two responses: one when he/her presses it (and the windows with text has to change), and the second when he/her…
1
vote
0 answers

Psychopy how to solve TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

OS (e.g. Win10): macOS 10.15.7 PsychoPy version (e.g. 1.84.x): 21.1.2 Standard Standalone? (y/n) y What are you trying to achieve?: I'm a beginner in programming so I'm using a builder to create the online experiment, Magnitude estimation of…
1
vote
1 answer

How can i emulate joystick input in psychopy

I am working on someone else's code. The code is written in python and it has dependency of Joystick. I want to emulate joystick with keyboard or mouse but i did not find any relevant help on the web here are some relevant code from…
Mihir Mehta
  • 13,743
  • 3
  • 64
  • 88
1
vote
1 answer

Python. Index through a list by random set size specified in another list

I want to loop through a list of words in different set sizes, and the order of the set size is specified in another list. I want to jump to the new word in the word list after each trial set. For example, I have stimuli_words =…
Tokaalmighty
  • 402
  • 4
  • 15