Randomising the Fixation duration

4,512 views
Skip to first unread message

Krupa Sheth

unread,
May 31, 2011, 9:33:34 AM5/31/11
to E-Prime
Hi! I been totally baffled by this and I am sure there is a way where
to over come this.

Is there any function in E-Prime that allows the fixation point ("+")
to appear for a random duration between 1500ms to 3500ms. I am sure it
is possible but am so clueless how to do it.

Many Thanks!!

Michiel Spape

unread,
May 31, 2011, 10:26:34 AM5/31/11
to e-p...@googlegroups.com
It's actually somewhere in the E-Primer: http://www.cognitology.eu/pubs/AnE-Primer2009.pdf as an example of what to do with line-in stuff... I suggest going through the last 2 chapters, or earlier.
But, then again, if you have a textdisplay showing just a +, called FixationDisplay, and a short inline before that: FixationDisplay.Duration = Random(1500,3500) - you're done.
Best,
Mich

Michiel Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology
www.cognitology.eu

Many Thanks!!

--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.

This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

David McFarlane

unread,
May 31, 2011, 10:56:58 AM5/31/11
to e-p...@googlegroups.com
Stock reminder: 1) I do not work for PST. 2)
PST's trained staff takes any and all questions
at
http://support.pstnet.com/e%2Dprime/support/login.asp
, and they strive to respond to all requests in
24-48 hours -- this is pretty much their
substitute for proper documentation, so make full
use of it. 3) If you do get an answer from PST
Web Support, please extend the courtesy of
posting their reply back here for the sake of others.

That said, here is my take...

First, I agree that you would do well to work
through Mich's E-Primer, as well as the Getting
Started and User's Guides that came with E-Prime.

Now, the inline code method allows you to easily
randomize down to the ms, and without using
attribute references. OTOH, the lack of an
attribute reference means that the data log
contains no record of the randomized fixation
duration. So I would modify Mich's example as follows:

c.SetAttrib "FixDur", Random(1500,3500)

Then, in my fixation object, I would set Duration to "[FixDur]". Done.

But if you don't mind (or even prefer) a coarser
grain (say, 1500 - 3500 ms in steps of 100 ms)
then you can accomplish this without any inline
code. Just use a List, or perhaps a nested List,
to hold all the possible fixation durations, and
set the List Selection to Random. Suppose we
call that attribute (i.e., column)
"FixDur". Then, as before, in your fixation
object set Duration to "[FixDur]". Done. (For
more on nested Lists in particular, see Appendix
C of the User's Guide that came with E-Prime.)

-- David McFarlane, Professional Faultfinder

Krupa Sheth

unread,
May 31, 2011, 11:23:07 AM5/31/11
to E-Prime
Thanks all for the very useful advice.

I tried to follow Michiel's inline line of thought using her code
suffix but it was coming to an E-Prime error. After having tried that
provided by David; it worked.. i even checked it out on the E-DataAid
file and all fixation durations were randomised... HALLELUJAH!!

Thanks so much. I really appreciate it :)

Best wishes,

Krupa
Research Associate
Cerebra Centre of Neurodevelopmental Disorders
University of Birmingham
Edgbaston
B15 2TT

On May 31, 3:56 pm, David McFarlane <mcfar...@msu.edu> wrote:
> Stock reminder:  1) I do not work for PST.  2)
> PST's trained staff takes any and all questions
> athttp://support.pstnet.com/e%2Dprime/support/login.asp

David McFarlane

unread,
May 31, 2011, 11:37:22 AM5/31/11
to e-p...@googlegroups.com
Krupa,

Glad it worked for you. But it bugged me that
Mich's code did not work, so I looked into it
myself. Indeed, when I hurriedly tried it, I got
the compile-time error, 'Left of "." must be an
object, structure, or dialog.' That seemed odd,
I looked more closely and saw that I had misnamed
my TextDisplay as "FixtationDisplay" instead of
"FixationDisplay". Fixed that, and for the
record, Mich's code worked just fine. So I
expect something like that happened to you, very
easy to do. Glad you got it to work in any case,
and posted back with your success.

Michiel Spape

unread,
May 31, 2011, 12:18:28 PM5/31/11
to e-p...@googlegroups.com
Hiya,
There's indeed nothing wrong with the code, but yes, it's more elegant to do David's suggestion, because you're at least sure it's also logged. There is also good reason to do the nested list with Duration, because you're never quite sure whether "random" isn't too random for your purposes. Suppose, for instance, that you constantly show each and every subject really short fixations? That will make an utter mess of your jittering purposes! It's unlikely, but still possible nonetheless - the joy of randomising with replacement. So, indeed, if you have a nice nested list with every random value (you can safely skip a few, because of screen refresh rates), you can be safe in the knowledge that at least you're sure no value is used twice (depending on the length of the list and the number of trials, of course).

Best,
Mich

c.SetAttrib "FixDur", Random(1500,3500)

--

liwenna

unread,
May 31, 2011, 12:46:08 PM5/31/11
to E-Prime
Glad you got it to work, but if you don't mind me asking: why would
you want your fixation cross to have a random duration?

I've seen people ask for this before, but as far as I can see it makes
no sense at all.

The fixation cross serves the purpose of fixating the gaze and warning
that the new trial is too start. It exerts it's attention capturing
'quality' only at it's onset and should therefore appear always about
500 ms prior to the start of the trial, instead of having a random
duration. Especially with a fixation cross as long as 3500 changes are
pretty high that your participant's gaze has wandered elsewhere after
3500 ms when the trial starts, in which case the fixation cross
achieved the exact opposite from what it is intended to do. The cross
intends to indicate the start of the trial to the pp and therefore it
should be predictable in it's duration.

You do want to have a random duration inter trial interval in order to
avoid automation of the timing of the motor response over trials, but
rather use a separate blank slide (inter trial interval slide) with
it's duration set to random in between the response slide and the next
fixation cross (i,e, either at the total end or right at the start of
the trial procedure), instead of randomizing the duration of the
cross.

best,

liw



On May 31, 6:18 pm, Michiel Spape <Michiel.Sp...@nottingham.ac.uk>
wrote:
> Hiya,
> There's indeed nothing wrong with the code, but yes, it's more elegant to do David's suggestion, because you're at least sure it's also logged. There is also good reason to do the nested list with Duration, because you're never quite sure whether "random" isn't too random for your purposes. Suppose, for instance, that you constantly show each and every subject really short fixations? That will make an utter mess of your jittering purposes! It's unlikely, but still possible nonetheless - the joy of randomising with replacement. So, indeed, if you have a nice nested list with every random value (you can safely skip a few, because of screen refresh rates), you can be safe in the knowledge that at least you're sure no value is used twice (depending on the length of the list and the number of trials, of course).
>
> Best,
> Mich
>
> Michiel Spapé
> Research Fellow
> Perception & Action group
> University of Nottingham
> School of Psychologywww.cognitology.eu
>
> Michiel Spapé
> Research Fellow
> Perception & Action group
> University of Nottingham
> School of Psychologywww.cognitology.eu
>
> -----Original Message-----
> From: e-p...@googlegroups.com [mailto:e-p...@googlegroups.com] On Behalf Of David McFarlane
> Sent: 31 May 2011 15:57
> To: e-p...@googlegroups.com
> Subject: RE: Randomising the Fixation duration
>
> Stock reminder:  1) I do not work for PST.  2)
> PST's trained staff takes any and all questions
> athttp://support.pstnet.com/e%2Dprime/support/login.asp
> For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en.

Michiel Spape

unread,
May 31, 2011, 1:03:31 PM5/31/11
to e-p...@googlegroups.com
Hiya,
I can see loads of reasons, but my favourite is the jittering one. That is, if you have a paradigm like fixation(500 ms)-->stimulus(500ms)-->response(500 ms) (I guess this accounts for a lot of them), and you do EEG, then chances are that whatever you measure as peaks after stimulus (say, an N1), are actually not in the 100 ms after stimulus, but 600 ms after the onset of your fixation. By blurring the duration of your fixation, you'd blur the peak, which can - if adequately done - result in a flat-line. Other reasons I'll leave for others (e.g. I get a lot of anticipation responses if I do not randomise the fixation at least somewhat) - nice question anyway, it's good to sometimes discuss more theoretical issues here!
Best,
Michiel

best,

liw

For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.

Krupa Sheth

unread,
Jun 1, 2011, 6:33:36 AM6/1/11
to E-Prime
Hi!

We are also using this experiment to assess for inhibition in children
with neurodevelopmental disorders (we used the anti-saccade task).
Therefore by randomising the fixation duration it allows a) to ensure
that their gaze is constantly at the centre of the screen ensuring
that study participants are motivated and attentive throughout the
testing session and more importantly b) prevents participants from
utilizing any anticipatory strategies while executing the task.

Hope this answers your question.

--
Best Wishes,

Krupa Sheth
Research Associate
Cerebra Centre of Neurodevelopmental Disorders
University of Birmingham
Edgbaston
B15 2TT

liwenna

unread,
Jun 9, 2011, 4:33:47 AM6/9/11
to E-Prime
Hi all,

I ment to react back for a while but kept forgetting. I stand
corrected on the use of randomizing fixation durations, I forgot the
ERP rationale that Michiel explained.

Still for the use that Krupa described I'd say that a 3500 ms cross
defies it's own purpose and in such a design I would give a larger
range of durations to a blank intertrialinterval display and a smaller
durations range to the cross.

David and Miciel, also thanks for pointing out the drawbacks of using
the random(value,value) inline.

I like it when such discussions arise.

Best,

AW

Mackenzie Leavitt

unread,
Sep 11, 2018, 3:51:31 PM9/11/18
to E-Prime
Hi David,

I have the opposite problem of the poster here. I have a trial procedure which includes a fixation display, and then an image. The procedure repeats until all the images have been displayed. However, I want the fixation display to be up for different times on each trial, but I do not want that to be random. How would I program different fixation times in the same procedure  in a way that is not random?

David McFarlane

unread,
Sep 11, 2018, 5:08:26 PM9/11/18
to e-p...@googlegroups.com
MacKenzie ,

You would do very much like what is described here -- use an attribute
reference for the Duration of your fixation, and use a nested List for
the fixation durations, but in your case set selection to Sequential
instead of Random.

-- David McFarlane


On 2018-09-11 3:51 PM, Mackenzie Leavitt wrote:
> Hi David,
>
> I have the opposite problem of the poster here. I have a trial procedure
> which includes a fixation display, and then an image. The procedure repeats
> until all the images have been displayed. However, I want the fixation
> display to be up for different times on each trial, but I do not want that
> to be random. How would I program different fixation times in the same
> procedure in a way that is not random?
>
>
> On Tuesday, May 31, 2011 at 7:56:58 AM UTC-7, David McFarlane wrote:
>>
>> Stock reminder: 1) I do not work for PST. 2)
>> PST's trained staff takes any and all questions
>> at
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__support.pstnet.com_e-252Dprime_support_login.asp&d=DwIFaQ&c=nE__W8dFE-shTxStwXtp0A&r=rVCe0bDlnqQHHAg2cizkHg&m=5veoG6PsYYCVDIjRMgDaQiiJ_bCEoushKIlvsbGANcI&s=-KrWHceVhNq50fOg3ufL74m_urutdg81vEldz4lysuI&e=
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.cognitology.eu_pubs_AnE-2DPrimer2009.pdf&d=DwIFaQ&c=nE__W8dFE-shTxStwXtp0A&r=rVCe0bDlnqQHHAg2cizkHg&m=5veoG6PsYYCVDIjRMgDaQiiJ_bCEoushKIlvsbGANcI&s=sJ_CUrfldiMV3Iq1PAk2uocQTDVTnQyQGzhpcWcnagY&e=

Mackenzie Leavitt

unread,
Sep 11, 2018, 6:19:54 PM9/11/18
to e-p...@googlegroups.com
Thanks! Just tried out the example as you suggested and it worked brilliantly. 

--
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...@googlegroups.com.

To post to this group, send email to e-p...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages