URL of experiment: Cued Colsing [PsychoPy]
Code: Han Zhang / Cued Color Singleton Task · GitLab
Description of the problem: I have a visual search task where each trial shows 5 identical shapes and 1 unique shape (e.g., 1 circle and 5 diamonds). Subjects are asked to look for the unique shape. On some trials, one non-target shape can appear in a different color. E.g.:
In builder, I created 6 diamonds and 6 circles and used a condition file to determine which item will show (opacity 1 or 0) and in which color (red or blue).
Here is the condition file (circle/diamond 0 is always target and circle/diamond 1 is always distractor, item positions are shuffled on the start of a trial):
trial_type | target_color | target_shape | other_shape | distractor_color | opa_circle0 | opa_diamond0 | opa_circle1 | opa_diamond1 | opa_circle2 | opa_diamond2 | opa_circle3 | opa_diamond3 | opa_circle4 | opa_diamond4 | opa_circle5 | opa_diamond5 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
P | blue | circle | diamond | red | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
P | red | circle | diamond | blue | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
P | blue | diamond | circle | red | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
P | red | diamond | circle | blue | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
A | blue | circle | diamond | blue | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
A | red | circle | diamond | red | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
A | blue | diamond | circle | blue | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
A | red | diamond | circle | red | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
The experiment works fine in psychopy but not on Pavlovia. On some random trials, it would show like this:
Thus, the distractor has the same shape as the target, which is not intended (it should’ve been a diamond). The color of the distracting item is specified independently from the rest. So the only reason I can think of is that the color variable somehow changed which shape is rendered (strange!)
Magically, exiting fullscreen (pressing F11) on these problematic trials will correct the display! That is, the red circle will magically change to a red diamond once exiting fullscreen mode!
Two more observations: (1) the problem appears to be random. On some trials it works fine. (2) I started to have this problem after the recent update to the PsychoJs library
Any idea why? Thanks!
Han
Browser: Chrome 87.0.4280.88
OS: Windows 10 64 bit