Howdy, Stranger!

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

Supported by

stimulus-onset markers in SMI .idf file

Hi,
Quick version of my question: Is there a way to merge markers in an SMI logfile into the .idf data file? (I would ask SMI if they hadn't evaporated 2 years ago; I'm hoping someone here might be able to help.)

The longer version:
For my eyetracking/ERP study, I need to synchronize the .idf data file from SMI's iViewX with Brain Products actiCHamp EEG data. I had hoped to do this with a simultaneous TTL trigger to both devices. I can send the trigger to the actiCHamp easy as pie...but I can't find a way to send it to the iViewX (you can't even add a parallel port or digital I/O card to our brilliantly built SMI workstation).

Then I noticed in Edwin's Python book the clever idea of adding a PyGaze_log item as a marker right after each stimulus onset.

But then I looked at libsmi.py ...and saw that this puts a marker in the SMI logfile, not the .idf data file.

Hence my question: Is there a way to merge logfile markers into the .idf data file?

Any ideas (short of manually entering each of the 9600 stimuli based on its timestamp) will be greatly appreciated.
--Russell

PS If you know a way to get the iViewX workstation to receive the TTL trigger, that would be great too.

Comments

  • edited February 2019

    Your sync question is tricky, because with SMI I don't think it's possible to sync the clocks. However, you can definitely send timestamped markers to iViewX directly. It's in fact fairly straight-forward by adding a few lines in your libsmi.py script:

    def send_message(self, msg):
        iViewXAPI.iV_SendImageMessage(c_char_p(msg))
        # print command to debug window is optional:
        print("message: ", msg)
    

    You can then used send_message in your script where you want to send a marker instead of the log function, and it will show up in your IDF file with the SMI timestamp.

    Hope this helps!

    I just sent this as a pull request to @Edwin too, so you might see it in the master branch soon.

  • Thanks so much, Cesco and Edwin!
    I know there has been a long delay, but I'm stuck and have a very newbie question.

    When you said I can use send_message in my script, do you mean an OpenSesame inline-script item? So I would create an OS inline-script item named "stimulus_marker_script" and I would put the one-line Python instruction in the run tab of the OS GUI?

    For instance, with the code you sent in libsmi.py, and with the following in the run tab of the OS inline-script GUI

    self.send_message(stimulus_presented)

    the inline script "stimulus_marker_script" would add an SMI timestamp and the string "stimulus_presented" to the IDF file everwhere I insert it in the Open Sesame experiment?

    Sorry to be such a slow learner :/

  • You're definitely on the right track!

    If you have the latest OpenSesame release, you don't need to do anything with the code in libsmi.py, as it has since then be committed to the master branch of Pygaze.

    Indeed, wherever you want to send a marker you simply insert an inline script, and in the run tab you write:

    eyetracker.send_message("stimulus_presented")

    (Notice the minor differences with your suggested code above)

    And again correct: this message will be in your IDF file with the timestamp. Make sure to test and check like usual. :)

    Keep me posted!

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