lilly
New Member
Posts: 13
|
Post by lilly on Apr 20, 2020 15:00:14 GMT
Hello, back again (but almost done with the second experiment).
Thanks for all the help so far, I am really starting to enjoy developing experiments in Psytoolkit! I want to show practice trials in a fixed order. I know I can use:
block practicetrials
tasklist
practice 12 fixed
end In which I have defined my trials in the table. However, I would like to add a second block after this, in which I also show the trials in a fixed order, but these trials are different than the practice trials.
Am I correct that it is not possible to select specific rows in the table (for example if I defined row 1-12 for the practice trials and row-13-30 for the experiment), but that I should create bitmaps for all the different trials in the practice trials and show these rather than calling on my table (and use the table exclusively for the experiment trials)? i.e. whereas the experiment task could be:
task experiment font Large
table trials
keys space
show text @2 0 0 255 255 255
readkey @5 700 using the fixed commando in the task list,
the practice trials should be something like:
task practice keys space show bitmap Trial_1 readkey 1 700 etc.
Any thoughts or help on this is appreciated! Luckily I don't have too much different variables (5), so I would only have to make 5 bitmaps, but as there are 50 practice trials, I would have to call a bitmap 50 times. Still not too much of a problem, but if there is a quick fix, I'd love to hear it.
Thanks in advance!
|
|
lilly
New Member
Posts: 13
|
Post by lilly on Apr 20, 2020 15:31:03 GMT
I just realized this would complicate things even more as I should write the feedback for all individual trials if I adopt this method, as it is not possible to refer to the table anymore. Maybe it's quicker to design two different experiments (practice and experiment) in which I only have to write the table and use the fixed command in the task, and put them in a survey which calls the two experiments. This way I don't have to re-write a lot of code (only the tables).
In short, I would like two blocks (practice and experiment) with both a fixed order of trials (as I already used this order for my other participants in E-prime), but with different trials for the practice and experiment blocks. My trials are letters, so for example the practice trials should be A E O, whereas the experiment should be E O A.
Any help is welcome!
|
|
|
Post by PsyToolkit on Apr 20, 2020 15:37:54 GMT
Often it is best to write the practise and the "real" part within the same piece of code.
What you can do, though, is to have two different tasks and two completely different tables (even when they contain more or less the same information).
|
|
lilly
New Member
Posts: 13
|
Post by lilly on Apr 20, 2020 15:51:39 GMT
Ah really? I have tried using two tables with two tasks but it didn't work. The first task and first table work fine, but for the second task and table it kept using trial 1 from the first table, then trial 1 from the second, etc. Do I need to do anything special? My code (long, as it is a go-nogo experiment with also the thing implemented from my previous question with collecting a response at the same time with the stimulus presentation, and also with an additional 300 ms responsetime in which no stimulus is shown). I tried testing it by showing the second column in the practice but the fourth in the experiment trials:
bitmaps
blackscreen
intro12
end_prac
start_exp
end_exp
fonts
Small courier 20##is original in Eprime but it's too small for this design Large courier 30
##trial(@1), stimuli(@2), #trialtype_bin(@3), #trialtype_string(@4), #correctresp(@5)
table trials
1 "E" 1 "GO" 1
2 "U" 1 "GO" 1
3 "O" 1 "GO" 1
4 "O" 0 "NOGO" 1
5 "I" 1 "GO" 1
6 "O" 1 "GO" 1
##trial(@1), stimuli(@2), #trialtype_bin(@3), #trialtype_string(@4), #correctresp(@5)
table experiment
1 "A" 1 "GO" 1
2 "E" 1 "GO" 1
3 "I" 0 "NOGO" 1
4 "I" 1 "GO" 1
5 "O" 1 "GO" 1
6 "O" 0 "NOGO" 1
task practice
set $StimTime 700
set $StimTimeE 300
font Large
table trials
keys space
show text @2 0 0 255 255 255
readkey @5 700
set $tempRT RT
if STATUS != TIMEOUT ##keypress in 700ms
set $remainingStimTime expression $StimTime - RT
clear -1
show text @2 0 0 255 255 255
delay $remainingStimTime
clear -1
show bitmap blackscreen
delay 300
clear -1
set $finalRT $tempRT
fi
if STATUS == TIMEOUT ##no keypress in 700ms
clear -1
show bitmap blackscreen
readkey @5 300
if STATUS == TIMEOUT ###no keypress in additional 300ms
clear -1
fi
if STATUS != TIMEOUT ##keypress in additional 300ms
clear -1
set $StimTimeEDiff expression $StimTimeE - RT
show bitmap blackscreen
delay $StimTimeEDiff
clear -1
fi
set $finalRT expression $tempRT + RT
fi
if STATUS = CORRECT and @3 == 1 ##gedrukt bij GO
show text "+" 0 0 0 255 0
delay 500
clear -1
set $correctness 1
fi
if STATUS == TIMEOUT and @3 == 1 ##niet gedrukt bij GO
show text "!" 0 0 255 0 0
delay 500
clear -1
set $correctness 0
set $finalRT expression $StimTime + $StimTimeE
fi
if STATUS == CORRECT and @3 == 0 ##gedrukt bij NOGO
show text "!" 0 0 255 0 0
delay 500
clear -1
set $correctness 0
fi
if STATUS == TIMEOUT and @3 == 0 ##niet gedrukt bij NOGO
show text "+" 0 0 0 255 0
delay 500
clear -1
set $correctness 1
set $finalRT expression $StimTime + $StimTimeE
fi
show bitmap blackscreen
delay 300
save @1 @2 @4 $correctness $finalRT
task experiment
set $StimTime 700
set $StimTimeE 300
font Large
table experiment
keys space
show text @4 0 0 255 255 255
readkey @5 700
set $tempRT RT
if STATUS != TIMEOUT ##keypress in 700ms
set $remainingStimTime expression $StimTime - RT
clear -1
show text @2 0 0 255 255 255
delay $remainingStimTime
clear -1
show bitmap blackscreen
delay 300
clear -1
set $finalRT $tempRT
fi
if STATUS == TIMEOUT ##no keypress in 700ms
clear -1
show bitmap blackscreen
readkey @5 300
if STATUS == TIMEOUT ###no keypress in additional 300ms
clear -1
fi
if STATUS != TIMEOUT ##keypress in additional 300ms
clear -1
set $StimTimeEDiff expression $StimTimeE - RT
show bitmap blackscreen
delay $StimTimeEDiff
clear -1
fi
set $finalRT expression $tempRT + RT
fi
if STATUS = CORRECT and @3 == 1 ##gedrukt bij GO
clear -1
set $correctness 1
fi
if STATUS == TIMEOUT and @3 == 1 ##niet gedrukt bij GO
clear -1
set $correctness 0
set $finalRT expression $StimTime + $StimTimeE
fi
if STATUS == CORRECT and @3 == 0 ##gedrukt bij NOGO
clear -1
set $correctness 0
fi
if STATUS == TIMEOUT and @3 == 0 ##niet gedrukt bij NOGO
clear -1
set $correctness 1
set $finalRT expression $StimTime + $StimTimeE
fi
show bitmap blackscreen
delay 300
save @1 @2 @4 $correctness $finalRT
message intro12
block practicetrials
tasklist
practice 6 fixed
end
message end_prac
message start_exp
block experimenttrial_1
tasklist
experiment 6 fixed
end
message end_exp And allthough compile is happy with the code, I am not as it alternates between table 1 and table 2 for the second block (experimenttrial_1).
What am I doing wrong?
|
|
lilly
New Member
Posts: 13
|
Post by lilly on Apr 20, 2020 16:06:44 GMT
Nevermind, I forgot to correct this part in the experiment (should be show text @4 to check if it worked)
if STATUS != TIMEOUT ##keypress in 700ms
set $remainingStimTime expression $StimTime - RT
clear -1
show text @2 0 0 255 255 255
It worked, I'm guessing I did something wrong the first time (as I thought multiple tables were not possible because I thought I read that somewhere, but maybe it was an experiment in which multiple tables in the same task were used).
Thanks!
|
|