Howdy, Stranger!

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

Supported by

Defining response

Hi everybody,

I need a little help with coding so that I can record my keyboard responses. For my experiment, the subject is required to press either of two keys: "x" or "y" as they watch a video. I have defined the variable "correct_response" in the loop table for all the videos. However, in case no response is given I would like that to be logged as well. i.e. the "correct" variable should either be 1,0 or None. I got some help from this thread

if event: key = event[1] if var.correct_response == key: correct=1 else: correct=0 response.add(response=key, correct=correct, ....)
but I still dont know how to add the no response condition.

Comments

  • Hi,

    You can add somewhere a little script that does something along the line:


    if current_response == None: # if there was no response on that trial response.add()

    Do get the gist?

    Eduard

    Buy Me A Coffee

  • Hello Eduard...
    Should i add the script after the video? And doesn't the "else" part in the previous script include the no response condition? ( because when no response is given the value for correct is logged as 0)...
    Also...I just wanted to confirm, the time it took for a subject to respond to a video is calculated as response_time=clock.time()-time_video??

  • Hi

    Should i add the script after the video?

    Yes.

    And doesn't the "else" part in the previous script include the no response condition?

    No, because the else part is only executed if there was an event. No event, no else, no correct. The reason you still have a variable correct, is that it will be carried over from earlier in the experiment, I guess. So, if you would press a correct key first, and no key on trial two, you're correct variable would probably be 1. Right? You could also solve it, to initiate your variable in the beginnig of every block (before the video) to None, so that it will be None per default and only change to 0 or 1 if a key was pressed. Makes sense?

    Also...I just wanted to confirm, the time it took for a subject to respond to a video is calculated as response_time=clock.time()-time_video

    If time_video is the onset of the video, that will be correct.

    Eduard

    Buy Me A Coffee

  • edited April 2017

    Thanks Eduard!
    I have added responses.add(response='No key pressed', correct=None, response_tie= None) at the beginning of the script so that the default position is None just as you suggested. This has solved the problem :)

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