Libet Clock


Author
Message
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 incorporate them into the script just like any other stimulus with multiple items. Set up a single <video> element, with the eight AVIs as its items. Select one of the itemnumbers 1-8 /onblockbegin via a <list>.

<values>
...
/ clockitem = 1
...
</values>

<clock clock>
/ items = ("libet.avi", "libet7.avi", ...)
...
/ select = values.clockitem
...
</clock>

<list clockitemnumbers>
/ items = (1,2,3,4,5,6,7,8)
</list>

<block rotate_p_block_aa>
/ onblockbegin = [values.clockitem = list.clockitemnumbers.nextvalue]
/bgstim = (clock)
/trials = [1 = response_p_aa; 2 = audio_p_aa]
/branch = [block.estimate_block_action_a]
</block>


Beyond that, I'm not sure what you mean with "obviously ensure that the data recorded is accurate, given that originally it was simply a method of measuring the elapsed time of the trial and corresponding that to a position on the clock."

We've discussed the math involved at length in this thread and I would assume that all of that still applies.

Psych_Josh
Psych_Josh
Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)
Group: Forum Members
Posts: 85, Visits: 397
Hi Dave,

Thanks - pardon if the solution was simpler than I was anticipating.

I've tried the <clock clock> solution, but I'm receiving an error saying that the setting has invalid text  (i.e., / items...; thus presenting the standard digital clock Inquisit uses).

As for the math, I was only concerned that if the video starts from a different position (i.e., 7), then the recorded time of the sound occurrence will be askew by 7. Trying this with some of the videos has confirmed this; i.e., values.difference (i.e., values.score (the computed position of the clock-hand) - values.response (the reported time of the participant)) is consistently out by 28 (give or take +1 or -1 for human error), when using the video "libet28.avi".

Many thanks,
Josh
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
Typo on my part -- I meant

<video clock>
...
</video>

as should be clear from the context.

As for the math: The math doesn't change. You know which video item was selected / shown (look at and log values.clockitem) and thus where the respective clock started. Adjust your various calculations accordingly.

Psych_Josh
Psych_Josh
Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)
Group: Forum Members
Posts: 85, Visits: 397
Hi Dave,


Thanks for the info. In an attempt to adjust the calculations, I think I might be committing an error, as I acquire variously wrong results. 

I have tried both I have tried both:

/ontrialend = [if (list.clock == 2) {values.score = values.score - 7} else if (list.clock == 3) {values.score = values.score - 14} else if (list.clock == 4) {values.score = values.score - 21} else if (list.clock == 5) {values.score = values.score - 28} else if (list.clock == 6) {values.score = values.score - 35} else if (list.clock == 7) {values.score = values.score - 48} else if (list.clock == 8) {values.score = values.score - 54} else if (list.clock) = 1 {true}]  

within:

<trial audio_p_aa>
/ontrialbegin = [values.audiotrial_starttime = block.rotate_p_block_aa.elapsedtime]
/ontrialbegin = [trial.audio_p_aa.insertstimulustime(sound.possounds, values.delay = 258)]
/ontrialend = [values.sound_starttime = values.audiotrial_starttime + sound.possounds.stimulusonset]
/ontrialend = [trial.audio_p_aa.resetstimulusframes(0)]
/ontrialend = [values.onset = values.sound_starttime - values.response_time]
/ontrialend = [values.sound = sound.possounds.currentitem]
/ontrialend = [values.score = (mod(values.sound_starttime,2500) - values.responsetrial_starttime)/41.6667]
/ontrialend = [values.valence = "Positive"]
/ontrialend = [values.elapsed_time = block.rotate_p_block_aa.elapsedtime; values.actual_time = values.sound_starttime + values.keep_rotating_for]
/validresponse = (0)
/trialduration = values.delay + values.keep_rotating_for + 1000
/recorddata = false
</trial>

, as well as:

/ontrialbegin = [if (list.clock == 2) {values.difference = values.difference + 7} else if (list.clock == 3) {values.difference = values.difference + 14} else if (list.clock == 4) {values.difference = values.difference + 21} else if (list.clock == 5) {values.difference = values.difference + 28} else if (list.clock == 6) {values.difference = values.difference + 35} else if (list.clock == 7) {values.difference = values.difference + 48} else if (list.clock == 8) {values.difference = values.difference + 54} else if (list.clock) = 1 {true}]

within:

<openended action>
/stimulusframes = [1 = action]
/position = (50, 50)
/buttonlabel = "Click here to advance"
/linelength = 50
/charlimit = 30
/numlines = 1
/size = (500, 50)
/recorddata = true
/required = true
/ontrialend = [values.response = openended.action.response]
/ontrialend = [values.question = "Action"]
/ontrialend = [values.difference = expressions.score]
</openended>

These take their information from:

<video clock>
/items = ("libet0.avi", "libet7.avi", "libet14.avi", "libet21.avi", "libet28.avi", "libet35.avi", "libet48.avi", "libet54.avi")
/select = values.clockitem
/playthrough = false
/loop = true
/erase = false
/size = (20%, 20%)
</video>

<list clock>
/items = (1,2,3,4,5,6,7,8)
/replace = false
/selectionmode = random
</list>

I don't profess to be anywhere near proficient at conditional logic, but I don't receive an error message when coding either into the script. Essentially, they are not modifying value.score nor values.difference in any way that I can observe, and certainly not towards acquiring the correct results. If you have the time (and the energy left for this script, as I know mine is significantly waning), please tell me where I've gone wrong.

Many thanks,
Josh
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
/ontrialend = [if (list.clock == 2) ...

does not access any list-property and will thus never evaluate to true and the logic will never be executed.

It would have to read something along the lines of

/ontrialend = [if (list.clock.currentvalue == 2) ...

Why don't you simply store the "correction factor" associated with each itemnumber in a <list> tied to the itemnumber <list>. Pull that correction from the list after you've selected the itemnumber /onblockbegin and store it in a value. Subtract that value from the score, etc. at the appropriate point in time.

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
I'd also add the following, perhaps it's helpful:

(1) If you are unsure about the math you want to / need to do, work it out with paper and pencil first. (You've probably already done this, at least that's how I read your previous comments on the topic "[...] Trying this with some of the videos has confirmed this; i.e., values.difference (i.e., values.score (the computed position of the clock-hand) - values.response (the reported time of the participant)) is consistently out by 28 (give or take +1 or -1 for human error), when using the video "libet28.avi"".)

(2) Before implementing that math into the "full" script, make a small demo that does *just* the math. Take https://www.millisecond.com/forums/FindPost18581.aspx and extend it to deal with the correction factors associated with the various clock item start positions.

(3) Once you have (2) working as you want / need, implement the changes in the full script.

Psych_Josh
Psych_Josh
Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)
Group: Forum Members
Posts: 85, Visits: 397
Hi Dave,

Thanks for the info - I ended up using the simple calculation of:

/ontrialend = [values.scorecorrected = values.score + ((values.clock_number-1) * 7) + 6], though I did take your suggestion and find it to be very helpful.

Many thanks again,
Josh
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search