SART loop and lists
Hi all,
I'm working on a Sustained Attention Response Task (SART), with some constrains. Here the structure I would like to follow (from Strawarczyk's works):
5 blocks that difere on the number of stimuli. Each block will be randomly repeated 2 times.
In each block, the target (here the number 3) appears in 11% of the total number of stimuli. The other 89% are non-target numbers (1,2,4,5,6,7,8,9). Target number can't be in the first position and numbers can't appear in successive positions (1,2,4,4,7).
(There is some other constrins that I did not implement for now...one step at a time :) )
For now, I built the general structure of the experiment and wrote a script that built a list of numbers following these constrains. As the list will change for each block, I set the script before the block loop.
As I'm a newbie in both opensesame and python, I'm not sure it's the right way to do it. However, I tested it in IDLE and the script building the lists works fine.
My problem is that I can't figure out how to present sequentially each number from the built list in a trial sequence. I thought doing something like 'for each number of the list, pick up the first one, use it in the trial sequence and then, pick up the second and so on...'. I did not succeed :/
In fact, the list is built but the first number displayed is not the first one of the list (I guess that it's a problem in my way to pick up and display the numbers from the list) and the trial sequence seems terminated after one presentation (I guess that it's a problem in my loop setting).
Any help will be appreciated :)
Comments
Hi,
My problem is that I can't figure out how to present sequentially each number from the built list in a trial sequence.
If you have a trial sequence (Opensesames loop/sequence structure), you need a variable that counts iterations, e.g. trial number. This variable you can then use to index the number list you generated.
Does that help? If not, could you provide more details on the thing you want, and the things that doesnt work?
Thanks,
Eduard
Hi eduard,
If you have a trial sequence (Opensesames loop/sequence structure), you need a variable that counts iterations, e.g. trial number. This variable you can then use to index the number list you generated.
You're totally right! I previously used a counter variable in a previous opensesame experiment. However, I can't manage to set a counter variable for the stimuli from the list.
My experiment is as follow:
experimental_loop
should set the number of numbers to display (5 blocks that should be randomly used 2 times).I set a script that built a stimulus list in the prepare section of the
create_stimulus_list
script (it seems to work well outside opensesame).There is a trial sequence (
trial_coroutines
) that should display sequentially the numbers from the list of stimuli.Now, I'm stuck in the way to pick up the numbers and display them one after another. I tried to set a variable stocking the numbers in an iterative way but I lamentably failed :/
Thanks,
Alex
Hi Alex,
Could you try to use "count_stimulus_presentation" as counter variable? Alternatively, you can also add a variable to your block loop table.
Eduard
Hi eduard,
I think I found the tip.
I set a
counter_trial
variable before the block_loop and update it in thetrial_coroutines
.I also set a
number_to_display
variable in thetrial_coroutines
sequence that get the number in thenumber_list
variable following the counter_trial that serves as the index for thenumber_list
.Finally, I set the
block_loop
repeat to thenumber_of_stimuli
value from theexperimental_loop
.I must beta-test it but all numbers of the created
number_list
are now displayed sequentially for each block.Could you try to use "count_stimulus_presentation" as counter variable?
I tried something like this by using count_trial_coroutines. However, I could not reset the variable.
Actually, it counts the trial_coroutines through all block. Thus, in the second block, the first number displayed was the
index_in_the_stimulus_list_of_the_second_block = number_of_stimuli_from_the_first_block
Makes sense. Good to hear!