Latency recorded as zero


Author
Message
NatalieM
NatalieM
Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)
Group: Forum Members
Posts: 6, Visits: 28
I have an attention task where a background video is playing and participants are asked to respond to '+' appearing on either right or left side of video with varying post trial pauses. The problem is that when I look at pilot data the latencies are usually recorded as 2000 (which I have set as response timeout). I am using a MacBook Air to run these tasks and I am wondering if it either a code problem OR that my computer is not powerful enough to record responses and deal with the background video at the same time. Help is most appreciated!!

Here's the code:

<trial middleleft_2>
/stimulustimes = [0 = middleleft; 500 = erasemiddleleft]
/correctresponse = ("Z")
/validresponse= ("Z", "/")
/posttrialpause = 2000
/response = timeout(2000)
</trial>

<trial middleleft_3>
/stimulustimes = [0 = middleleft; 500 = erasemiddleleft]
/correctresponse = ("Z")
/validresponse= ("Z", "/")
/posttrialpause = 3000
/response = timeout(2000)
</trial>

<trial middleleft_4>
/stimulustimes = [0 = middleleft; 500 = erasemiddleleft]
/correctresponse = ("Z")
/validresponse= ("Z", "/")
/posttrialpause = 4000
/response = timeout(2000)
</trial>

<trial middleright_2>
/stimulustimes = [0 = middleright; 500 = erasemiddleright]
/correctresponse = ("/")
/validresponse= ("Z", "/")
/posttrialpause = 2000
/response = timeout(2000)
</trial>

<trial middleright_3>
/stimulustimes = [0 = middleright; 500 = erasemiddleright]
/correctresponse = ("/")
/validresponse= ("Z", "/")
/posttrialpause = 3000
/response = timeout(2000)
</trial>

<trial middleright_4>
/stimulustimes = [0 = middleright; 500 = erasemiddleright]
/correctresponse = ("/")
/validresponse= ("Z", "/")
/posttrialpause = 4000
/response = timeout(2000)
</trial>

**Block**

<block FIGHT> 
/trials = [1-5 = noreplace(middleleft_2, middleright_2, middleleft_3, middleright_3, middleleft_4, middleright_4)]
/ bgstim = (Fight)
</block>

<block SIT> 
/trials = [1-5 = noreplace(middleleft_2, middleright_2, middleleft_3, middleright_3, middleleft_4, middleright_4)]
/ bgstim = (Sit)
</block>


Tags
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 am unable to reproduce this on my end. The script records latencies as expected (provided one of the defined response keys was pressed). Q's:

#1: Is your Inquisit installation up to date? You should be using version 4.0.6.0. If not, please obtain the most recent version for your system from https://www.millisecond.com/download

#2: What's recorded in your data file's the 'response' column?

#3: Try specifying keyboard scancodes in your /validresponse and /correctresponse attributes instead of "literal" key values. Does it make any difference?

#4: What's your keyboard layout and specified language?

NatalieM
NatalieM
Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)
Group: Forum Members
Posts: 6, Visits: 28
(1) Yes I am using most up to date version of Inquisit.

(2) In response column when the latency is 2000 it is recorded as 0. Sometimes latencies appear (usually <100ms) and then response is recorded as 1. 

(3) I tried scancodes instead and there was no difference in how data was recorded.

(4) Keyboard is QWERTY layout and language is English. 

Could this be processing speed problem with my computer?

Thanks again!

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 be surprised if this was due to some kind of performance issue. This

> (2) In response column when the latency is 2000 it is recorded as 0.

is the expected behavior, but

> Sometimes latencies appear (usually <100ms) and then response is recorded as 1.

this is not. '1' is not what one should find in the response column -- it should contain the scancode of the respective key. '1' isn't the scancode for either "/" or "Z".

#1: What does Tools -> Keyboard Scancodes... return for "Z" and "/" on your system?
#2: Can you please (a) attach the script and (b) a single data file? You can attach files to threads by selecting the "Attach" button when posting a reply.


NatalieM
NatalieM
Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)
Group: Forum Members
Posts: 6, Visits: 28
Hi Dave,

I've attached my script and a sample of the data from a few pilot runs - today when I ran it a handful of trials were showing up at 2000 rather than most of them.

You are correct, the response column reports the scan codes for either Z or /. The videos were too big to post,but I'm getting similar issues when I run the script without background videos, so I think it is a script issue.

Thanks again!

Attachments
AST3.iqdat (920 views, 2.00 KB)
AST3.iqx (894 views, 2.00 KB)
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
Thanks for attaching the materials. I cannot find any fault with the script or data, but I think there's a chance of a misconception here in terms of when exactly you expect Inquisit to start listening for responses. Let me try to dissect on of your <trial> specifications for you as an example:

<trial middleleft_2>
/stimulustimes = [0 = middleleft; 500 = erasemiddleleft]
/correctresponse = (44)
/validresponse= (44, 53)
/posttrialpause = 2000
/response = timeout(2000)
</trial>

You present two stimuli: middleleft, followed by erasemiddleleft 500ms later. By default, Inquisit will *not* start listening for responses until the entire stimulus presentation sequence specified in /stimulustimes (or /stimulusframes) has finished. Here, Inquisit will only start polling for responses *after* erasemiddleleft has been rendered to the screen. Latency will be measured relative to that point in time. As per the /response attribute, Inquisit will wait a maximum of 2000ms for a key press.

To illustrate, a recorded latency of 100ms means that a key press was detected 100ms *after* the display of erasemiddleleft, or approx. 600ms into the entire <trial>. Latency is relative to erasemiddleleft, *not* the middleleft stimulus.

More importantly, what this means is that *any key presses* occurring prior to erasemiddleleft are ignored. I.e. if you press a key somewhere in the 500ms timeframe between middleleft and erasemiddleleft, it will count as a nonresponse. Inquisit simply isn't yet listening for responses at this point. I think there's a fair chance that this explains the prevalence of nonresponses in your data.

Note that you can override this behavior by specifying a <trial>'s /beginresponsetime attribute accordingly:

<trial middleleft_2>
/stimulustimes = [0 = middleleft; 500 = erasemiddleleft]
/correctresponse = (44)
/validresponse= (44, 53)
/posttrialpause = 2000
/response = timeout(2000)
/beginresponsetime = 0
</trial>

You will find all of this covered in greater detail in the "How to Control Trial Duration and Inter-Trial Intervals" topic in the documentation's "How To"-section.

Hope this helps.

NatalieM
NatalieM
Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)
Group: Forum Members
Posts: 6, Visits: 28
Problem solved! Thank-you
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search