Timing units

PennController for IBEX Forums Support Timing units

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5296
    ecanseco
    Participant

    Hi, I am new to pcibex. Following your tutorial and after watching your recent Webinar, I managed to create a simple semantic priming study (200 trials). However, I want to confirm the time units for stimulus duration and for the reaction times. When I type newTimer(300), can I assume that this is exactly 300 msec? Also, when I subtract the EventTime of one event minus the EventTime of previous one, can I assume that the result is in milliseconds?

    Thanks.

    Enriqueta

    #5298
    Jeremy
    Keymaster

    Hi Enriqueta,

    Chances are it won’t be exactly 300ms, because performance varies with different hardware and software configurations. Timer elements periodically check the browser’s current timestamp, usually 60 times per second, generally matching the display refresh rate. So running a 300ms timer will effectively take between 300 and 316ms under normal circumstances.

    Yes, the EventTime values are also expressed in milliseconds, and subtracting two of them will accordingly tell you how many milliseconds passed between the two reported events.

    Jeremy

    #5299
    ecanseco
    Participant

    Thanks a lot Jeremy, both for your prompt response and for the information provided.

    One more thing appeared that you may have a suggestion for. Right now I have the Sequence( “Intro”, “Ready” , randomize(“Trials”) , “Thanks” ) and it is working great. However, this does not allow any breaks in the middle of the 200 (randomized) trials. I know how to add Timers to add breaks BETWEEN sections of my sequence but I don’t know how to insert a break (within “Trials”) after every 40 trials. In other programs I have used things like ‘counters’ and I imagine that something like that can be added but, how can I make sure that “Trials” presents 40 trials, gives a break (with the participant pressing a button when they are ready to continue) and then continues with the next 40 without losing track of which ones have been presented so far?

    Finally, in trying to find help, pcibex suggests that I consult the Ibex manual but when I click on the link provided, it fails to show me the manual.

    Enriqueta

    #5301
    Jeremy
    Keymaster

    Thank you for spotting the broken link, it looks like Alex Drummond removed the PDF version of the Ibex manual.

    You can use a global Var element to keep track of a counter. Add this at the beginning of your template trials:

    newVar("counter", 0).global().set(v=>v+1)
        .test.is(v=>v%40==0)
        .success( newButton("Take a break").print().log().wait().remove() )
    ,
    

    Jeremy

    #7866
    Larissa_Cury
    Participant

    Dear Jeremy,

    Is it possible to randomize the time? I mean, I’d like to set my time randomly from 1000 to 2600 milisseconds each trial, something like this:

    newTimer(“timer-D1”,1000 ~ 2600) (“between 1000 up to 2600 milisseconds”)
    .start()
    .wait()

    Is it possible?

    • This reply was modified 2 years, 1 month ago by Larissa_Cury.
    #7870
    Larissa_Cury
    Participant

    Would this work:

    newTimer(“timer-D1”,1000,2600)
    .start()
    .wait()

    ?

    #7878
    Jeremy
    Keymaster

    Hi Larissa,

    You can only pass up to two arguments to newTimer: a string to name the element, and a number representing the duration. If you pass a third argument, it will simply be ignored

    You can do newTimer("timer-D1", 1000+Math.round(1600*Math.random())) if you want to get a random number between 1000 and 2600

    Jeremy

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.