![]() ![]() There’s no easy way of doing this in the builder. In an experiment lasting 10 minutes one might have 40 15-second blocks, and the only way to produce the (psuedo-random) sequence you want is with 40 separate elements in the flow panel that all executed one-by-one (with no loops). have a sequence which goes ABCBCACAB…etc.). The problem arises when there are more than two block-types in your experiment, and you want to randomise them (i.e. For a simple two-condition-alternating experiment one could just produce routines for two conditions, and throw a loop around them for as many repeats as needed. They might be a ‘rest’ block (no stimuli) alternated with a visual stimulus, or two different kinds of stimuli, say, household objects vs. This is a slight issue for programming fMRI experiments that use block-designs. In block-design experiments, typically two (or more) blocks of about 15-20 seconds are alternated. This is an extremely powerful interface, but there’s no option to ‘skip’ part of the flow diagram – everything is run in the order in which it appears from left-to-right. The loops around parts of the flow panel indicate that the bits inside the loops are run multiple times (i.e. The experiment proceeds from left to right, and each part of the flow panel is executed in turn. One common use of conditional branching in psychology experiments is to repeat trials that the subject got incorrect for instance, one might want one’s subjects to achieve 90% correct on a block of trials before they continue to the next one, so the program would have something in it which said ‘if (correct trials > 90%) then continue to the next block, else if (correct trials < 90%) repeat the incorrect trials’.Īt the bottom of the PsychoPy builder is a time-line graphic (the ‘flow panel’) which shows the parts of the experiment: Essentially the program says, ‘if A is true: do X, otherwise (or ‘else’ in programming jargon) if B is true do Y’. ![]() which branch to follow) based on some value or ‘condition’. A ‘conditional branch’ is where the computer decides what to do out of two of more alternatives (i.e. In programming logic, a ‘branch’ is a point in a program which causes the computer to start executing a different set of instructions. The PsychoPy ‘builder’ interface (a generally brilliant, friendly, GUI front-end) does have one pretty substantial drawback though it doesn’t support conditional branching. I’ve been using it a lot recently, and I’m happy to report my initial ardour for it is still lambently undimmed. Regular readers will know that I’m a big fan of PsychoPy, which (for non-regular readers *tsk*) is a piece of free, open-source software for designing and programming experiments, built on the Python language. ![]()
0 Comments
Leave a Reply. |