Howdy, Stranger!

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

Supported by

Stimuli presentation from lists (within lists?)

edited November 2016 in OpenSesame

Hey guys,

I would like to run a study I am programming in OS at the moment and I am struggling with the last part of it .

So, to give you a quick background...
I have 20 pictures I am pairing with other pictures this way:

  • 10 pictures with positive stimuli
  • 10 pictures with negative stimuli
    Then, in the next part of the procedure, I am showing all the 20 pictures in 4 within participants variants where:

condition 1 (showing a picture with a positive stimulus it was paired with earlier)

CS_rating_list1 = CS_pos[0:5]
US_pos_list1 = US_pos[0:5]
US_neg_list1 = US_neg[5:10]

condition 2 (showing a picture with one of the positive stimuli, but not the one it was paired with)

CS_rating_list2 = CS_pos[5:10]
US_pos_list2 = US_pos[0:5]
US_neg_list2 = US_neg[5:10]

condition 3 (showing a picture with a negative stimulus it was paired with earlier)

CS_rating_list3 = CS_neg[0:5]
US_pos_list3 = US_pos[5:10]
US_neg_list3 = US_neg[0:5]

condition 4 (showing a picture with one of the negative stimuli, but not the one it was paired with)

CS_rating_list4 = CS_neg[5:10]
US_pos_list4 = US_pos[5:10]
US_neg_list4 = US_neg[0:5]

So, above I created conditions and zipped them below into lists which I was planning to use in the rating phase later:

pairing_real_pos = zip(CS_rating_list1, US_pos_list1, US_neg_list1)
pairing_real_neg= zip(CS_rating_list3, US_pos_list3, US_neg_list3)
pairing_fake_pos = zip(CS_rating_list2, US_pos_list2, US_neg_list2)
pairing_fake_neg= zip(CS_rating_list4, US_pos_list4, US_neg_list4)

Then, during the rating phase I want to present the pictures in all the four within participant variants and thought I could do it this way with a variable "condition" (from 1 to 4, analogical to four lists I created above) and a variable "position" (left or right side on the computer screen just to counterbalance the presentation):

if var.condition==1:
    var.CS_rating = pairing_real_pos[0] #the first element is the CS 
    if var.position=="left":    
        var.left_US= pairing_real_pos[1] #the second element is the US
        var.right_US=pairing_real_pos[2] #the third element is the US 
    elif var.position=="right":
        var.left_US= pairing_real_pos[2] #the second element is the US
        var.right_US=pairing_real_pos[1] #the third element is the US 
elif var.condition==2:
    var.CS_rating = pairing_fake_pos[0] #the first element is the CS 
    if var.position=="left":    
        var.left_US= pairing_fake_pos[1] #the second element is the US
        var.right_US=pairing_fake_pos[2] #the third element is the US 
    elif var.position=="right":
        var.left_US= pairing_fake_pos[2] #the second element is the US
        var.right_US=pairing_fake_pos[1] #the third element is the US   
elif var.condition==3:
    var.CS_rating = pairing_real_neg[0] #the first element is the CS 
    if var.position=="left":    
        var.left_US= pairing_real_neg[1] #the second element is the US
        var.right_US=pairing_real_neg[2] #the third element is the US 
    elif var.position=="right":
        var.left_US= pairing_real_neg[2] #the second element is the US
        var.right_US=pairing_real_neg[1] #the third element is the US 
elif var.condition==4:
    var.CS_rating = pairing_fake_neg[0] #the first element is the CS 
    if var.position=="left":    
        var.left_US= pairing_fake_neg[1] #the second element is the US
        var.right_US=pairing_fake_neg[2] #the third element is the US 
    elif var.position=="right":
        var.left_US= pairing_fake_neg[2] #the second element is the US
        var.right_US=pairing_fake_neg[1] #the third element is the US

And then just write on a sketchpad “CS_rating”, “left_US” and “right_US”, but OS keeps giving me this error which I guess means it treats my lists nested within lists as one element, not three separate elements…

If you have an idea how to fix this issue and help me out on it would be extremely grateful!

Thanks a lot in advance and have a good day everyone.

Cheers,
Bori

Comments

  • You are right, your lists are nested.

    Option 1:
    Write the list unnested: pairing_real_pos = [x, y, z, ...] #all items as one

    Option 2:
    Draw from the nested list like this
    if var.condition==1:
    var.CS_rating = pairing_real_pos[0][0] #the first is your first list, the second your first picture in the first list

    Example:
    seq=[[1,2],[3,4]]
    print seq[0][1] # prints 2

  • Thanks a lot, managed to do it with the latter solution!

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