Howdy, Stranger!

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

Supported by

[Rush hour] how to log responses

Hi All,

during the experiment i need to record the response(s) from the patient. They are arriving at the same serial interface as the sync pulses from MRI scanner, so it's impossible to use keyboard_response.
The MRI trigger is blocking condition of the experiment.

What i've tried is (inputchar is arriving from the response grip):
item.responses.add(response=inputchar, response_time=self.experiment.time(), item=item.name )
or
base_response_item.process_response(self, (inputchar, self.experiment.time()) )
deep in the library. Apparently, it's nor working.
I don't need to validate it right now. The postprocessing will be done in some other software.

Sorry for the rush, i need to run this in a couple of hours :disappointed:

Comments

  • Hi,

    To register a response, you can use the responses.add() function (no need to do item.responses.add()) as described here:

    You have the response (inputchar), but not the response time:the time difference between the onset of response collection, and the time at which the response was collected. The item keyword is optional (as are all other keywords, actually): it's just to disambiguate responses in case you have multiple response-collection items.

    So basically, you need to do something like:

    rt = clock.time() - t0 # where t0 is the onset of response collection
    responses.add(response=inputchar, response_time=rt)
    

    So t0 is the moment at which response collection started. But how you can determine that is unclear from your description.

    Cheers,
    Sebastiaan

  • Hi Sebastiaan,
    the response comes on the serial interface and i need to process it there. Therefore,

    File "X:\Install\OpenSesame\3.1.4-py3.5-win64\lib\site-packages\share\opensesame_plugins\syncbox\libsyncbox.py", line 231, in get_button_press
    responses.add(response=inputchar, response_time=self.experiment.time())
    NameError: name 'responses' is not defined

    Ok, this seems to work:

    if len(inputchar) > 0:
                    self.experiment.responses.add(response=inputchar, response_time=self.experiment.time())
                    print("[{}]: expected '{}', got '{}'".format(self.experiment.time(), self._syncboxResponse, inputchar))
    

    At least the debug shows:

    [14214.0]: expected 's', got 's'
    [17539.0]: expected 's', got 'd'
    [18544.0]: expected 's', got 'd'
    [18778.0]: expected 's', got 's'
    [21640.0]: expected 's', got 'a'
    [23424.0]: expected 's', got 's'

    's' is a sync trigger from the scanner, while 'a', 'b', 'c' and 'd' are responses from the hand grips.

    Just 's' is visible in the log file right now, but this will be a different story.

    I prefer to log the absolute timing of the response, where t0 is the start of the experiment. I can check the Nordic Actia logs in the lab, while right now I think the are also logging time from the beginning of the experiment.

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