How to limit the list samples OR to a certain time depending on which condition is met first.

Ellie van Setten ellievansetten at gmail.com
Mon Apr 14 08:07:16 UTC 2014


Dear Paul,

Thank you very much for your answer, it works very well!

Best,

Ellie

Op zaterdag 12 april 2014 01:10:44 UTC+2 schreef Paul Groot:
>
> Oops, something went wrong when hitting the tab and enter key, so let me 
> restart:
>
>
> One way of doing this, is to start with storing the trigger time of the 
> scanner in a global variable. You need to declare this variable in the 
> 'User' tab page of the script window:
>
>    Dim lTriggerTime as long
>
> Then, assign the trigger time to this global variable. Assuming you have 
> an object that waits for the trigger signal (say a Text object called 
> WaitForTrigger), you should add an inline script immediately after this 
> object and enter the following:
>
>    lTriggerTime = WaitForTrigger.RTTime
>
> Then, at the end of the trial, add an inline script with the following:
>
>    if Clock.Read>=lTriggerTime+3*60000 then
>      TrialList.Terminate
>    end if
>
> (Assuming the list is called TrialList.) Make sure to set the TrialList 
> properties to stop after 25 trials.
>
> One may argue that it would be easier to put the time limit in the 'Exit 
> List' properties of TrialLIst, and simply keep a trial counter to check for 
> N=25. However, for fMRI analysis it is often very convenient to store all 
> relevant onset and response times as output attributes, which are measured 
> relative to the trigger time. This is easy to do once you have the start 
> time available as global variable. For example, the following script (at 
> the end of the trial) would save the relative onsetttime as StimOnset in 
> the edat file:
>
>    c.SetAttrib "StimOnset", CStr(Stim.OnsetTime - lTriggerTime)
>
> Best,
> Paul
>
>
>
>
>
>
>
>
>
>
>
> On 12 April 2014 00:55, Paul Groot <pfc.... at gmail.com <javascript:>>wrote:
>
>> Hi Ellie,
>>
>> One way of doing this, it to start with storing the trigger time of the 
>> scanner in a global variable. You need to declare this variable in the 
>> 'User' tab page of the script window:
>>
>> Dim lTriggerTime as long
>>
>> Then, assign the trigger time. Assuming you have an object that waits for 
>> the trigger signal (say a Text object called WaitForTrigger), you should 
>> add an inline script immediately after this object and enter the following:
>>
>> lTriggerTime = WaitForTrigger.RTTime
>>
>> Then, at the end of the trial, add an inline script with the following:
>>
>> if Clock.Read>=lTriggerTime+3*60000 then
>>
>>
>>
>>
>> On 11 April 2014 11:39, Ellie van Setten <ellieva... at gmail.com<javascript:>
>> > wrote:
>>
>>> Hi everyone,
>>>
>>> I am doing an fMRI experiment with children with dyslexia and controls. 
>>> They have to perform a rhyming task. Because control children are much 
>>> faster than dyslexic children I would like the response time to be variable 
>>> (because otherwise it would be extremely boring) The problem is that the 
>>> scanner needs to synchronize with the E-prime task after a fixed time (the 
>>> scanner sends a trigger that allows E-prime to go on). My solution would be 
>>> to limit the time the children can spend on the task to three minutes, then 
>>> have a small break with a fixation cross and synchronize and then go to the 
>>> next block. Only for the fast children I would like that they go to the 
>>> break a bit earlier, after 25 trials. So I want to pick 25 samples from my 
>>> task list OR I would like to stop the task and go to the break after three 
>>> minutes. Preferably letting the children finish the trial that was started. 
>>> I have tried using some in-line codes but this did not work. I hope you 
>>> have suggestions how I can solve this problem.
>>>
>>> Best, 
>>>
>>> Ellie
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "E-Prime" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to e-prime+u... at googlegroups.com <javascript:>.
>>> To post to this group, send email to e-p... at googlegroups.com<javascript:>
>>> .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/e-prime/0935c7d7-a869-401c-a34d-46d8e5ba8a41%40googlegroups.com<https://groups.google.com/d/msgid/e-prime/0935c7d7-a869-401c-a34d-46d8e5ba8a41%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/4ade93f2-7dd9-4ec3-a4e8-6148f617a657%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20140414/b9893180/attachment.htm>


More information about the Eprime mailing list