Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Visual Search Target Display issues

edited April 2015 in OpenSesame

Hey,

I have a visual search task where there are four line image drawings, all are black expect the target (red/green). I have a distractor that is from a training phase and then two filler images to make up the display. For some reason, my display works whenever the target is presented to the left of fixation, but the target never appears when it should at the top, bottom or right of fixation. However, the filler images and distractor always appear. I'm not sure why the "Left target" display is the only one that works. I have a sketchpad for each target location. So if the target location variable (in the block loop) is "Up" then the "Target Up display" is presented. The same applies for "Left, Right, and Down". The displays worked in the Training phase earlier in the experiment, but don't for the Test phase (except when the target is to the left). Any ideas or suggestions?

I have an inline script for positioning the Distractor, and 2 filler images. Also the participant responds to an oriented line (each oriented line is an image file to control for image properties). Each trial superimposes the oriented line image onto the line drawing image. Below is the inline script code I created.

Essentially, I have a conditional statement for each distractor position (0 = Up, 1 = Down, 2 = Left, 3 = Right). Positions are relative to fixation dot at the center. I have a nested conditional statement that determines where the 2 filler images will be displayed. if Distractor is Up, then I have a conditional statement for each Target location (Down, Left, Right) and then the filler images are put in the remaining two spaces.

The SOA is for a different sketchpad display.

import random
Fixation_SOA = random.randint(0, 2)
SOA = 0
if Fixation_SOA == 0:
SOA = 400
elif Fixation_SOA == 1:
SOA = 500
else:
SOA = 600
exp.set("SOA", SOA)

Distractor_Location_Value = random.randint(0, 3)
Line_Orientation = random.randint(0, 1)
Distractor_Location_X = 0
Distractor_Location_Y = 0
Filler_1_Location_X = 0
Filler_1_Location_Y = 0
Filler_2_Location_X = 0
Filler_2_Location_Y = 0

if Distractor_Location_Value == 0 and self.get("Target_Location") != "Up":
Distractor_Location_X = 0
Distractor_Location_Y = -200
if self.get("Target_Location") == "Down":
Filler_1_Location_X = 200
Filler_1_Location_Y = 0
Filler_2_Location_X = -200
Filler_2_Location_Y = 0
exp.set("Filler_1_Location_X", Filler_1_Location_X)
exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
exp.set("Filler_2_Location_X", Filler_2_Location_X)
exp.set("Filler_2_Location_Y", Filler_2_Location_Y)

elif self.get("Target_Location") == "Left":
        Filler_1_Location_X = -200
        Filler_1_Location_Y = 0
        Filler_2_Location_X = 0
        Filler_2_Location_Y = 200
        exp.set("Filler_1_Location_X", Filler_1_Location_X)
        exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
        exp.set("Filler_2_Location_X", Filler_2_Location_X)
        exp.set("Filler_2_Location_Y", Filler_2_Location_Y)     
else:
        Filler_1_Location_X = 200
        Filler_1_Location_Y = 0
        Filler_2_Location_X = 0
        Filler_2_Location_Y = 200
        exp.set("Filler_1_Location_X", Filler_1_Location_X)
        exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
        exp.set("Filler_2_Location_X", Filler_2_Location_X)
        exp.set("Filler_2_Location_Y", Filler_2_Location_Y)

elif Distractor_Location_Value == 1 and self.get("Target_Location") != "Down":
Distractor_Location_X = 0
Distractor_Location_Y = 200
if self.get("Target_Location") == "Up":
Filler_1_Location_X = 200
Filler_1_Location_Y = 0
Filler_2_Location_X = -200
Filler_2_Location_Y = 0
exp.set("Filler_1_Location_X", Filler_1_Location_X)
exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
exp.set("Filler_2_Location_X", Filler_2_Location_X)
exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
elif self.get("Target_Location") == "Left":
Filler_1_Location_X = 0
Filler_1_Location_Y = -200
Filler_2_Location_X = -200
Filler_2_Location_Y = 0
exp.set("Filler_1_Location_X", Filler_1_Location_X)
exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
exp.set("Filler_2_Location_X", Filler_2_Location_X)
exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
else:
Filler_1_Location_X = 0
Filler_1_Location_Y = -200
Filler_2_Location_X = 200
Filler_2_Location_Y = 0
exp.set("Filler_1_Location_X", Filler_1_Location_X)
exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
exp.set("Filler_2_Location_X", Filler_2_Location_X)
exp.set("Filler_2_Location_Y", Filler_2_Location_Y)

elif Distractor_Location_Value == 2 and self.get("Target_Location") != "Left":
Distractor_Location_X = 200
Distractor_Location_Y = 0
if self.get("Target_Location") == "Down":
Filler_1_Location_X = 0
Filler_1_Location_Y = -200
Filler_2_Location_X = -200
Filler_2_Location_Y = 0
exp.set("Filler_1_Location_X", Filler_1_Location_X)
exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
exp.set("Filler_2_Location_X", Filler_2_Location_X)
exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
elif self.get("Target_Location") == "Right":
Filler_1_Location_X = 0
Filler_1_Location_Y = -200
Filler_2_Location_X = 0
Filler_2_Location_Y = 200
exp.set("Filler_1_Location_X", Filler_1_Location_X)
exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
exp.set("Filler_2_Location_X", Filler_2_Location_X)
exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
else:
Filler_1_Location_X = -200
Filler_1_Location_Y = 0
Filler_2_Location_X = 0
Filler_2_Location_Y = 200
exp.set("Filler_1_Location_X", Filler_1_Location_X)
exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
exp.set("Filler_2_Location_X", Filler_2_Location_X)
exp.set("Filler_2_Location_Y", Filler_2_Location_Y)

else:
Distractor_Location_X = -200
Distractor_Location_Y = 0
if self.get("Target_Location") == "Down":
Filler_1_Location_X = 0
Filler_1_Location_Y = -200
Filler_2_Location_X = 200
Filler_2_Location_Y = 0
exp.set("Filler_1_Location_X", Filler_1_Location_X)
exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
exp.set("Filler_2_Location_X", Filler_2_Location_X)
exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
elif self.get("Target_Location") == "Left":
Filler_1_Location_X = 0
Filler_1_Location_Y = -200
Filler_2_Location_X = 0
Filler_2_Location_Y = 200
exp.set("Filler_1_Location_X", Filler_1_Location_X)
exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
exp.set("Filler_2_Location_X", Filler_2_Location_X)
exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
else:
Filler_1_Location_X = 200
Filler_1_Location_Y = 0
Filler_2_Location_X = 0
Filler_2_Location_Y = 200
exp.set("Filler_1_Location_X", Filler_1_Location_X)
exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
exp.set("Filler_2_Location_X", Filler_2_Location_X)
exp.set("Filler_2_Location_Y", Filler_2_Location_Y)

exp.set("Distractor_Location_X", Distractor_Location_X)
exp.set("Distractor_Location_Y", Distractor_Location_Y)
exp.set("Filler_1_Location_X", Filler_1_Location_X)
exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
exp.set("Filler_2_Location_X", Filler_2_Location_X)
exp.set("Filler_2_Location_Y", Filler_2_Location_Y)

if Line_Orientation == 0:
Oriented_Line_Image = "up and left.jpg"
else:
Oriented_Line_Image = "up and right.jpg"
exp.set("Oriented_Line_Image", Oriented_Line_Image)
exp.set("Oriented_Line_Image", Oriented_Line_Image)

Comments

  • edited 4:28PM
    Distractor_Location_Value = random.randint(0, 3)
    Line_Orientation = random.randint(0, 1)
    Distractor_Location_X = 0
    Distractor_Location_Y = 0
    Filler_1_Location_X = 0
    Filler_1_Location_Y = 0
    Filler_2_Location_X = 0
    Filler_2_Location_Y = 0
    
    if Distractor_Location_Value == 0 and self.get("Target_Location") != "Up":
        Distractor_Location_X = 0
        Distractor_Location_Y = -200
        if self.get("Target_Location") == "Down":
                Filler_1_Location_X = 200
                Filler_1_Location_Y = 0
                Filler_2_Location_X = -200
                Filler_2_Location_Y = 0
                exp.set("Filler_1_Location_X", Filler_1_Location_X)
                exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
                exp.set("Filler_2_Location_X", Filler_2_Location_X)
                exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
    
        elif self.get("Target_Location") == "Left":
                Filler_1_Location_X = -200
                Filler_1_Location_Y = 0
                Filler_2_Location_X = 0
                Filler_2_Location_Y = 200
                exp.set("Filler_1_Location_X", Filler_1_Location_X)
                exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
                exp.set("Filler_2_Location_X", Filler_2_Location_X)
                exp.set("Filler_2_Location_Y", Filler_2_Location_Y)     
        else:
                Filler_1_Location_X = 200
                Filler_1_Location_Y = 0
                Filler_2_Location_X = 0
                Filler_2_Location_Y = 200
                exp.set("Filler_1_Location_X", Filler_1_Location_X)
                exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
                exp.set("Filler_2_Location_X", Filler_2_Location_X)
                exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
    
    elif Distractor_Location_Value == 1 and self.get("Target_Location") != "Down":
        Distractor_Location_X = 0
        Distractor_Location_Y = 200
        if self.get("Target_Location") == "Up":
                Filler_1_Location_X = 200
                Filler_1_Location_Y = 0
                Filler_2_Location_X = -200
                Filler_2_Location_Y = 0
                exp.set("Filler_1_Location_X", Filler_1_Location_X)
                exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
                exp.set("Filler_2_Location_X", Filler_2_Location_X)
                exp.set("Filler_2_Location_Y", Filler_2_Location_Y)     
        elif self.get("Target_Location") == "Left":
                Filler_1_Location_X = 0
                Filler_1_Location_Y = -200
                Filler_2_Location_X = -200
                Filler_2_Location_Y = 0
                exp.set("Filler_1_Location_X", Filler_1_Location_X)
                exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
                exp.set("Filler_2_Location_X", Filler_2_Location_X)
                exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
        else:
                Filler_1_Location_X = 0
                Filler_1_Location_Y = -200
                Filler_2_Location_X = 200
                Filler_2_Location_Y = 0
                exp.set("Filler_1_Location_X", Filler_1_Location_X)
                exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
                exp.set("Filler_2_Location_X", Filler_2_Location_X)
                exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
    
    elif Distractor_Location_Value == 2 and self.get("Target_Location") != "Left":
        Distractor_Location_X = 200
        Distractor_Location_Y = 0
        if self.get("Target_Location") == "Down":
                Filler_1_Location_X = 0
                Filler_1_Location_Y = -200
                Filler_2_Location_X = -200
                Filler_2_Location_Y = 0
                exp.set("Filler_1_Location_X", Filler_1_Location_X)
                exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
                exp.set("Filler_2_Location_X", Filler_2_Location_X)
                exp.set("Filler_2_Location_Y", Filler_2_Location_Y)     
        elif self.get("Target_Location") == "Right":
                Filler_1_Location_X = 0
                Filler_1_Location_Y = -200
                Filler_2_Location_X = 0
                Filler_2_Location_Y = 200
                exp.set("Filler_1_Location_X", Filler_1_Location_X)
                exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
                exp.set("Filler_2_Location_X", Filler_2_Location_X)
                exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
        else:
                Filler_1_Location_X = -200
                Filler_1_Location_Y = 0
                Filler_2_Location_X = 0
                Filler_2_Location_Y = 200
                exp.set("Filler_1_Location_X", Filler_1_Location_X)
                exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
                exp.set("Filler_2_Location_X", Filler_2_Location_X)
                exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
    
    else:
        Distractor_Location_X = -200
        Distractor_Location_Y = 0
        if self.get("Target_Location") == "Down":
                Filler_1_Location_X = 0
                Filler_1_Location_Y = -200
                Filler_2_Location_X = 200
                Filler_2_Location_Y = 0
                exp.set("Filler_1_Location_X", Filler_1_Location_X)
                exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
                exp.set("Filler_2_Location_X", Filler_2_Location_X)
                exp.set("Filler_2_Location_Y", Filler_2_Location_Y)     
        elif self.get("Target_Location") == "Left":
                Filler_1_Location_X = 0
                Filler_1_Location_Y = -200
                Filler_2_Location_X = 0
                Filler_2_Location_Y = 200
                exp.set("Filler_1_Location_X", Filler_1_Location_X)
                exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
                exp.set("Filler_2_Location_X", Filler_2_Location_X)
                exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
        else:
                Filler_1_Location_X = 200
                Filler_1_Location_Y = 0
                Filler_2_Location_X = 0
                Filler_2_Location_Y = 200
                exp.set("Filler_1_Location_X", Filler_1_Location_X)
                exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
                exp.set("Filler_2_Location_X", Filler_2_Location_X)
                exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
    
    exp.set("Distractor_Location_X", Distractor_Location_X)
    exp.set("Distractor_Location_Y", Distractor_Location_Y)
    exp.set("Filler_1_Location_X", Filler_1_Location_X)
    exp.set("Filler_1_Location_Y", Filler_1_Location_Y)
    exp.set("Filler_2_Location_X", Filler_2_Location_X)
    exp.set("Filler_2_Location_Y", Filler_2_Location_Y)
    
    if Line_Orientation == 0:
        Oriented_Line_Image = "up and left.jpg"
    else:
        Oriented_Line_Image = "up and right.jpg"
    exp.set("Oriented_Line_Image", Oriented_Line_Image)
    exp.set("Oriented_Line_Image", Oriented_Line_Image)
    
  • edited 4:28PM

    Hi,

    You have alot of if-statements (probably more than necessary) which might have resulted in the logic going awry in some places without you noticing.

    At the moment, your main plan seems to be to pick a random distractor position every trial, and position the other things around that. Why not just place your target first, and limit the possible distractor positions in accordance with that? (For instance, if the target is down, then distractor_location_value = random.choice([0, 2, 3]). For the two filler spots, you simple take the remaining two values.

    Nonetheless, the problem may also lie in the part of the code that actually puts the stimuli on the canvas. For instance, I can't yet see what you would do if the distractor location was the same as the target location; perhaps you haven't taken this possibility into account and the distractor would simply overwrite the target?
    If this turns out to be the case, then the strategy I suggested above should solve this.

    Let me know how it goes.
    Cheers,

    Josh

  • edited 4:28PM

    How would I actually implement this design? I like your suggestion a lot better than my current set-up. So essentially I would have 4 numbers (0 = up, 1 = right, 2 = down, 3 = left). Then I assign the target to a number on each trial. Then I pick a random number from the remaining three choices and assign that to the distractor. Then I randomly assign the two fillers to the remaining two numbers. I think that's the logic of what you suggested right? I'm terrible at programming so how would I actually implement this?

    I think I just need a conditional statement for each target location right?
    if Target_Location = Up (or 0):
    Distractor_Location_Value = random.choice([1, 2, 3])

    elif Target_Location = Down (or 2):
    Distractor_Location_Value = random.choice([0, 1, 3])

    etc. for each target location (4 parts of the conditional statement)
    How do I do the filler image part? Like, how would I ensure that the filler image values aren't the same as either the target or distractor? If random.choice is used again, there's a chance I can get a "0" for one of the four images, then a "0" again. How do I code for drawing from a list without replacement? (I'm not familiar with the coding language)

    I guess my overall question would be, how do I make sure that each image (target, distractor, filler 1, filler 2) are each assigned to a unique number out of a list of 4 numbers?

    I want to keep the way I have the trial order set up and the Target locations. I have it so that each of my target images (there's 20 exemplars total) appears in each cardinal location the exact same amount.

  • edited 4:28PM

    I got it to work! I think you were right, there was way too much going on in terms of conditional statements and clutter. I trimmed the code down greatly and now it works like a charm! Thank you for your help!

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games