millisecond timing precision


Author
Message
nrouhani
nrouhani
Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)
Group: Forum Members
Posts: 83, Visits: 261
hello, 

i am running an fMRI study that needs very precise timing information. i understand that the timestamps don't have mililseconds, and i've tried to use a combination of timestamps at the beginning of each trial and elapsed time during each trial to get more precise timing information. i'm noticing that the numbers aren't adding up, the difference in timestamps from start to finish do not match the sum of trial's elapsed time (and for many trials the elapsed time is below the minimum trial duration). below, i have listed 4 specific examples of what elapsed time measures i would like to be able to record. 

(1) how do i record elapsed time for the posttrialpause below? (i.e., would like elapsed time that reflects the below trial duration)
<openended estimate_nat>
/ ontrialbegin = [values.trialtimestamp = script.currenttime]
/ position = (50, 50)
/ buttonlabel = "please enter estimate"
/ fontstyle = ("Arial",20)
/ inputdevice = keyboard
/ validresponse = (noresponse)
/ stimulustimes = [0=sceneStim_current, estimateQ, leftHand, rightHand]
/ linelength = 3
/ range = (0,100)
/ mask = positiveintegerorzero
/ numlines = 1
/ responsefontstyle = ("Arial",80)
/ posttrialpause = 2000
/ trialduration = 5000
/ ontrialend = [values.trialelapsedtime = trial.estimate_nat.elapsedtime]
/ branch = [
trial.outcome_nat
]

(2) relatedly, would it be possible to have elapsed timing information for the entire trial (reflecting trial duration) and not just after the response?
<trial memStims_art_A_y_T>
/ ontrialbegin = [
  values.artSample = list.memList_imageSelect_art_A_y.nextvalue;
  values.trialtimestamp = script.currenttime;
]
/ stimulustimes = [0=blank, artP; 3000=newOld, memScale, mem_leftHand, mem_rightHand]
/ validresponse = ("0","1","2","3","4","5","6","7","8","9")
/ beginresponsetime = 3000
/ trialduration = 5000 
/ ontrialend = [values.trialelapsedtime = trial.memStims_art_A_y_T.elapsedtime]
/ branch = [
trial.mem_iti
]
</trial>

(3) this trial waits for a pretrial signal, i would like the elapsed time to reflect the time after the pretrialsignal is sent (it currently records time for the whole trial, including the time before the signal is detected).
<trial new_memBlock>
/ ontrialbegin = [values.trialtimestamp = script.currenttime]
/ stimulustimes = [0=blank,cross]
/ trialduration = 6000
/ validresponse = (noresponse)
/ pretrialsignal = (keyboard,13)
/ ontrialend = [values.trialelapsedtime = trial.new_memBlock.elapsedtime]
</trial>

(4) is there a way to record elapsed time between trials?

thank you so much, i understand this is tedious!!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
nrouhani - 2 Years Ago
Dave - 2 Years Ago
nrouhani - 2 Years Ago
Dave - 2 Years Ago
nrouhani - 2 Years Ago
                         So what the /pretrialsignal delays is mainly the start of the stimulus...
Dave - 2 Years Ago
                             thank you so much, this really helps!!
nrouhani - 2 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search