Post by regina on Nov 20, 2020 19:32:25 GMT
Hi,
I am programming an Affective Misattribution Task, which is similar to a sequential priming task. I want use the array function to independently create two random arrays. One array determines which prime is shown on which trial, the other array determines which target is shown on which trial.
Here is the code:
bitmaps
F01 #1 prime
F02 #2 prime
F03 #3 prime
F04 #4 prime
M01 #5 prime
M02 #6 prime
M03 #7 prime
M04 #8 prime
Z01 #9 target
Z02 #10 target
Z03 #11 target
Z04 #12 target
fixpoint
blank
mask
task set_order
set &&prime_order range 1 8
set &&target_order range 9 12
# set &&prime_order shuffle
# set &&target_order shuffle
# I deactivated the shuffle function to test whether inclusion of the shuffle function creates the problem
F01 #1 prime
F02 #2 prime
F03 #3 prime
F04 #4 prime
M01 #5 prime
M02 #6 prime
M03 #7 prime
M04 #8 prime
Z01 #9 target
Z02 #10 target
Z03 #11 target
Z04 #12 target
fixpoint
blank
mask
task set_order
set &&prime_order range 1 8
set &&target_order range 9 12
# set &&prime_order shuffle
# set &&target_order shuffle
# I deactivated the shuffle function to test whether inclusion of the shuffle function creates the problem
task AMP_test
keys d k
show bitmap fixpoint
delay 500
clear 1
set $prime &&prime_order remove first
show bitmap $prime
delay 200
clear 2
show bitmap blank
delay 50
clear 3
set $target &&target_order remove first
show bitmap $target
delay 150
clear 4
show bitmap mask
readkey 2 10000
clear 5
delay 500
save BLOCKNAME TRIALCOUNT $prime $target RT STATUS
block AMP_test
tasklist
set_order 1
AMP_test 8
end
keys d k
show bitmap fixpoint
delay 500
clear 1
set $prime &&prime_order remove first
show bitmap $prime
delay 200
clear 2
show bitmap blank
delay 50
clear 3
set $target &&target_order remove first
show bitmap $target
delay 150
clear 4
show bitmap mask
readkey 2 10000
clear 5
delay 500
save BLOCKNAME TRIALCOUNT $prime $target RT STATUS
block AMP_test
tasklist
set_order 1
AMP_test 8
end
With the shuffle function deactivated, the experiment occasionally runs almost correctly. By "occasionally", I mean in about 1 of 20 runs. I am saying "almost", because it runs only 4 instead of 8 trials, and the trialcount starts with 2 instead of 1.
Here is the data from such an "almost successful" run:
AMP_test 2 1 9 4060 1
AMP_test 3 2 10 1018 1
AMP_test 4 3 11 558 1
AMP_test 5 4 12 610 1
AMP_test 3 2 10 1018 1
AMP_test 4 3 11 558 1
AMP_test 5 4 12 610 1
In about 19 of 20 runs, a fixaction cross is presented, followed by a blank screen. Then, nothing happens. Primes and targets are not presented. Key presses do not work.
The same happened with the shuffle function activated. But maybe I did not try often enough...
I have not idea what produces the random error. Any help is greatly appreciated.
Thank you
Regina