Howdy, Stranger!

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

Supported by

Pygaze TSV File - Tobii Pro SDK

Sorry for cross posting this issue here https://github.com/esdalmaijer/PyGaze/issues/123

I am using a Tobii tx300 with opensesame and I am experiencing an issue with the way the TSV file in open sesame is logging information.

While the time stamps and the rest of the raw data is logged to the tsv file, in some cases this is logged in the wrong columns (see photo), when logging a message (e.g. start trial or stop trial).

I should point that this appears to be random, and for that reason it makes it hard to just correct it by writing a R script or something of sorts. It kinda forces you to double check and correct for this manually., by readjusting the time-stamp to it's column, the message as well as some of the gaze values (Gazepoints, validity and pupil).

@esdalmaijer do you have any idea of what may be causing this?

Just for reference, this is how a similar message should be logged

and this should match these column labels

Thank you,

Cheers!

Helio

Comments

  • Sorry the photos where not attached to the post.

    here is the example of the problem

    this is how a similar message should be logged

    and the column labels


  • Hello,

    I am sorry, I can't help. I just post because I am facing exactly the same problem with X3-120 Tobii tracker... And yes, it seems quite difficult to correct that through a script (I am currently trying in VBA).

    I am also curious to know the reasons of this.

    Best regards,

    Damien

  • Hello,

    While waiting the issue is solved, I have created a small VBA (Excel ; sorry ! :) ) program that seems to handle this problem. I am definitly not an expert, so the program is probably not optimal, and it likely contains some bugs (though, as far as I know, it worked well for me). I provide it as such as it might help.

    Sub modif_Tobii_OS_errors()
    
        Dim var_cell As Object
        Dim string_to_modify As String
        Dim num_line_error As Long
        Dim num_column_error As Long
        Dim last_line As Long
        Dim c As Range
        
        last_line = Cells(100000, "A").End(xlUp).Row                            'determine the last row of the table
        num_line_error = Cells(1, 1).End(xlDown).Row                            'find the first problem row (i.e. with first cell empty)
        
        While num_line_error < last_line
               
            'find the problematic cell in the row (i.e. containing "var", or "start" or "stop")
            Set var_cell = Rows(num_line_error).Find("var")
            If var_cell Is Nothing Then
                Set var_cell = Rows(num_line_error).Find("start")
                If var_cell Is Nothing Then
                    Set var_cell = Rows(num_line_error).Find("stop")
                End If
            End If
            
            num_column_error = var_cell.Column - 1
            string_to_modify = Cells(num_line_error, num_column_error)
        
            'move temporarily the second line cells on the right
            Range(Cells(num_line_error + 1, num_column_error + 1), Cells(num_line_error + 1, 14)).Value _
                    = Range(Cells(num_line_error + 1, 2), Cells(num_line_error + 1, 15 - num_column_error)).Value
            Range(Cells(num_line_error + 1, 2), Cells(num_line_error + 1, 15 - num_column_error)).ClearContents
            
            'Determine the "normal" length of the cell to modify (I check the cell just above, which is a bit hazardous, but I did not found a better way...)
            len_string = Len(Cells(num_line_error, num_column_error).End(xlUp))
            'and then move the "excess" toward the second line first cell
            Cells(num_line_error + 1, 1) = Right(string_to_modify, Len(string_to_modify) - len_string)
            'and clear it
            Cells(num_line_error, num_column_error) = Left(string_to_modify, len_string)
            
            'Move the "var" cell content
            Cells(num_line_error + 1, 2) = Cells(num_line_error, num_column_error + 1)
            Cells(num_line_error, num_column_error + 1).ClearContents
            
            'move definitly the second line cells on the top (first line)
            Range(Cells(num_line_error, num_column_error + 1), Cells(num_line_error, 14)).Value _
                    = Range(Cells(num_line_error + 1, num_column_error + 1), Cells(num_line_error + 1, 14)).Value
            Range(Cells(num_line_error + 1, num_column_error + 1), Cells(num_line_error + 1, 14)).ClearContents
            
            'Go to the next problematic line
            num_line_error = Cells(num_line_error + 2, 1).End(xlDown).Row
                
        Wend
        
    End Sub
    

    Now, I will try to automatize the modification of several files at once.

    @heliocuve please tell me if it helps and works for you. Please also tell me if you have news !

    Cheers,

    Damien

  • Hello,

    While waiting the issue is solved, I have created a small VBA (Excel ; sorry ! :) ) program that seems to handle this problem. I am definitly not an expert, so the program is probably not optimal, and it likely contains some bugs (though, as far as I know, it worked well for me). I provide it as such as it might help.

    Sub modif_Tobii_OS_errors()
    
        Dim var_cell As Object
        Dim string_to_modify As String
        Dim num_line_error As Long
        Dim num_column_error As Long
        Dim last_line As Long
        Dim c As Range
        
        last_line = Cells(100000, "A").End(xlUp).Row                            'determine the last row of the table
        num_line_error = Cells(1, 1).End(xlDown).Row                            'find the first problem row (i.e. with first cell empty)
        
        While num_line_error < last_line
               
            'find the problematic cell in the row (i.e. containing "var", or "start" or "stop")
            Set var_cell = Rows(num_line_error).Find("var")
            If var_cell Is Nothing Then
                Set var_cell = Rows(num_line_error).Find("start")
                If var_cell Is Nothing Then
                    Set var_cell = Rows(num_line_error).Find("stop")
                End If
            End If
            
            num_column_error = var_cell.Column - 1
            string_to_modify = Cells(num_line_error, num_column_error)
        
            'move temporarily the second line cells on the right
            Range(Cells(num_line_error + 1, num_column_error + 1), Cells(num_line_error + 1, 14)).Value _
                    = Range(Cells(num_line_error + 1, 2), Cells(num_line_error + 1, 15 - num_column_error)).Value
            Range(Cells(num_line_error + 1, 2), Cells(num_line_error + 1, 15 - num_column_error)).ClearContents
            
            'Determine the "normal" length of the cell to modify (I check the cell just above, which is a bit hazardous, but I did not found a better way...)
            len_string = Len(Cells(num_line_error, num_column_error).End(xlUp))
            'and then move the "excess" toward the second line first cell
            Cells(num_line_error + 1, 1) = Right(string_to_modify, Len(string_to_modify) - len_string)
            'and clear it
            Cells(num_line_error, num_column_error) = Left(string_to_modify, len_string)
            
            'Move the "var" cell content
            Cells(num_line_error + 1, 2) = Cells(num_line_error, num_column_error + 1)
            Cells(num_line_error, num_column_error + 1).ClearContents
            
            'move definitly the second line cells on the top (first line)
            Range(Cells(num_line_error, num_column_error + 1), Cells(num_line_error, 14)).Value _
                    = Range(Cells(num_line_error + 1, num_column_error + 1), Cells(num_line_error + 1, 14)).Value
            Range(Cells(num_line_error + 1, num_column_error + 1), Cells(num_line_error + 1, 14)).ClearContents
            
            'Go to the next problematic line
            num_line_error = Cells(num_line_error + 2, 1).End(xlDown).Row
                
        Wend
        
    End Sub
    

    Now, I will try to automatize the modification of several files at once.

    @heliocuve please tell me if it helps and works for you. Please also tell me if you have news !

    Cheers,

    Damien

  • Hi @Damien


    thanks so much for this, it's really cool that this solution works for you. I will try it tomorrow once I get to the lab and will let you know.


    Cheers,

    Helio

  • Thanks for the workaround, @Damien!

    The issue should now be resolved. See here for details: https://github.com/esdalmaijer/PyGaze/issues/123

  • @heliocuve Sorry if the question is lame, but how did you get event names logged alongside the start_recording timestamps?

  • edited October 2019

    Hi @Art if you want it together with start and stop messages, if you have defined the variable in your loop table for instance called stimuli_name, then just add [stimuli_name] after the start_trial status message that is sent in the pygaze_start_recording

    Alternatively, if you want to log it separately from the start_recordig item, you could simply use the pygaze_log item and deactivate the "automatically log all variables options" and in the log message field put [stimuli_name] or whatever it is you want to log.Cheers

    Helio

  • Great, thanks!

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