![]() (2) Reading from text file and populating a loop item table Or can OSWeb handle javascript containing for, do/while loops and some functions such as Math.floor, Math.random, and array manipulations? Is there a method to achieve my aim through coding that would work in OSWeb? Is that correct? (if it is, then I guess it rules a Javascript solution too). As for Javascript code, I understand that, within Open Sesame, it is restricted to defining and reading from variables. I understand that Python code could take care of randomization, but this would not be suitable to run the experiment online as OSWeb does not integrate python code objects, so I guess that rules out Python code. I thought of the following options and have doubts or questions related to each: I'm new to OpenSesame and OSWeb, and so far I haven't been able to work out how to achieve a similar result. So far I've done my experiments using E-Prime, using EBasic to write code, or when the quasi randomization is so complex that the program can get stuck without a solution, I've written an application capable of batching stimuli files that fulfill all the conditions, and then have the task import these, commit all information to variable arrays and then populate the trials list at the onset of the experiment. ![]() I use such quasi randomization to create a unique trials list order for each participant. One of these requirements is the generation of list of trials following sometimes demanding quasi randomization conditions (e.g., making sure that not more than two trials of such or such condition are presented consecutively, that such or such stimulus is not repeated on consecutive trials etc.). Remember to set the loop in Builder to be in a fixed order, not randomised, as the list itself has the randomisation built in.I'm currently exploring Open Sesame and OSWeb as a way of running experiments online, trying to work out whether it can handle the specific requirements my experiments typically have. ![]() Then just write the images list to a single column. # remove this combination so it can't be used again Images.append('face_' + currentFace + '_emotion_' + currentEmotion + '.jpg') # find another pair with the same selected attribute: # next 24 randomised but balanced choices: # need to create an initial selection before cycling though the # a list of whether to alternate between preserving face or emotion across trials:Īttributes = * 12 # length 24 # make a list of 25 dictionaries of unique face/emotion pairs:įor emotion in : you also need a list of pseudo-random choices to alternate between preserving either face or emotion from trial to trial: if you do this fully randomly, you'll get unbalanced, and exhaust one of the attributes before the other. You'll need to create three lists, not two, i.e. You'd just insert a code component with some code to run at the beginning of the experiment that customises a conditions file. That way you could do everything in PsychoPy, and in this case there would be no need to abandon Builder. But it could also very easily be implemented in Python code. That would work fine, as this stuff can be done before PsychoPy even launches. The standard answer to this is what you allude to in your comment above: in code, shuffle the conditions file at the beginning of each experiment, so each subject is in essence having their trials driven by a unique conditions file. Although the order of rows can be randomised across subjects, the pairings of values across columns remains constant. This is difficult to implement in Builder's normal mode of operation, which is to drive trials from a fixed list of conditions.
0 Comments
Leave a Reply. |