2

I want to display visual/auditory stimuli inside a web browser for psychophysic experiments. I plan on using python, but I am concerned with timing. I obviously can not rely on screen refresh for timing which is common in these types of tasks. How much can I hope for in terms of accuracy for timing on the web and what are the best tools to use with Python. I am thinking of using FastCGI

I just want to hear peoples thoughts on this.

Tim
  • 35,413
  • 11
  • 95
  • 121
Jabda
  • 1,752
  • 5
  • 26
  • 54
  • What, precisely, do you mean by "timing?" – Matt Ball Jun 01 '12 at 23:00
  • 1
    @MattBall, I think shameh is doing something akin to an [Implicit Association Test](http://en.wikipedia.org/wiki/Implicit_Association_Test) which requires measuring, with a fair bit of precision, a subject's reaction time. shameh, this is a good question but I think you should add some more detail, especially if my guess is wrong. – senderle Jun 01 '12 at 23:07
  • Javascript would probably be more suited for this. – Joel Cornett Jun 01 '12 at 23:13
  • I suggest a Python backend serving HTML5, which is perfect for the visual, user-responsive applications I imagine you are describing. – Karmel Jun 02 '12 at 01:40
  • 1
    @senderle Not exclusively, there will be others such as reading etc. There could be input but ultimately I want to match it up with EEG data. – Jabda Jun 04 '12 at 18:22

1 Answers1

2

Do your timing in JS, save current time in ms on document.ready and then when user hits a key.

Benchmark your test with either

  • high-speed camera, or
  • test rig that "hits" a key, e.g. screen flash -> pohototransistor -> usb device -> virtual keyboard
Dima Tisnek
  • 11,241
  • 4
  • 68
  • 120