Real-time operating via Python

后端 未结 6 1253
离开以前
离开以前 2020-12-24 03:50

So I am an inexperienced Python coder, with what I have gathered might be a rather complicated need. I am a cognitive scientist and I need precise stimulus display and butto

6条回答
  •  遥遥无期
    2020-12-24 03:56

    1. Run the python interpreter on a real time operating system or tweaked linux.
    2. Shut down the garbage collector during the experiments and back on afterward.
    3. Maybe actively trigger a garbage collection round after the end of an experiment.

    Additionally, keep in mind that showing an image is not instantaneous. You must synchronize your experiment with your monitor's vertical retrace phase (the pause between transmitting the last line of a frame of the display's content and the first line of the next frame).

    I would start the timer at the beginning of the vsync phase after transmission of the frame containing whatever candidates are supposed to react to.

    And one would have to keep in mind that the image is going to be ast least partially visible a bit earlier than that for purposes of getting absolute reaction times as opppsed to just well comparable results with ~ half a frame of offset due to the non-instantaneous appearance of the monitor's contents (~10 ms @ 60Hz).

提交回复
热议问题