Presented in your experiment set the image to update 'every repeat' with Sitmulus names (stim1.jpg.) and around that create a loop for blocks Set up a loop called stimulus with a set of Trial Types determining Your different stimuli with the same names inside: To appear for a block/epoch and then randomly chosen 'place' stimuli toĪppear for another block (and maybe scrambled faces). If you really need completely different routines for your differentīlocks then this may not work and it's going to get very ugly veryġ) Consider an FFA/PPA localiser in fMRI. You can create a loop (of blocks) around a loop (of trials or stimuli)Īnd your block loop simply controls one (or more) variable, while the It's a good question Eric and, yes, I think it should be possibleĭepending critically on what differs between the blocks. I'm not a real Python programmer either but using the Builder view gives a very good insight into how to learn to write in it just well enough to get things done. Hope that helps (but bear in mind this is all just code typed into e-mail and I have no idea if it will actually work). # so that it also gets repeated for each loop. # Make sure that the subsequent code which runs each of the trials is also indented we are now loading a variable file name four times rather than a hard-coded one just once. TrialList=data.importTrialList(u'././././Users/michael/parameters.csv')) Trials=data.TrialHandler(nReps=5.0, method=u'random', extraInfo=expInfo, #set up handler to look after randomisation of trials etc # then find the lines that looks something like these: Random.shuffle(blockList) # reorder them each time create a list of four filenames containing your block information:īlockList = The only Python coding you'll need to do is replace that with a loop so that it runs multiple times, each time loading another (randomly ordered) file. It will have done all the mechanical aspects of creating the experiment for you (Jon has done a great job of this: the code is even nicely commented for you.) This is what we often do in our lab: use the Builder to do the 90% monkey work and then switch to the coder view to add the finer level of control that might be needed.įind the line where the csv file is loaded which contains your trial data for the block. What you could do is use the Builder to set up the study as if there was just one block. I don't use the Builder view much, but although it allows one to randomise the order of trials WITHIN a block, I can't find an obvious way of randomising the blocks themselves. One can do that within the Coder view of course, because you have full Python flexibility to do whatever you want.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |