![]() Is it possible in another way?įurther information: I used PsychoPy Version 2021.1.2 (Builder) for programming. I couldn’t figure out how to make it work online without these packages but with this conditional order. I want to ask - is it possible to do order my stimuli in this specific order - the same color of words should not repeat one after another ImRight visual.ImageStim(win, imagepath1,pos (250, 0.0), size (350)) Also, make sure you use the identifier name of the object (without quotes) for the keyword argument image. I know that packages from python do not work in pavlovia. Then, you use the paths instead of the filenames when calling the psychopy function visual.ImageStim (). I had tried to debug it and see how it works in dev tool and in js script and I saw syntax errors when packages such as numpy append in script. I see window with “Intilazing experiment” and then it freez. I have a problem with pushing experiments in pavlovia. Pd.DataFrame(shuffle).to_excel("after_shuffle.xlsx", index=False) NewElement = random.choice(list(remaining)) Remaining = pd.DataFrame.to_dict(remaining.T) Remaining = for x in choices if choices != last ] Here is the code from begin experiment to shuffle:Ĭhoices = pd.DataFrame.to_dict(choices.T) In my local computer I use code component to shuffle rows in excel file and it work: I am trying to push in a pavlovia stroop task with a specific kind of order stimuli - color of words should not be in the same color one after the other. constants import ( NOTSTARTED, STARTED, PLAYING, PAUSED, STOPPED, FINISHED, PRESSED, RELEASED, FOREVER) import numpy as np whole numpy lib is available, prepend np. So far I have tried to replace the random.shuffle function with the random.choice function, but I'm not sure if I'm going in the wrong direction.Running experiments online in pavlovia is new to me and I have only basic knowledge about coding in python. from psychopy import localesetup, sound, gui, visual, core, data, event, logging from psychopy. PsychoPy is a free cross-platform package allowing you to run a wide range of experiments in the behavioral sciences (neuroscience, psychology, psychophysics, linguistics.) This is a community project. I understand that I may need to change the way I use the random.shuffle function, however, I'm not sure if I also need to change my for loop as well to make this work. I need to do this so the frequency of the audio tones isn't the same for consecutive audio tones. However, my problem is that I need to create the new_pitch_list so there are no repetitions of 2 numbers. Rather than using np.random.choice () to randomly pick stimuli, we can instead shuffle () the list and select the first/last item from it as our stimulus. My code works for randomly producing an array of 256 numbers of which there are 4 possibilities (500, 625, 750, 875). Contents: ExperimentHandler - to combine multiple loops in one study. #Replace 1-4 integers in new_pitch_list with frequency values psychopy.data - functions for storing/saving/analysing data¶. New_pitch_list = np.repeat(pitch_list,64) So far I have created an array of 4 numbers representing the 4 different frequency levels for my audio tones: #Pitch list - create an array from 1 to 4 repeated for 256 stimuli I'm trying to create an array of 256 stimuli that represents the frequency value to input into my sound stimuli.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |