14.07.2013 Views

E-Prime software:

E-Prime software:

E-Prime software:

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

E-<strong>Prime</strong> <strong>software</strong>:<br />

A “stimulating” introduction<br />

Caitlin M. Hudac<br />

Developmental Brain Laboratory<br />

January 2012


What is E-<strong>Prime</strong>?<br />

• Made by Psychology Software Tools (PST)<br />

• E-<strong>Prime</strong> is an object-oriented programming language.


What is E-<strong>Prime</strong>?<br />

• E-<strong>Prime</strong> 1 – cannot display videos<br />

• E-<strong>Prime</strong> 2 – current version. Can open E-<strong>Prime</strong> 1 files and<br />

upgrade to EP2 format.<br />

• Normally requires a dongle (license) Site license runs<br />

without a dongle!


What is E-<strong>Prime</strong>?<br />

• Error message<br />

indicates that the<br />

license is not being<br />

read (no dongle or site<br />

license recognized).<br />

• Possible to still work in<br />

E-Studio but only can<br />

only save a few times.


E-Studio vs. E-Run<br />

• E-Studio is the Guided User Interface (GUI or ‘gooey’) to<br />

build scripts.<br />

• File extension = .es (E-<strong>Prime</strong> 1) or .es2 (E-<strong>Prime</strong> 2)<br />

• E-Run is a way to run any script without needing to open<br />

E-Studio.<br />

• Need to have generated the script in E-Studio (see last few slides)<br />

• Usually does NOT require any license<br />

• File extension = .ebs (EP1) or .ebs2 (EP2)


Process of building an E-<strong>Prime</strong><br />

experiment that interacts with NetStation<br />

1. Outline your experiment!<br />

2. Read E-<strong>Prime</strong> manual.<br />

3. Build script without NetStation calls.<br />

4. Read E-<strong>Prime</strong> Extensions for Netstation manual.<br />

5. Add in NetStation calls. Needs to be done at our<br />

laboratory.<br />

6. Video tutorials will be available on our website.


Object vs. Attributes<br />

• Objects are things that “happen” in the script. These get<br />

ordered into a script as part of the Structure Tree.<br />

• Attributes are defined variables. Examples:<br />

• Background color of a slide<br />

• Slide states<br />

• Trial number<br />

• Both objects and attributes need to be established<br />

BEFORE the script tries to call it.


Hierarchies<br />

• Session Procedure<br />

• Text: “Welcome to the experiment”<br />

• Set Trial Number = 1<br />

• Looped procedure (x20)<br />

• Trial Number = Trial Number + 1<br />

• Display Trial Number and play sound /ba/<br />

• Text: “Thank you, goodbye!”<br />

1<br />

2<br />

3<br />

20 times


The main stage<br />

Objects<br />

The<br />

Structure<br />

Tree<br />

Properties<br />

Box<br />

Workspace


The main stage<br />

New..<br />

Open..<br />

Save..<br />

Check the overall<br />

experiment<br />

properties<br />

Run the<br />

script<br />

Generate<br />

the script


Objects to use<br />

Image (bmp format<br />

only)<br />

User-created “in-line”<br />

code<br />

Marks a “Go To”<br />

location in the<br />

Structure Tree<br />

The “main” structure of<br />

the Structure Tree<br />

Movie (.avi or .mp4)<br />

How E-<strong>Prime</strong> interacts<br />

with external<br />

packages, like<br />

NetStation<br />

Any combination of<br />

other objects<br />

A “ready-made” way to<br />

display a participants<br />

accuracy, response time,<br />

etc.<br />

Record sounds being<br />

produced<br />

Sound file (.wav)<br />

Text<br />

A way to pause the<br />

experiment


Image object<br />

If you enter<br />

“image.bmp” then E-<br />

<strong>Prime</strong> will look in the<br />

folder directory where<br />

the .es2 file is save.<br />

Otherwise, you can<br />

browse for the<br />

directory.


Movie object


Slide object Indicates which object is active<br />

Objects that<br />

can be used<br />

Slide State


Slide object – Slide states<br />

Slide state<br />

Add new slide<br />

state


Slide object Objects that are in the slide<br />

Bring objects<br />

forward or<br />

backwards


Slide object – Slide properties


Slide object – Sub-object properties


Slide object – Slide states<br />

Slide state<br />

Add, delete,<br />

or duplicate a<br />

slide state


Slide object – Slide states<br />

Slide state


Slide object – Slide states<br />

The slide state can be<br />

dependent on the user<br />

response.<br />

In this example, prior to the<br />

slides DeckChosen and<br />

DeckPayoff, the slide state<br />

was set based off the deck<br />

selection (A = 1).


Sound out object<br />

Note: Sound out<br />

objects are only<br />

the Properties<br />

menu.<br />

They do not<br />

have a window<br />

that appears in<br />

the Workspace.


Feedback<br />

Feedback objects are basically<br />

“ready-made” slides to display<br />

feedback, such as whether that<br />

answer was correct, the<br />

response time, ongoing<br />

accuracy, etc. These can be<br />

edited, or you can build your<br />

own slide object.<br />

Slide State


Feedback


Feedback<br />

User defines which<br />

statistics are collected<br />

Feedback must be linked to<br />

an object that appeared<br />

previously in procedure.


Feedback<br />

Formatting choices


Lure and In-Line script examples<br />

A B C<br />

A<br />

B<br />

C<br />

This example uses 2 attributes:<br />

Lures<br />

lastWasLure<br />

This example uses 3 labels:<br />

Finish1<br />

Lure1<br />

Go1


Procedures<br />

Green = Start Red = Stop


E-<strong>Prime</strong> example using<br />

NetStation calls – The Oddball


Experiment properties<br />

• Recommended that<br />

you take the time to<br />

write notes in the<br />

General tab.<br />

• Especially helpful as<br />

you make<br />

modifications to<br />

different versions.


Experiment properties<br />

• These are the prompts<br />

that are shown at startup.<br />

• Note: Some are<br />

required to be defined<br />

to start NetStation,<br />

although may not be<br />

necessary to display<br />

them.


Experiment properties<br />

Attribute name<br />

Options include<br />

Numeric, Choice,<br />

String


Experiment properties<br />

• Make sure these are<br />

checked if you need to<br />

use them.<br />

• The SRBOX is the<br />

response pad.


Experiment properties


Experiment properties<br />

• Any 3 rd party<br />

communication (like<br />

with NetStation) should<br />

be an approved<br />

package.<br />

• Often when you are<br />

working with tech<br />

support they will need<br />

to know the version of<br />

the package.


Object properties Object properties


Object properties<br />

Attributes<br />

• Text object: You can<br />

type in the general<br />

box, change the<br />

alignment, colors, etc.


Object properties<br />

• Most objects also have<br />

frames. You can use %<br />

or pixels.<br />

• To create a border<br />

around the object,<br />

change the width from<br />

0 to a different number<br />

(e.g. 20 for a thick<br />

border).


Object properties<br />

• Font options


Object properties<br />

EEG testing should be run in<br />

Event mode.<br />

Any devices needed during<br />

the display of that object<br />

should be listed here<br />

Terminate or<br />

Jump to<br />

Allowable: Any character that<br />

can be used during the object.<br />

Correct: What the correct<br />

answer should be. This is<br />

important if you are basing any<br />

of the script off of user response<br />

or marking the EEG file with<br />

correct/incorrect response.<br />

Tip – use [CorrectAns] here that<br />

calls back to an attribute in the<br />

List.


Object properties<br />

• You can custom select<br />

any options you’d like<br />

or use a pre-set on the<br />

Duration/Input tab.<br />

• Anything selected will<br />

be printed and saved<br />

for THAT OBJECT<br />

onto the E-Data file<br />

(.edat)


Lists<br />

List<br />

New procedure


Practice List<br />

Add multiple rows<br />

(cases) or columns<br />

(Attributes)<br />

Attributes: The name and<br />

case are important. These<br />

become OBJECTS.<br />

You can double-click and<br />

rename if needed.


Practice List<br />

Step 1: Since it is sequential, start with ID=1. Run PracProc using<br />

FrequentTone as Stimulus.<br />

Step 2: TrialBegin object through Pause object.<br />

Step 3: ID=2. Run PracProc using TargetTone as Stimulus.<br />

Step 4: TrialBegin object through Pause object.<br />

Step 5: etc.<br />

Once an ID has been selected, all<br />

attributes will be assigned to the value in<br />

that row.


Practice List<br />

Text surrounded by “[ ]” indicates an<br />

attribute (e.g. OBJECT) as well!<br />

Attributes must be defined prior to<br />

using in the text! Where were these<br />

defined?


Lists


List properties


List properties


Block List


Block Procedure


Trial List Weights: How many times<br />

you repeat a row.<br />

In this example, ID=1 will<br />

be run 70 times.


Trial procedure


Trial procedure


Trial procedure


Trial procedure<br />

Calls to the attribute<br />

Stimulus (retrieves from the<br />

PracticeList).


Trial procedure<br />

Interstimulus interval was previously<br />

defined in ISI object.


Trial procedure


Trial procedure<br />

Because we have this in-line script,<br />

anytime an ID is run, if you press CTRL-<br />

SHIFT during the PracProc, it will pause the<br />

stimulus until CTRL-SHIFT is pressed<br />

again.


Trial procedure<br />

The last object of<br />

BlockProc


Generating the script<br />

This is another way to define attributes.<br />

These are defined even before script is<br />

run.


Generating the script<br />

To generate<br />

the script<br />

This is the full script. If you see this, the<br />

script hasn’t been generated yet –<br />

meaning, no .ebs2 file has been created<br />

and the stimuli cannot be run.


Generating the script<br />

Clicking the running man<br />

will automatically<br />

generate the script and<br />

start the script.


NS Calls: Big mouth, little sandwiches<br />

Start Recording<br />

Practice<br />

Trials<br />

Trial Begin<br />

Stop Recording<br />

Trial End<br />

Trial Begin<br />

Trial End


Adding NetStation calls


Adding NetStation calls


Adding NetStation calls


Adding NetStation calls


Adding NetStation calls


Adding NetStation calls


Adding NetStation calls


Adding NetStation calls


Adding NetStation calls


Adding NetStation calls


Deleting objects


Deleting objects<br />

These objects STILL EXIST! Be careful<br />

or they will come into conflict with other<br />

aspects of the script.<br />

You can delete them again from this<br />

Unreferenced section and then they will<br />

be gone forever.


Deleting Objects


Organization .edat2 =<br />

Data file with response<br />

times, accuracy, etc.<br />

.ebs2 =<br />

E-Run file. Will<br />

automatically run script.<br />

.es2 =<br />

E-Studio file. Open and<br />

edit<br />

.txt =<br />

Can be used to recover<br />

edat’s if the program<br />

stops before the script is<br />

completed.


Organization Tip: Much easier to open<br />

files from within E-Studio<br />

itself!


Organization – E-Recovery<br />

Use the .txt file in E-<br />

Recovery to recover<br />

edat’s if the program<br />

stops before the script is<br />

completed.


Organization – E-Recovery


Organization – E-Recovery


ESSENTIAL LESSONS<br />

• Look for help<br />

• Read the user manual!<br />

• Pull open other people’s scripts<br />

• Examples should be posted on every Center system<br />

• Online forums (PST net, google forums): Probably need to create<br />

an account<br />

• http://www.pstnet.com/forum/<br />

• http://groups.google.com/group/e-prime/<br />

• Ask for help<br />

• David office hours for E-<strong>Prime</strong> =<br />

• Spring 2012: Thursdays, 10am-12pm<br />

• Otherwise, check website for office hours


Questions??

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!