EPrime - motion stim issues

Paul Groot pfc.groot at gmail.com
Wed Aug 24 19:20:57 UTC 2011


Hi Lisa,

If you enter a numeric (hard coded) value into the duration properties
of the wait1 to wait5 objects, you will indeed get fixed
(non-randomized) intervals. Setting the ordering property of the list
to random has no effect on this. There are several ways to get random
duration values. The easiest way (=without any inline script) is to
create a separate list and add an attribute with the interval values
you would like to use. Set the ordering of this list to random (with
or w/o replacement) and use this list as nested list in your real
trial list. The name of the attribute (i.e. 'FootageInterval') can
then be used to set the duration property in the wait objects. To make
sure EPrime picks a new value from the nested list for each wait
object you will have to use the following syntax for the durations:

[FootageInterval:0]  (for duration Wait1)
[FootageInterval:1]  (for duration Wait2)
etc.

Alternatively you could use a simple inline script at the start of the
trial and use the E-Basic random() function to set durations. (That
would be uniform random w/o replacement.)

Hope this helps
Paul


2011/8/24 Lisa Levinson <lml1934 at gmail.com>:
> Paul-
>
> I have worked out a script that seems to run properly. Rather than use a
> still/jpeg file between motion files I added a "wait" slide. So, my gradient
> runs for 100ms and the wait slide follows allowing me to present a
> non-moving image of the gradient for a specified duration. Note: in order
> for the animation to run as a loop I have five motion files, loaded in
> sequence. Here is my next challenge...I need five wait slides between my
> motion files but I would like to randomly assign a duration to those wait
> slides. At the moment I have them set up so that wait1 runs for 1000ms,
> wait2 for 600ms, wait3 for 700ms, wait4 for 800ms and wait5 for 900ms. This
> list is set for random but I am not exactly sure what I am getting. Do you
> think wait1 will always run at 1000ms, wait 2 for 600ms, etc?
>
> Lisa
>
> On Thu, Aug 18, 2011 at 7:04 PM, Paul Groot <pfc.groot at gmail.com> wrote:
>>
>> Hi Lisa,
>>
>> It looks like this 'hybrid' movie/still solution is causing more
>> problems than it solves. Like Presentation, you probably would like to
>> use some script to create/present the graphics. Unfortunately, E-Basic
>> only has limited support for creating graphics on the fly (text,
>> lines, rectangles and ellipses), and I'm not sure if your stimuli
>> could be drawn by those primitives. However, pre-created static
>> bitmaps (as movies) can be a workaround for painting more complex
>> graphics objects. Programming moving objects is not extremely
>> difficult, and if I remember correctly, there is an example available
>> on the pst support site
>> (http://www.pstnet.com/support/samples.asp?Mode=View&SampleID=8)  When
>> the graphics objects themself change, you might run into difficulties
>> when the computer hardware cannot keep up with the number of required
>> bitmaps and desired frame rate. Using movies will probably the only
>> working solution in that case. I think I would include the ISI's in
>> the movie so it becomes a single file that can be played without
>> interruption. ISI durations cannot be set at runtime this way, unless
>> you use the technique described below.
>>
>> In some cases is also possible to use an external (DLL) library to
>> create complex stimuli at run time (gabor patches, gradient fills,
>> ...). Such an external library could be used to create bitmaps or
>> movies on the fly, which then can be loaded by eprime.  However, this
>> requires in-depth knowledge of a programming language such as C++
>> because such a specific library probably doesn't exist yet.  I used
>> this technique before to create audio files and complex bitmap
>> sequences. (If you have EPrime version 1, you might have a look at the
>> attached example. This will display a changing ellipse with a gradient
>> fill that can be defined at runtime in EPrime)
>>
>> Best,
>> Paul
>>
>> 2011/8/18 Lisa Levinson <lml1934 at gmail.com>:
>> > Yes, Presentation is better for this type of experiment, however, the
>> > Presentation script was generated in a different lab and the lab I am
>> > working in is not set up to use Presentation (requires a serial port
>> > connection for which we have had issues with timing). So, you are 100%
>> > correct, I have been jumping through complicated hoops for more time
>> > than I
>> > will admit and while I have made progress the motion stim for this
>> > experiment is just crazy difficult to figure out. Today I was going to
>> > attempt to increase the duration of stimulus presentation to see if it
>> > is a
>> > loading issue. Will let you know but any thoughts would be greatly
>> > appreciated.
>> >
>> >
>> > On Thu, Aug 18, 2011 at 1:26 PM, David McFarlane <mcfarla9 at msu.edu>
>> > wrote:
>> >>
>> >> Lisa,
>> >>
>> >> OK, I will ask the obvious dumb question.  If you already have a
>> >> program
>> >> that works in Presentation, why would you want to recreate it in
>> >> E-Prime?
>> >>  Although in principle E-Prime should be able to handle this, it may
>> >> require
>> >> jumping through a lot of complicated hoops, and it seems to me that
>> >> Presentation makes a better platform for this type of task.
>> >>
>> >> -- David McFarlane, Professional Faultfinder
>> >>
>> >>
>> >> At 8/16/2011 11:24 PM Tuesday, you wrote:
>> >>>
>> >>> I am looking to replicate an experiment originally created in
>> >>> Presentation for use with EPrime, part of an EEG experiment. The
>> >>> original
>> >>> experiment used that software’s programming language to create a color
>> >>> and
>> >>> motion stimulus that allowed the researchers to compare the
>> >>> parvocellular
>> >>> and magnocellular visual pathways. I do not know EBasic and so I have
>> >>> created the color stim in Photoshop and imported the image as a slide.
>> >>> While
>> >>> I am not able to control luminance it appears very close to the
>> >>> original.
>> >>> The motion stim is proving much more complicated. I created a
>> >>> vertically
>> >>> oriented sinusoidal spatial frequency grating as an animation file in
>> >>> Final
>> >>> Cut (editing software) and have been struggling ever since to make it
>> >>> work
>> >>> as intended.
>> >>>
>> >>> The experiment calls for a low frequency grating to traverse from left
>> >>> to
>> >>> right for 100ms with inter-stimulus intervals anywhere from 500 ms to
>> >>> 1000ms. Because the stimulus presentation is so short I don’t seem to
>> >>> be
>> >>> able to use the video start/stop feature; additionally, randomizing
>> >>> the ISI
>> >>> is not possible using this feature. I determined that one cycle of the
>> >>> animation sequence is 31 frames and with a 60 frame per second
>> >>> animation
>> >>> that means that I have 10 six frame sets per second (each set 100ms).
>> >>> I then
>> >>> created 6 frame .avi files and loaded them sequentially. Because the
>> >>> experiment calls for 320 trials I had the choice to load 320 files or
>> >>> create
>> >>> a loop with 5 six frame sets, I opted for the loop. To allow for the
>> >>> randomized ISI intervals I created jpeg files containing the final
>> >>> frame of
>> >>> each set and then finished the sequence with my one remaining frame (5
>> >>> six
>> >>> frame sets plus one final still, making 31 frames).
>> >>>
>> >>> After loading the movie/still files (sequentially) it seems that even
>> >>> though the stills(jpegs) were captured from the animation frames they
>> >>> are
>> >>> not similar in size, so I have an inconsistency there – issue one. The
>> >>> other
>> >>> issue is that the two images (movie/still) overlap rather than
>> >>> following in
>> >>> sequence. One appears inside the other and the error message I get
>> >>> once I
>> >>> abort is “unable to update frame.” I did eliminate the 500ms ISI but
>> >>> that
>> >>> has not helped. I also tried to eliminated the jpeg files but then I
>> >>> can
>> >>> only randomize the duration of the motion which should be consistent
>> >>> at
>> >>> 100ms intervals. It is the time between presentations that should
>> >>> randomly
>> >>> fall within 500 to 100ms.
>> >>>
>> >>> I am at a complete loss as to what to try next. HELP!
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "E-Prime" group.
>> >> To post to this group, send email to e-prime at googlegroups.com.
>> >> To unsubscribe from this group, send email to
>> >> e-prime+unsubscribe at googlegroups.com.
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/e-prime?hl=en.
>> >>
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "E-Prime" group.
>> > To post to this group, send email to e-prime at googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > e-prime+unsubscribe at googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/e-prime?hl=en.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "E-Prime" group.
>> To post to this group, send email to e-prime at googlegroups.com.
>> To unsubscribe from this group, send email to
>> e-prime+unsubscribe at googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/e-prime?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "E-Prime" group.
> To post to this group, send email to e-prime at googlegroups.com.
> To unsubscribe from this group, send email to
> e-prime+unsubscribe at googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/e-prime?hl=en.
>

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



More information about the Eprime mailing list