Howdy, Stranger!

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

Supported by

Sketchpad messes resolution / logger stores whole path.

Hi OpenSesame people!

I have built an experiment that works pretty well, with the Expyriment backend. It includes presentation of some images, one at a time (which is done by inline script), and then presentation of two images simultaneously (which is done with a sketchpad).

I have two issues that I haven't managed to solve.

  1. When the time comes for the sketchpad to run, the experiment exits fullscreen mode. So, it runs in fullscreen from the beggining, but it minimizes when the sketchpad runs.
  2. Concerning the logger, I have asked it to log the images that are presented each time. However, it stores the whole file path, not just the name with which I have defined each file in the script. This is not really a big problem, but as I will need to analyze lots of observations, it would be best if the data looked simpler.

To give you some more info: I ask it to log variables image1, image2, image3.

Those have been defined as such:

var.image1=my_list_stimuli[0]
var.image2=my_list_stimuli[1]
var.image3=my_list_stimuli[2]

'my_list_stimuli' contains the following names:

my_list_stimuli = [bird_green, bird_red, bird_yellow]

and those names are defined as such

bird_green = pool["bird_green.png"]
bird_red = pool["bird_red.png"]
bird_yellow = pool["bird_yellow.png"]

So instead of logging just those names, it logs this:


Does anyone have any ideas?

Thank you very much, in advance.

Comments

  • edited January 18

    I also forgot to add the following:

    In another version of the same experiment, that runs with psycho (I prefer it because i also play sound in that version), when logging the response time, it comes out in a weird format, so like that:

    Is there a way to control this so that it just comes out in ms?

  • Hi,

    When the time comes for the sketchpad to run, the experiment exits fullscreen mode. So, it runs in fullscreen from the beggining, but it minimizes when the sketchpad runs.

    I have never heard of such a thing. Could you record it and share the vid here?

    However, it stores the whole file path, not just the name with which I have defined each file in the script.


    The pool[xxx] command is responsible for translating a simple filename to the entire path (essentially adding the current directory or wherever the file is located to the file name. So, if you want only the name logged, and not the entire path, you need to add a layer of abstraction:

    red_bird = 'bird_red.png'
    bird_red = pool[red_bird]
    

    And then log only red_bird and not bird_red. See what I mean?

    Is there a way to control this so that it just comes out in ms?

    Quite sure these are ms. The E+15 means that you multiple the number with 10 to the power of 15. So it is just a very large response time you have. Whether this is a mistake in your code, or some problem with Psychopy I can't see without further info. Normally though, the problem is with importing files to Excel rather than the actual logging of info. You can share a log file here, and I can check whether the file itself is fine.

    Eduard

    Buy Me A Coffee

  • edited March 20

    Hi Eduard :)

    sorry this took so long.

    Concerning the 2nd question, where the logger logged the whole filepath, i did as you suggested and added another layer of abstraction. However it keeps logging the whole path.

    So I did this. Do you have any ideas?

    #extra layer of abstraction
    bird_pic='bird.png'
    cat_pic= 'cat.png'
    cow_pic='cow.png'
    dog_pic= 'dog.png'
    elephant_pic='elephant.png'
    bee_pic='bee.png'
    goat_pic='goat.png'
    
    #find items in pool
    bird = pool[bird_pic]
    cat = pool[cat_pic]
    cow = pool[cow_pic]
    dog = pool[dog_pic]
    elephant = pool[elephant_pic]
    bee = pool[bee_pic]
    goat = pool[goat_pic]
    
    
    #now i create a list just to shuffle my pics.
    my_list_stimuli=[bird, cat, cow, dog, elephant, bee, goat]
    
    #shuffle everything
    shuffle(my_list_stimuli)
    
    #show one of them
    var.stimulus1=my_list_stimuli[0]
    my_canvas1=Canvas(exp)
    my_canvas1.image(var.stimulus1)
    
    
  • Well, the canvas needs the full path for showing the image. So, you essentially can't use the same variable for logging and for presenting. Log them separately, e.g. var.stimulus1 = 'bird.png' while var.stim1_file = <full_path>

    You could also change the order of your code, to make this more intuitive:

    #extra layer of abstraction
    bird_pic='bird.png'
    cat_pic= 'cat.png'
    cow_pic='cow.png'
    dog_pic= 'dog.png'
    elephant_pic='elephant.png'
    bee_pic='bee.png'
    goat_pic='goat.png'
    
    #find items in pool
    bird = pool[bird_pic]
    cat = pool[cat_pic]
    cow = pool[cow_pic]
    dog = pool[dog_pic]
    elephant = pool[elephant_pic]
    bee = pool[bee_pic]
    goat = pool[goat_pic]
    
    
    #now i create a list just to shuffle my pics.
    my_list_stimuli=[bird_pic, cat_pic, cow_pic, dog_pic, elephant_pic, bee_pic, goat_pic]
    
    #shuffle everything
    shuffle(my_list_stimuli)
    
    #show one of them
    var.stimulus1=my_list_stimuli[0]
    var.stimulus1_file=pool[var.stimulus1]
    my_canvas1=Canvas(exp)
    my_canvas1.image(var.stimulus1_file)
    

    Hope this helps,

    Eduard

    Buy Me A Coffee

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