Sie sind auf Seite 1von 48

An Introduction To

Presentation
MACCS
Outline
Experiment structure
Tabs
SDL and PCL
Script structure:
Settings and setup in your script
Events
PCL, logic and loops

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 2


Experiment Structure
An overall 'Experiment' file
Composed of one or a number of 'Scenario'
files
Scenario files are played in order one after another

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 3


Experiment Structure
Scenario files may be separate SDL and PCL
files – more on this later

Experiment

Scenario 1 (SDL) PCL 1

Scenario 2 (SDL) PCL 2

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 4


Experiment Structure
Or both SDL and PCL can be encompassed in
the one scenario file

Experiment

Scenario 1 (SDL/ PCL)

Scenario 2 (SDL/ PCL)

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 5


Experiment Structure
Depends on personal preference/ style
Having SDL and PCL scripts in the same file
makes it easier for me to edit
Easier to open all you need if all in one file
I tend not to use SDL only as very limited,
therefore will not be covered here

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 6


Tabs

The Experiment file contains tabs to cover all of the


needed components and settings:

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 7


Tabs

The Main tab shows the name of the experiment


and location to place log files, both of which can
be edited in this tab:

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 8


Tabs - Scenarios
The Scenarios tab allows you to add stimulus
directory and scenarios:

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 9


Tabs – Settings (General)
Check 'Wait for return to start scenario':

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 10


Tabs – Settings (Response)
Best to add buttons to 'default', then 'test':

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 11


Tabs – Settings (Video)
Your PC will probably only have one video card
available. This is fine for testing
When you get to either the ERP or MEG lab this will
need to be changed to the 'Radeon' driver
'Current setting' should be fine for most
experiments

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 12


Tabs – Settings (Audio)
'Primary Sound Driver' is the typical setting

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 13


Tabs – Settings (Port)
Port codes in the ERP and MEG labs are sent by
parallel port
Your PC probably won't have a parallel port so you
will need to change these settings in the lab
ask for help
To test and run your script on your own PC, click
'Add'
Select an available port, usually 'COM1'

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 14


Tabs – Settings (Logfiles)
You can typically leave most of these settings
alone
A very useful function is the prompt for Subject ID
When you run the experiment you will see a window in
which to type the subject's ID, and press 'enter'

It's not necessary to adjust any settings in the


'Advanced' tab

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 15


Tabs - Summary
Save your experiment name
Add LOG and STIM folders
Add scenarios
'Wait for return to start scenario'
Add buttons
Add an output port
Select 'Prompt' for Subject ID

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 16


SDL and PCL
Two language styles implemented in Presentation
script

SDL is most useful for:


Implementing initial settings
Loading and preparing stimuli
Creating 'Events'

PCL is most useful for:


Logic functions
Loops
Output files
'Doing the work'

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 17


SDL and PCL

SDL = WHAT

PCL = HOW

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 18


Script Structure - SDL

Settings

Load Stimuli

Arrange Stimuli

Define Events

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 19


Script Structure – SDL - example
Settings example:

ISI
RGB
Sends port codes

Note comments marked


with a “#”

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 20


Settings and Setup
Port code pulse width:

Onset

Pulse width

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 21


Settings and Setup
You can define your own parameters.
Easy to find
Make changes in only one location
Here is the same example with parameter
substitutions:

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 22


Script Structure - SDL

Settings

Load Stimuli

Arrange Stimuli

Define Events

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 23


Load Stimuli
A visual stimulus example:

Can be '.bmp' or '.jpg' Your own shortcut

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 24


Load Stimuli
An auditory stimulus example:

Must be '.wav' file;

up to 8 channels;

8, 16 or 24 bit

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 25


Script Structure - SDL

Settings

Load Stimuli

Arrange Stimuli

Define Events

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 26


Arrange Stimuli
Back to our visual stimulus example...
It can be very useful for easier later reference to
arrange stimuli into arrays:

An array is just a type of LIST

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 27


Arrange Stimuli
Instead of having to call up the right filename,
simply call the next item in the appropriate array
Can also call up an item based on it's reference
number in the array
Especially useful for randomisation

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 28


Script Structure - SDL

Settings

Load Stimuli

Arrange Stimuli

Define Events

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 29


Define Events
Example including response dependent trials:
“Some text”

Picture within an
event within a trial
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 30
Define Events
Note that you don't need a separate trial for each
stimulus or stimulus type:

This trial includes response


Duration may commands – only button 1 is
be left as correct
default, be
some other
fixed length, or
depend on
response

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 31


Define Events
We use a photodetector in the MEG lab for greater
timing accuracy
It detects a white box presented in the corner of
the screen
You should include a white box for any stimulus
presentation that also has a port code
Just add this box
command to
appropriate trials,
as well as the
“$VISTRIG...”
parameters to the
top of the script.
We will ensure it
works correctly in
the lab

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 32


SDL - Summary
Provides settings, stimulus loading and
arrangement, and events or trials
“#” can be used for comments, or to
temporarily remove lines
Custom parameters can be used (“$ABC...”)
Useful to arrange stimuli into arrays
Stimulus commands are arranged within
events, which are arranged within trials
You don't need a separate trial for each
stimulus or even each stimulus group
Add 'box' command for MEG experiments

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 33


PCL
If you include PCL in the Scenario file, you must use
the “begin_pcl” command
Open an output port in order to send port codes
Include a command to automatically name your
logfile so it doesn't get lost

You can use “#” as


a line break or box

If you keep your PCL separate, tell the scenario file about it in the
header:

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 34


PCL, Logic and Loops
In this example, we will present each image twice,
in random order
A good way to accomplish this is to use an array,
with index numbers representing categories
Note that in PCL, many commands are in the form
“name.command(settings)” (“sequenceA” is a
name, not a command)
We're filling an array with 8 ones and 8 twos. The
remaining 8 will be zeros
“shuffle()” randomises the array

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 35


PCL, Logic and Loops

Increment
Start item
End item First number

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 36


A Word About Randomisation
When you use random functions, you don't always
get what you expect – i.e. Clumping
You generally won't get all your items shown about
the same number of times
You will therefore generally
want to constrain the
random!
Here we have arrays of ones,
twos threes and fours serving
as indexes for our stimulus
arrays
We can now be sure all our
images will be shown the
same number of times each

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 37


PCL, Logic and Loops
We're ready to commence the main task of
presenting stimuli
The introduction screen and fixation cross are
presented easily enough:

Trials are generally presented using loops:

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 38


PCL, Logic and Loops
A typical loop:

The index “i” is only valid inside


the loop

You must increment the index


manually
Has both pros and cons

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 39


PCL, Logic and Loops
Note that new lines and spacing are irrelevant in
Presentation, so this is exactly the same loop:

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 40


PCL, Logic and Loops
We will need more indexes to loop through the arrays for
each category: faces, cars and butterflies

We set the picture to be one of the faces


We give the logfile the description of that face from
the beginning of the script

We tell the port we want “1” to be sent for


faces
We present the face, increment the face
index, and present a fixation cross

“==” means “is equivalent to”


*
*
*
*

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 41


PCL, Logic and Loops
Note the use of “elseif” and “else” statements
Repeat the above procedure using the arrays and indexes
for cars and for butterflies
Note that we want responses to be valid for butterflies, so we
use the trial that includes a target button

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 42


PCL Output File

Stimulus manager

“&&” = “logic and” “||” = “logic or”

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 43


Testing and Debugging

'Analyze' 'Run Scenario'

'Error Box'

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 44


Run Your Experiment

'Run
Experiment'

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 45


Experimental Design Considerations
Repetition
Signal-to-noise-ratio
AT LEAST 60 trials per condition.
Breaks
Happy and comfortable subjects
Tiring

Procedure length
Compromise between ideal number of trials and subject
fatigue

Performance of the conductive gel will decline with time

About two hours or less.

At MEG, maximum block length is 20 min


10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 46
Experimental Design Considerations

Sufficient port codes


Allocate different port codes to each category
Err on the side of excessive port codes
256 in ERP lab, about 16 in MEG lab

Visual offset and ISI


Visual ERP component

Do not overlap with epoch or pre-stimulus (baseline)


interval.

Assuming the allocation of a 200ms baseline interval, and


adding to this the 100ms offset component, you need an
ISI of at least 300ms. Add some more just to be sure!

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 47


Resources
Presentation help file is okay, but confusing
Neurobehavioral Systems forum:
“www.neurobs.com/chatter_box/search”
ERP Lab Server Library:
“\\Currawong\ERP\LIBRARY”

10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 48

Das könnte Ihnen auch gefallen