|
Post by emmamelanson on Dec 3, 2020 2:25:13 GMT
Hello all,
Is there an easy was to display RT after each trial? I know how to do display mean RT at the end of a task within the feedback section, but is this the only way?
Thank you!
Emma
|
|
|
Post by PsyToolkit on Dec 3, 2020 9:52:22 GMT
Hi Emma, That is a good question, and it is fortunately super easy to do.
Sometimes you want to give this direct feedback about people's speed.
Below is an example that you can copy and paste and just works.
Note that in this case, PsyToolkit uses a default font "arial" and when not given a color, the color will be white on black background.
task hello keys x show rectangle 0 0 100 100 255 0 0 readkey 1 5000 clear -1 show text RT show text "Press x to continue" 0 100 readkey 1 9999
block test tasklist hello 10 end
|
|
|
Post by emmamelanson on Dec 3, 2020 16:24:33 GMT
Excellent, thank you! I just needed the "show text RT" line that I couldn't find in the documentation. It works perfectly.
Best,
Emma
|
|
|
Post by PsyToolkit on Dec 4, 2020 10:55:07 GMT
Glad it works. If you want to highlight the RT, you can also put a yellow circle behind it and write the RT in black letters. The color coding just shows that the different "parameters" behind the instruction have different meanings.
For example:
task hello keys x show rectangle 0 0 100 100 255 0 0 readkey 1 5000 clear -1 show circle 0 0 50 255 255 0 # 50 is diameter, 255 255 0 shows the circle in yellow show text RT 0 0 0 0 0 # the first two zeros are the X/Y location, the last 0 0 0 is black show text "Press x to continue" 0 100 readkey 1 9999
block test tasklist hello 10 end
|
|
|
Post by emmamelanson on Dec 16, 2020 1:30:08 GMT
I would like to show with the RT of each trial also the correct percentage or responses up to that point. So if trial 1 is correct show "100% correct responses", if trial two is incorrect then show "50% of correct responses", if trial three is correct show "66% correct responses". Can I also do this? Do I need to use an array?
|
|
|
Post by PsyToolkit on Dec 26, 2020 21:33:24 GMT
There are different ways to do this, and in the upcoming version it is going to be even easier, but I will given an example for the current version (3.2.0 at the time of this post):
It is a bit more code, and it depends on whether you want to "reset" it in a block. So, let's assume that is what you want.
Press the key "x" or "n". The "n" will be incorrect, and you see percentage will change from 0 to something else.
task hello keys x n set &my_trial_count increase show rectangle 0 0 100 100 255 0 0 readkey 1 5000 if STATUS != CORRECT set &my_error_count increase fi set &error_percentage_so_far expression &my_error_count / &my_trial_count * 100 clear -1 show circle 0 0 50 255 255 0 show text RT 0 0 0 0 0 show text "Percentage errors:" 0 100 show text &error_percentage_so_far 150 100 show text "Press x to continue" 0 200 readkey 1 9999
block test tasklist hello 20 end
|
|