Post by mjb on May 26, 2020 2:24:12 GMT
Hi there
I am new to PsyToolKits and I am hoping someone can assist me in reviewing my code in a Flanker Task experiment design.
The issue is that after the initial screen of "Click Here" the experiment then fails.
Any assistance would be most appreciated.
Code is as follows:
options
bitmapdir TestStimuli
bitmaps
F1NBAB
F1NBDB
F1NBHB
F1NBH2
F1CAAA
F1CDDD
F1CHHH
F1CHH2
F1IHAH
F1IHDH
F1IAHA
F1IDHD
F2NBAB
F2NBDB
F2NBHB
F2NBH2
F2CAAA
F2CDDD
F2CHHH
F2CHH2
F2IHAH
F2IHDH
F2IAHA
F2IDHD
M1NBAB
M1NBDB
M1NBHB
M1NBH2
M1CAAA
M1CDDD
M1CHHH
M1CHH2
M1IHAH
M1IHDH
M1IAHA
M1IDHD
M2NBAB
M2NBDB
M2NBHB
M2NBH2
M2CAAA
M2CDDD
M2CHHH
M2CHH2
M2IHAH
M2IHDH
M2IAHA
M2IDHD
fix
fixgreen
fixred
Intro1
Intro2
Intro3
Intro4
Intro5
Intro6
Intro7
Intro8
fonts
Small arial 18
Medium arial 26
Large arial 40
table FEMALE1TABLE
include FEMALE1TABLE.txt
table FEMALE2TABLE
include FEMALE2TABLE.txt
table FEMALEPTABLE
include FEMALEPTABLE.txt
table MALE1TABLE
include MALE1TABLE.txt
table MALE2TABLE
include MALE2TABLE.txt
table MALEPTABLE
include MALEPTABLE.txt
# one line of the table consists of the following information
# column 1 : card
# column 2 : CONDITION N-CONTROL C-CONGRUENT I-INCONGRUENT
# column 3 : answer 1 is A (HAPPY) and 2 is L (NEGATIVE)
task EflankerpracticeMALE
table MALEPTABLE
keys a l
draw off
set $x random 600 1000 50
delay $x
show bitmap fix 0 0
delay 500
clear 1
show bitmap @1 0 0
draw on
readkey @3 300
clear 2
set $tmp_rt RT
set $tmp_status STATUS
set $total_rt RT
if STATUS == TIMEOUT
readkey @3 1000
clear -1
set $total_rt expression RT + $tmp_rt
fi
if STATUS == CORRECT
clear 1
show bitmap fixgreen 0 0
delay 300
clear 3
delay 300
show bitmap fixgreen 0 0
delay 300
clear 4
fi
if STATUS != CORRECT
clear 1
show bitmap fixred 0 0
delay 300
clear 3
delay 300
show bitmap fixred 0 0
delay 300
clear 4
fi
delay 300
save @1 @2 STATUS $total_rt $tmp_rt $tmp_status RT @3
task EflankerpracticeFEMALE
table FEMALEPTABLE
keys a l
draw off
set $x random 600 1000 50
delay $x
show bitmap fix 0 0
delay 500
clear 1
show bitmap @1 0 0
draw on
readkey @3 300
clear 2
set $tmp_rt RT
set $tmp_status STATUS
set $total_rt RT
if STATUS == TIMEOUT
readkey @3 1000
clear -1
set $total_rt expression RT + $tmp_rt
fi
if STATUS == CORRECT
clear 1
show bitmap fixgreen 0 0
delay 300
clear 3
delay 300
show bitmap fixgreen 0 0
delay 300
clear 4
fi
if STATUS != CORRECT
clear 1
show bitmap fixred 0 0
delay 300
clear 3
delay 300
show bitmap fixred 0 0
delay 300
clear 4
fi
delay 300
save @1 @2 STATUS $total_rt $tmp_rt $tmp_status RT @3
task EflankerMALE1
table MALE1TABLE
keys a l
draw off
set $x random 600 1000 50
delay $x
show bitmap fix 0 0
delay 500
clear 1
show bitmap @1 0 0
draw on
readkey @3 300
clear 2
set $tmp_rt RT
set $tmp_status STATUS
set $total_rt RT
if STATUS == TIMEOUT
readkey @3 1000
clear -1
set $total_rt expression RT + $tmp_rt
fi
if STATUS == CORRECT
clear 1
fi
if STATUS != CORRECT
clear 1
fi
delay 500
save @1 @2 STATUS $total_rt $tmp_rt $tmp_status RT @3
task EflankerMALE2
table MALE2TABLE
keys a l
draw off
set $x random 600 1000 50
delay $x
show bitmap fix 0 0
delay 500
clear 1
show bitmap @1 0 0
draw on
readkey @3 300
clear 2
set $tmp_rt RT
set $tmp_status STATUS
set $total_rt RT
if STATUS == TIMEOUT
readkey @3 1000
clear -1
set $total_rt expression RT + $tmp_rt
fi
if STATUS == CORRECT
clear 1
fi
if STATUS != CORRECT
clear 1
fi
delay 500
save @1 @2 STATUS $total_rt $tmp_rt $tmp_status RT @3
task EflankerFEMALE1
table FEMALE1TABLE
keys a l
draw off
set $x random 600 1000 50
delay $x
show bitmap fix 0 0
delay 500
clear 1
show bitmap @1 0 0
draw on
readkey @3 300
clear 2
set $tmp_rt RT
set $tmp_status STATUS
set $total_rt RT
if STATUS == TIMEOUT
readkey @3 1000
clear -1
set $total_rt expression RT + $tmp_rt
fi
if STATUS == CORRECT
clear 1
fi
if STATUS != CORRECT
clear 1
fi
delay 500
save @1 @2 STATUS $total_rt $tmp_rt $tmp_status RT @3
task EflankerFEMALE2
table FEMALE2TABLE
keys a l
draw off
set $x random 600 1000 50
delay $x
show bitmap fix 0 0
delay 500
clear 1
show bitmap @1 0 0
draw on
readkey @3 300
clear 2
set $tmp_rt RT
set $tmp_status STATUS
set $total_rt RT
if STATUS == TIMEOUT
readkey @3 1000
clear -1
set $total_rt expression RT + $tmp_rt
fi
if STATUS == CORRECT
clear 1
fi
if STATUS != CORRECT
clear 1
fi
delay 500
save @1 @2 STATUS $total_rt $tmp_rt $tmp_status RT @3
task PracticeComplete
font Medium
show text "Practice complete" 0 -200
delay 2000
show text "When the real task begins" 0 -150
delay 2000
show text "You will not receive feedback" 0 -100
delay 2000
show text "Task real will begin in:" 0 0
delay 2000
font Large
show text "10" 0 50
delay 1000
clear 5
show text "9" 0 50
delay 1000
clear 6
show text "8" 0 50
delay 1000
clear 7
show text "7" 0 50
delay 1000
clear 8
show text "6" 0 50
delay 1000
clear 9
show text "5" 0 50
delay 1000
clear 10
show text "4" 0 50
delay 1000
clear 11
show text "3" 0 50
delay 1000
clear 12
show text "2" 0 50
delay 1000
clear 13
show text "1" 0 50
delay 1000
clear 14
message Intro1
message Intro2
message Intro3
message Intro4
message Intro5
message Intro6
message Intro7
message Intro8
block EflankerpracticeMALE
tasklist
EflankerpracticeMALE 12 all_before_repeat
end
block EflankerpracticeFEMALE
tasklist
EflankerpracticeFEMALE 12 all_before_repeat
end
block PracticeComplete
tasklist
PracticeComplete 1
end
block EflankerMALE1
tasklist
EflankerMALE1 48 all_before_repeat
end
block EflankerFEMALE1
tasklist
EflankerFEMALE1 48 all_before_repeat
end
block EflankerMALE2
tasklist
EflankerMALE2 48 all_before_repeat
end
block EflankerFEMALE2
tasklist
EflankerFEMALE2 48 all_before_repeat
end
feedback
text align left
text color yellow
text -200 200 "Press space bar to continue"
end
I am new to PsyToolKits and I am hoping someone can assist me in reviewing my code in a Flanker Task experiment design.
The issue is that after the initial screen of "Click Here" the experiment then fails.
Any assistance would be most appreciated.
Code is as follows:
options
bitmapdir TestStimuli
bitmaps
F1NBAB
F1NBDB
F1NBHB
F1NBH2
F1CAAA
F1CDDD
F1CHHH
F1CHH2
F1IHAH
F1IHDH
F1IAHA
F1IDHD
F2NBAB
F2NBDB
F2NBHB
F2NBH2
F2CAAA
F2CDDD
F2CHHH
F2CHH2
F2IHAH
F2IHDH
F2IAHA
F2IDHD
M1NBAB
M1NBDB
M1NBHB
M1NBH2
M1CAAA
M1CDDD
M1CHHH
M1CHH2
M1IHAH
M1IHDH
M1IAHA
M1IDHD
M2NBAB
M2NBDB
M2NBHB
M2NBH2
M2CAAA
M2CDDD
M2CHHH
M2CHH2
M2IHAH
M2IHDH
M2IAHA
M2IDHD
fix
fixgreen
fixred
Intro1
Intro2
Intro3
Intro4
Intro5
Intro6
Intro7
Intro8
fonts
Small arial 18
Medium arial 26
Large arial 40
table FEMALE1TABLE
include FEMALE1TABLE.txt
table FEMALE2TABLE
include FEMALE2TABLE.txt
table FEMALEPTABLE
include FEMALEPTABLE.txt
table MALE1TABLE
include MALE1TABLE.txt
table MALE2TABLE
include MALE2TABLE.txt
table MALEPTABLE
include MALEPTABLE.txt
# one line of the table consists of the following information
# column 1 : card
# column 2 : CONDITION N-CONTROL C-CONGRUENT I-INCONGRUENT
# column 3 : answer 1 is A (HAPPY) and 2 is L (NEGATIVE)
task EflankerpracticeMALE
table MALEPTABLE
keys a l
draw off
set $x random 600 1000 50
delay $x
show bitmap fix 0 0
delay 500
clear 1
show bitmap @1 0 0
draw on
readkey @3 300
clear 2
set $tmp_rt RT
set $tmp_status STATUS
set $total_rt RT
if STATUS == TIMEOUT
readkey @3 1000
clear -1
set $total_rt expression RT + $tmp_rt
fi
if STATUS == CORRECT
clear 1
show bitmap fixgreen 0 0
delay 300
clear 3
delay 300
show bitmap fixgreen 0 0
delay 300
clear 4
fi
if STATUS != CORRECT
clear 1
show bitmap fixred 0 0
delay 300
clear 3
delay 300
show bitmap fixred 0 0
delay 300
clear 4
fi
delay 300
save @1 @2 STATUS $total_rt $tmp_rt $tmp_status RT @3
task EflankerpracticeFEMALE
table FEMALEPTABLE
keys a l
draw off
set $x random 600 1000 50
delay $x
show bitmap fix 0 0
delay 500
clear 1
show bitmap @1 0 0
draw on
readkey @3 300
clear 2
set $tmp_rt RT
set $tmp_status STATUS
set $total_rt RT
if STATUS == TIMEOUT
readkey @3 1000
clear -1
set $total_rt expression RT + $tmp_rt
fi
if STATUS == CORRECT
clear 1
show bitmap fixgreen 0 0
delay 300
clear 3
delay 300
show bitmap fixgreen 0 0
delay 300
clear 4
fi
if STATUS != CORRECT
clear 1
show bitmap fixred 0 0
delay 300
clear 3
delay 300
show bitmap fixred 0 0
delay 300
clear 4
fi
delay 300
save @1 @2 STATUS $total_rt $tmp_rt $tmp_status RT @3
task EflankerMALE1
table MALE1TABLE
keys a l
draw off
set $x random 600 1000 50
delay $x
show bitmap fix 0 0
delay 500
clear 1
show bitmap @1 0 0
draw on
readkey @3 300
clear 2
set $tmp_rt RT
set $tmp_status STATUS
set $total_rt RT
if STATUS == TIMEOUT
readkey @3 1000
clear -1
set $total_rt expression RT + $tmp_rt
fi
if STATUS == CORRECT
clear 1
fi
if STATUS != CORRECT
clear 1
fi
delay 500
save @1 @2 STATUS $total_rt $tmp_rt $tmp_status RT @3
task EflankerMALE2
table MALE2TABLE
keys a l
draw off
set $x random 600 1000 50
delay $x
show bitmap fix 0 0
delay 500
clear 1
show bitmap @1 0 0
draw on
readkey @3 300
clear 2
set $tmp_rt RT
set $tmp_status STATUS
set $total_rt RT
if STATUS == TIMEOUT
readkey @3 1000
clear -1
set $total_rt expression RT + $tmp_rt
fi
if STATUS == CORRECT
clear 1
fi
if STATUS != CORRECT
clear 1
fi
delay 500
save @1 @2 STATUS $total_rt $tmp_rt $tmp_status RT @3
task EflankerFEMALE1
table FEMALE1TABLE
keys a l
draw off
set $x random 600 1000 50
delay $x
show bitmap fix 0 0
delay 500
clear 1
show bitmap @1 0 0
draw on
readkey @3 300
clear 2
set $tmp_rt RT
set $tmp_status STATUS
set $total_rt RT
if STATUS == TIMEOUT
readkey @3 1000
clear -1
set $total_rt expression RT + $tmp_rt
fi
if STATUS == CORRECT
clear 1
fi
if STATUS != CORRECT
clear 1
fi
delay 500
save @1 @2 STATUS $total_rt $tmp_rt $tmp_status RT @3
task EflankerFEMALE2
table FEMALE2TABLE
keys a l
draw off
set $x random 600 1000 50
delay $x
show bitmap fix 0 0
delay 500
clear 1
show bitmap @1 0 0
draw on
readkey @3 300
clear 2
set $tmp_rt RT
set $tmp_status STATUS
set $total_rt RT
if STATUS == TIMEOUT
readkey @3 1000
clear -1
set $total_rt expression RT + $tmp_rt
fi
if STATUS == CORRECT
clear 1
fi
if STATUS != CORRECT
clear 1
fi
delay 500
save @1 @2 STATUS $total_rt $tmp_rt $tmp_status RT @3
task PracticeComplete
font Medium
show text "Practice complete" 0 -200
delay 2000
show text "When the real task begins" 0 -150
delay 2000
show text "You will not receive feedback" 0 -100
delay 2000
show text "Task real will begin in:" 0 0
delay 2000
font Large
show text "10" 0 50
delay 1000
clear 5
show text "9" 0 50
delay 1000
clear 6
show text "8" 0 50
delay 1000
clear 7
show text "7" 0 50
delay 1000
clear 8
show text "6" 0 50
delay 1000
clear 9
show text "5" 0 50
delay 1000
clear 10
show text "4" 0 50
delay 1000
clear 11
show text "3" 0 50
delay 1000
clear 12
show text "2" 0 50
delay 1000
clear 13
show text "1" 0 50
delay 1000
clear 14
message Intro1
message Intro2
message Intro3
message Intro4
message Intro5
message Intro6
message Intro7
message Intro8
block EflankerpracticeMALE
tasklist
EflankerpracticeMALE 12 all_before_repeat
end
block EflankerpracticeFEMALE
tasklist
EflankerpracticeFEMALE 12 all_before_repeat
end
block PracticeComplete
tasklist
PracticeComplete 1
end
block EflankerMALE1
tasklist
EflankerMALE1 48 all_before_repeat
end
block EflankerFEMALE1
tasklist
EflankerFEMALE1 48 all_before_repeat
end
block EflankerMALE2
tasklist
EflankerMALE2 48 all_before_repeat
end
block EflankerFEMALE2
tasklist
EflankerFEMALE2 48 all_before_repeat
end
feedback
text align left
text color yellow
text -200 200 "Press space bar to continue"
end