psychopy

Fail to play sequence of MP4 videos across trials

此生再无相见时 提交于 2021-01-29 03:01:41
问题 I have 10 trials and two conditions (randomized across the trials) that consist of playing either an optic flow mp4 movie or a random flow mp4 movie. To load and play the mp4 I used visual.MovieStim3 nBlocks = 4 nTrials = 10 nb_conditions = np.arange(1,3) # We have two conditions : condition 1 is Optic flow and condition 2 is Random flow conditions = nb_conditions.repeat(nTrials/2) # 5 times condition1 and 5 times condition2 conditions_rand = np.random.permutation(nb_conditions) # Randomize

Can't install Psychopy module on python 3 (MAC)

你离开我真会死。 提交于 2021-01-28 08:06:44
问题 I’m trying to install psychopy on Python 3 on a Mac but I get an error: pip3 install psychopy Collecting psychopy Using cached PsychoPy-1.84.2.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File “”, line 1, in File “/private/var/folders/39/88clnp910zlg54lrgy0d7qm40000gn/T/pip-build-ddca2hwz/psychopy/setup.py”, line 28, in exec(vStr) File “”, line 42, in File “/private/var/folders/39/88clnp910zlg54lrgy0d7qm40000gn/T/pip-build-ddca2hwz/psychopy

Psychopy IO Gamepad

为君一笑 提交于 2020-05-17 06:32:06
问题 I am using Builder in standalone PsychoPy 1.80.07 in Windows. I'm trying to figure out how to create a Code Component to receive responses from a Logitech F310 Gamepad. Ideally, I would like to just use the triggers. I do not get any error code when I run the experiment (which is the Stroop keyboard IO demo with the IO keyboard code component code replaced with the below code). It seems to run fine, but it just shows the first trial and waits for a subject response as thought it isn't hearing

UnicodeDecodeError: 'utf8' codec can't decode byte 0xe4 in position 4: invalid continuation byte

删除回忆录丶 提交于 2020-01-07 03:39:06
问题 I actually have no Idea how to solve this, cause I never used Python before. I just can use Psychopy to generate a script in Python, but I dont find the mistake here. Would be great if you know the answer or you can give me a hint how to find one!: ###################### Running: D:\LTD_Liste1_lastrun.py ####################### pyo version 0.8.5 (uses single precision) Traceback (most recent call last): File "D:\LTD_Liste1_lastrun.py", line 77, in <module> Target = sound.Sound('A', secs=-1)

Psychopy chars spaces aren't equal in RTL language style

痴心易碎 提交于 2020-01-06 05:56:47
问题 I am using RTL language style in Psychopy 1.9 to display sentences in Hebrew. However, there are some randomly added spaces between characters. Please see the following presented output (Following by the way this word/phrase should look like): Image 1 - בגלל שנועם Image 2 - שהכדורגלן Please notice the fault added spaces Thanks! 来源: https://stackoverflow.com/questions/51947920/psychopy-chars-spaces-arent-equal-in-rtl-language-style

variable stimuli duration but two kinds of fixed ISI in PsychoPy

雨燕双飞 提交于 2020-01-06 03:54:26
问题 I'm totally new to PsychoPy and I'm working with Builder. I'm not familiar with Python coding at all. I have audio stimuli that have variable durations. In each trial, I want the second stimulus to start 500ms or 1500ms after the end of the first stimulus. Is there a way to do this in Builder? If I have to do it on Coder, what should I do? Thank you very much! 回答1: Absolutely. Think of 500ms and 1500ms as two different conditions that you loop over in addition. These two conditions are

Passing responses from one PsychoPy routine to another

谁都会走 提交于 2020-01-06 02:48:46
问题 I am trying to send the value of a response time (e.g. key_resp_2.rt) to a later routine. I am new to PsychoPy and am unsure how to do this. I have been unsuccessful searching Google for an answer... 回答1: A later routine can refer to previous variable by name in a Code component. i.e. in that code component, you could insert code like this, say to update a text stimulus depending on a previous reaction time: if key_resp_2.rt < 0.200: myTextStim.setText("Well done, quite fast.") But you would

pandas to_csv creates empty, unspecified file

偶尔善良 提交于 2019-12-23 21:24:54
问题 I am new to python and programming in general, so this is probably a stupid question. I am currently preparing a psychology experiment using PsychoPy v1.90.2 standalone, python 2.7, the coder version, based on both an existing script and a tutorial from a colleague. It works perfectly on my computer (Mac) and on a Windows 10 computer, but on a computer using Windows7, it does not save the output (i.e. the participant's responses) to a csv file. An empty file is created, without any file

Psychopy:Is it possible to display 2 words in different colors within the same frame?

被刻印的时光 ゝ 提交于 2019-12-13 00:04:11
问题 I want to display a sentence with words in different colors within the same frame . But all the code I've seen just change the color of the stimuli as a whole , not a part of it ... Here's my code for a try ,but it failed #!/usr/bin/env python2 # -*- coding: utf-8 -*- from psychopy import visual,core win = visual.Window([400,400]) sent=[u'先生',u'を呼んだ',u'学生が',u'教室に',u'入った。'] sent[0].color=[1,1,1] sent[1].color=[1.0,-1,-1] sentence=visual.TextStim(win,text=sent[0]+sent[1]) sentence.setAutoDraw