Howdy, Stranger!

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

Supported by

[solved] sort logger vars

edited February 2014 in OpenSesame

hi! i hassle with the logger because i am not able to sort the variables for the logfile.

it would be nice if all variables from different loops would stand in the same column.

is there any way to do this? or is there another element to set the vars other than the logger, i.e.

log "cogPos_pic"
log "cogPos_age"
log "cogPos_gender"
log "cogPos_valence"
log "response_cogPos_keyboard_response"
log "response_time_cogPos_keyboard_response"
log "correct_cogPos_keyboard_response"

???

thanks a lot,

ben

Comments

  • edited 12:01AM

    ps: i don't understand why the logger sets the variable names for almost every new loop but for some loops not...

  • edited 12:01AM

    Hi Ben,

    The logger writes one row of data every time that it is executed. So you can never have data from two different loops, or more generally from two different calls to a logger, in the same row. But if you want you can write to the logfile using Python script, in which case you can use any kind of format you'd like. This is described here:

    ps: i don't understand why the logger sets the variable names for almost every new loop but for some loops not...

    Do you mean that you get a new row of column headers in the middle of your logfile? This happens if you have more than one different logger items in your experiment, which start cross-talking. Usually, you would have only a single logger in the experiment, although this single item can occur at multiple positions in the experiment (i.e. by re-using the same logger, rather than creating a new one).

    Cheers!
    Sebastiaan

  • edited 12:01AM

    sorry, i already edited my question before your answer. i ment "it would be nice if all variables from different loops would stand in the same COLUMN."

    the variables have different names (from different conditions) but contain the same kind of data. therefore it would be nice if the logger do not shuffle the order of variables (columns) by itself but keeps my specified order (see example above). i see no pattern in the "shuffle method".

    in the end i gues i will script my own logger but i have a certain compulsion to understand why things happen :) and maybe it helps another user aswell...

    thanks a lot!

    ben

  • edited February 2014

    hello again, i couldnt find a way to write variables with self.log().

    i have variables set in a "setup-script" like

    "here some array with pics"
    var1pic=array[0][0]
    exp.set("var1pic",var1pic)
    

    and the variable [num] in the loop which identifies a certain pic in the sketchpad ([var[num]pic]).

    how could i write the name of the pic into the log? and how can i catch key_reponses to be written in the log?

    i really try to fix problems by myself but somehow the docu and me are no good friends yet...

  • edited 12:01AM

    the variables have different names (from different conditions) but contain the same kind of data. therefore it would be nice if the logger do not shuffle the order of variables (columns) by itself but keeps my specified order (see example above). i see no pattern in the "shuffle method".

    The logger always arranges columns alphabetically, independently of the order of the log statements in the script. But different variables will never be written to the same column: One variable = one column. So if you want to have a particular 'kind of data' to always appear in the same column, you need to make sure that the data is stored in the same variable.

    how could i write the name of the pic into the log? and how can i catch key_reponses to be written in the log?

    In an inline_script you have to use self.get() to retrieve an experimental variable. So if you have defined some variable called my_var in a loop item, you would log it like so:

    self.log('my_var = %s' % self.get('my_var'))
    

    Or for the response variables that are set by a keyboard_response:

    self.log('response = %s' % self.get('response'))
    self.log('response_time = %s' % self.get('response_time'))
    self.log('correct = %s' % self.get('correct'))
    

    See also:

  • edited February 2014

    thank you so much! now everthing works fine!

    i just had to find out how to write more than 1 string to write all variables in one line:

    self.log('%s;%s;%s' % (self.get('var1'),self.get('var2'),self.get('var3')))
    

    thanks a lot again!

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