How to record time - not duration - of stimulus onset?


Author
Message
marieke_01
marieke_01
Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)
Group: Forum Members
Posts: 1, Visits: 1
Hello.

We want to supervise by video if a participant has really observed the presented stimulus. Therefore, we need the time, when the stimulus was presented.

With "stimulusonset" it´s only possible to record the milliseconds after the trail began - thus, a kind of hold-up effect control.

But we need the time - in terms of time of day (10:12:13) or the milliseconds, counted scine the beginning of the whole experiment.


Who can help?

Thank you, Marieke



Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
You'll want to make use of the applicable 'currenttime' and/or 'elapsedtime' property to record a timestamp /ontrialbegin, log that to the data file and then add stimulusonset to the timestamp to approximate absolute starting time for the given stimulus.
juhaso
juhaso
Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)
Group: Forum Members
Posts: 2, Visits: 13
Thank you for the very nice possibility, to include a timestamp of the inquisit-events in the logfile via

<data>
/ colums =[...,script.currenttime,...]
</data>

However, to synchronize inquisit-events very accurately with an externally recorded video (with timestamps) it would be very useful to have a inquisit-timestamp including milliseconds, e.g., in the format hh:mm:ss:xxx where xxx are the milliseconds. Is there any possibility to have that?

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
No. The currenttime property does not provide milliseconds. elapsedtime, however, is provided in milliseconds, so if need be you could conceivably combine the two (using math via expressions).

juhaso
juhaso
Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)Respected Member (378 reputation)
Group: Forum Members
Posts: 2, Visits: 13
Actually that does not help much. If I find

script.currenttime   script.elapsedtime
12:13:23             41291
12:13:33             51391

in my logfile, I know that the trial startet at second 23 and lastet for exactly 10 seconds. However, I don't know exactly when it started. That's to unprecise to sync it with a videorecording of 30 fps which records a frame every 33 ms.

My workaround-solution is to wait for a "full" second:

------------------------------------
### Start experiment-block if second is "full"
### (Inquisit 3.0.6.0)

<expt>
/ subjects = (1 of 1)
/ blocks = [1=loopfullsecond]
</expt>

<values>
/ beginningSecond = script.currenttime
</values>

#########################
### "full second" loop
#########################

<block loopfullsecond>
/ branch = [if (script.currenttime > values.beginningSecond) block.experiment]
/ branch = [if (script.currenttime == values.beginningSecond) block.loopfullsecond]
</block>

#########################
### Experiment starts
#########################

<block experiment>
/ trials = [1=experiment]
</block>

<trial experiment>
/ stimulustimes = [0 = experiment,currenttime1,currenttime2,elapsedtime1]
/ timeout = 5000
</trial>

<text experiment>
/ items = experiment
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = (0,0,0)
/ fontstyle = ("Arial", 5%)
</text>

<text currenttime1>
/ items =  ("Script start second: <% values.beginningSecond %>")
/ position = (50%, 60%)
/ halign = center
</text>

<text currenttime2>
/ items =  ("Current time: <% script.currenttime %>")
/ position = (50%, 70%)
/ halign = center
</text>

<text elapsedtime1>
/ items = ("Elapsed time (should be lower than 1000): <% script.elapsedtime %>")
/ position = (50%, 80%)
/ halign = center
</text>

<item experiment>
/1 = "Experiment starts"
</item>
------------------------------------

The script itself seems to need about 32ms to get up and running on my machine (measured with a very simple script and script.elapsedtime). That's an offset of one frame and acceptable/assessable for me. Nevertheless, a more precise timestamp would be very useful ;-)

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search