#sets the words to be presented per sessionĮrrormessage = 'Incorrect session! Try 001 or 002. loops are when you want something to repeat a known number of times, whereas while loops will run for an unspecified duration until some condition is met. #define words to be presented per session I found out even though I selected loopType as random, the images are still displayed in repeats across blocks and between events. Oooooooh sorry I had no idea how to do it! & Where would I find my experiment info dialogue? This is what I have in relation to expinfo: if expInfo = '001':Įrrormessage = 'Incorrect session! Try 001 or 002.' Please use ``` before and after all code, or indent individual code lines with four spaces. Probably easiest to also enter the session number in the exp. Present the first half in session 1, and the second half in session 2. So similarly, if you have an experiment info dialog field called ‘seed’, you could do: np.ed(expInfo) this is what all Builder scripts make available: import numpy as np # whole numpy lib is available, prepend 'np.'įrom numpy.random import random, randint, normal, shuffle, choice as randchoice That way, the seed you set will apply to all relevant PsychoPy functions as well.Į.g. NB don’t use the random package from Python’s standard library. In the first session, use the first 20 stimuli, and in the second, use the second lot of 20. Then the randomisation will be the same across the two sessions for that subject. in the information dialog at the start of the experiment, enter a seed value which is unique for each subject. Here, imagine that rather than having 3 items in the bag that we sample from, and. c, a, b, a, c, b Full Random - present a - b in a random order but also take into account the number of nReps. (Begin Experiment in the experiment loop)Īlternatively, instead of setting a random seed (which isn’t necessary, as there will be a new seed each time unless you set it otherwise), create a fixed one for each subject. We could then use the following Loop Types: Random - present a - b in a random order, because we have nReps at 2, this would be repeated twice e.g. Random - present a - b in a random order, because we have nReps at 2, this would be repeated twice e.g. #read the stimuli from sheet (all columns) What did you try to make it work?: import random, xlrd I have it coded and everything but it repeats some stimuli which I do not want.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |