tfi
New Member
Posts: 14
|
Post by tfi on Sept 16, 2020 21:50:31 GMT
Hi there,
I have created an experiment and have been able to successfully compile without any errors. It is ready to run but when I do it doesn't show the whole experiment. Can I get help with this please?. Also I am using the latest version of psytoolkit.
Thanks
|
|
|
Post by PsyToolkit on Sept 16, 2020 21:58:04 GMT
It is possible that there are not compilation errors, but that there are still errors in the code (the error checker might simply not be able to "see" them, so to speak).
Maybe you can copy and paste the code of your experiment and share it with the Forum so that errors might be spotted.
|
|
tfi
New Member
Posts: 14
|
Post by tfi on Sept 17, 2020 22:07:57 GMT
I have been able to make the change and the script is now working. However,i have run into an issue. in the mixed blowck of my experiment, i want to use two type of stimuli(text and images) but when i put both in the script. only one shows.
|
|
|
Post by alexandra (AEC) on Sept 18, 2020 10:51:03 GMT
Could you post the code about that task? Maybe we are able to see what needs to be changed/added/removed.
|
|
tfi
New Member
Posts: 14
|
Post by tfi on Sept 20, 2020 21:22:02 GMT
task mixed keys e i table black_white_pleasant_unpleasant_list draw off if &order == 1 show text "black" -250 -50 show text "white" 250 -50 fi if &order == 2 show text "white" -250 -50 show text "black" 250 -50 fi show text "pleasant" -250 50 show text "unpleasant" 250 50 draw on delay 100 show rectangle 0 0 10 10 255 255 255 # fixpoint delay 200 clear -1 delay 200 show text @1 show bitmap @1 if &order == 1 readkey @2 3000 fi if &order == 2 readkey @3 3000 fi clear -1 if STATUS != CORRECT show bitmap cross delay 100 clear -1 delay 100 fi if STATUS == CORRECT show bitmap tick delay 100 clear -1 delay 100 fi delay 700 save BLOCKNAME BLOCKNUMBER @1 RT STATUS
# this is the code for the mixed condition, i have already declared my bitmaps and my text in the script. I am trying to find way to randomly show a bitmap or a word in this condition. thanks
|
|
|
Post by alexandra (AEC) on Sept 21, 2020 9:55:38 GMT
Could it be that you only see the bitmap but not the text?
In your script you have the following:
show rectangle 0 0 10 10 255 255 255 # fixpoint delay 200 clear -1 delay 200 show text @1 show bitmap @1
I assume that you have defined word/bitmap in your table, which is supposed to appear. Depending if you have the particular word in "" or not could define what is shown as you call both times @1. Let's say you have also the word "white" in your table. If you now call the word with text, it will show, but not if you also have an image called white. As far as I understand the concepts of PsyToolkit and nothing has changed in this respect, than the word white for the bitmap would have to be without "". If it is possible to add another column to your table you could have all the word for texts in @1, for example, and maybe all words for the bitmaps in @2.
Another thing to consider is, if your bitmaps cover the whole area, where you also placed the word. If this is the case, than the bitmap called after will cover the word that was called prior via show text, because they are both placed at the same spot, the centre of the screen. So it could also be possible, that your bitmap is just covering your word. A solution here could be to place the word and the bitmap at different places on the screen, like you do with black and white or pleasant and unpleasant beforehand.
|
|
tfi
New Member
Posts: 14
|
Post by tfi on Sept 21, 2020 21:13:41 GMT
Hi there yes, the bitmaps and text have been defined and i only see the bitmaps and rnumbers instead of bitmaps and text.
The bitmap and text are stimuli which will need to be placed in the centre of the screen. would you advise i put coordinates on the text for it to show?
The code you highlighted is for a fixation point which came with the originl IAT script so i decided not to change it since it would be needed for my experiment. The bitmaps do not hve the same name as the text, the bitmaps have a different name e.g.face1-24.
|
|
|
Post by alexandra (AEC) on Sept 22, 2020 8:59:39 GMT
Okay, what I do not get then is your call of @1 for show text and show bitmap, if the bitmap name is different to the word that should be shown. In the code you provided, this is the only time you have a call for a text and a bitmap. One trial consists of all called elements of one row of a table. If you are calling column 1 of that one row, then the same content will be used for show text and show bitmap.
Another random idea here - have you tried calling first show bitmap and then show text? This way your bitmap would become the "background" and the text "written on".
|
|
tfi
New Member
Posts: 14
|
Post by tfi on Sept 22, 2020 9:14:13 GMT
Hi there, yes i have created a table which contains the bitmaps and the text and given it a seperate name to the tables that have just the bitmaps or text. I have tried doing it the other way round but it still hasnt worked. when i run the experiment and it gets to the mised conditions it shows one bitmap and a number. but i have not assigned a number as text in my code.
|
|
tfi
New Member
Posts: 14
|
Post by tfi on Sept 23, 2020 0:14:15 GMT
i have now made some changes to the script. initially the table with both bitmaps and text were in one column but i split it into 2 columns instead.
table black_white_pleasant_unpleasant_list Face1 1 2 "caress" 1 1 Face2 1 2 "freedom" 1 1 Face3 1 2 "health" 1 1
Now i am able to see the bitmaps and text but the words are showing ontop of the bitmaps instead of just showing a bitmap/txt at a time. I have a feeling that i need to make some changes to this code but im not sure what needs ti be changed
show rectangle 0 0 10 10 255 255 255 # fixpoint delay 200 clear -1 delay 200 show bitmap @1 show text @4 if &order == 1 readkey @2 3000 fi if &order == 2 readkey @3 3000 fi
|
|
tfi
New Member
Posts: 14
|
Post by tfi on Sept 27, 2020 21:44:39 GMT
Hi can i please get some help with this
|
|
|
Post by alexandra (AEC) on Sept 29, 2020 12:04:25 GMT
If you want just one type being shown and then the other, you could do the following:
show rectangle 0 0 10 10 255 255 255 # fixpoint delay 200 clear -1 delay 200 show bitmap @1 delay 200 # I have just written a random time here, it depends how long you would like to show the bitmap clear -1
show text @4 delay 200 # same here for the text clear -1
if &order == 1 readkey @2 3000 fi if &order == 2 readkey @3 3000 fi
This set up will also work, if you swap around the order of bitmap and text being shown. If you would like to define the order of text and bitmap being shown depending on another variable (i.e. &order), you could use two if-loops similar to the ones you use for readkey. Similar, if you would like only one type being shown in one trial, you could also use if-loops for that purpose - you just need to be aware in that case, that you will only use one type (either bitmap or text) in a row of your table. So you might need a higher amount of trials or define more rows in your table accordingly.
|
|
tfi
New Member
Posts: 14
|
Post by tfi on Sept 30, 2020 21:37:33 GMT
Thanks for this, before you responded i thought seperating the bitmaps and text into 4 sections would help, as they are assigned to 4 groups so correct nswers would vary.
This is what i have:
#delay 400
show rectangle 0 0 10 10 255 255 255 # fixpoint
delay 400
clear -1
#delay 400
show text @4
delay 400
clear -1
if &order == 1
readkey @2 3000
fi
if STATUS != CORRECT
show bitmap cross
delay 100
clear -1
delay 100
fi
if STATUS == CORRECT
show bitmap tick
delay 100
clear -1
delay 100
fi
delay 700
save BLOCKNAME BLOCKNUMBER @1 RT STATUS
#
#delay 400
show bitmap @1
delay 400
clear -1
if &order == 1
readkey @2 3000
fi
if STATUS != CORRECT
show bitmap cross
delay 100
clear -1
delay 100
fi
if STATUS == CORRECT
show bitmap tick
delay 300
clear -1
delay 00
fi
delay 700
save BLOCKNAME BLOCKNUMBER @1 RT STATUS
These re 2 of the 4 blocks of code i have as i needed to code for when the stimuli and text corresponds to each correct key ( e.g. ==1 will be for key 1 and the other 2 blocks would be for ==2).
With the way you hve presented the code, will i be able to respond to each stimulus with this code you have presented? as my experiment requires for the participant to respond with the corresponding keys.
|
|
|
Post by alexandra (AEC) on Oct 1, 2020 8:36:23 GMT
The last code I posted would only require one key press for both bitmap and text. Following your last post, you want a key press both after the text and after the bitmap, is that correct?
You can shorten the amount of blocks needed by writing the if-statements in regards to &order == 2 right under the if-statement to &order == 1, if there is no other difference between the blocks and you do not want different blocks for each key press order.
Have you checked your data in regards to what is saved? It appears that you have several save statements in your task. Do you want to save @1 when you have the text shown or @4?
|
|