Upload
adnan-jamal
View
446
Download
1
Tags:
Embed Size (px)
Citation preview
An Introduction To PresentationMACCS
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 2
Outline
Experiment structureTabsSDL and PCLScript structure:
Settings and setup in your scriptEventsPCL, logic and loops
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 3
Experiment StructureAn 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 4
Experiment StructureScenario files may be separate SDL and PCL files – more on this later
Experiment
Scenario 1 (SDL)
Scenario 2 (SDL)
PCL 1
PCL 2
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 5
Experiment StructureOr 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 6
Experiment Structure
Depends on personal preference/ styleHaving SDL and PCL scripts in the same file makes it easier for me to editEasier to open all you need if all in one fileI 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 7
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 8
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 9
Tabs - ScenariosThe Scenarios tab allows you to add stimulus directory and scenarios:
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 10
Tabs – Settings (General)Check 'Wait for return to start scenario':
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 11
Tabs – Settings (Response)Best to add buttons to 'default', then 'test':
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 12
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 13
Tabs – Settings (Audio)'Primary Sound Driver' is the typical setting
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 14
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 15
Tabs – Settings (Logfiles)You can typically leave most of these settings alone
A very useful function is the prompt for Subject IDWhen 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 16
Tabs - Summary
Save your experiment nameAdd LOG and STIM foldersAdd scenarios'Wait for return to start scenario'Add buttonsAdd an output portSelect 'Prompt' for Subject ID
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 17
SDL and PCLTwo 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 18
SDL and PCL
SDL = WHAT
PCL = HOW
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 19
Script Structure - SDL
Settings
Load Stimuli
Arrange Stimuli
Define Events
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 20
Script Structure – SDL - exampleSettings example:
ISIRGB
Sends port codes
Note comments marked with a “#”
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 21
Settings and SetupPort code pulse width:
Onset
Pulse width
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 22
Settings and SetupYou 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 23
Script Structure - SDL
Settings
Load Stimuli
Arrange Stimuli
Define Events
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 24
Load StimuliA visual stimulus example:
Your own shortcutCan be '.bmp' or '.jpg'
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 25
Load StimuliAn 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 26
Script Structure - SDL
Settings
Load Stimuli
Arrange Stimuli
Define Events
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 27
Arrange StimuliBack 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 28
Arrange StimuliInstead 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 29
Script Structure - SDL
Settings
Load Stimuli
Arrange Stimuli
Define Events
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 30
Define EventsExample including response dependent trials:
Picture within an event within a trial
“Some text”
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 31
Define EventsNote that you don't need a separate trial for each stimulus or stimulus type:
Duration may be left as default, be some other
fixed length, or depend on response
This trial includes response commands – only button 1 is
correct
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 32
Define EventsWe 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 33
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 34
PCLIf 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 35
PCL, Logic and LoopsIn 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 36
PCL, Logic and Loops
Start itemEnd item First number
Increment
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 37
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 38
PCL, Logic and LoopsWe'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 39
PCL, Logic and LoopsA 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 40
PCL, Logic and LoopsNote 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 41
PCL, Logic and LoopsWe 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
“==” means “is equivalent to”
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 facesWe present the face, increment the face index, and present a fixation cross
****
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 42
PCL, Logic and LoopsNote 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 43
PCL Output File
Stimulus manager
“||” = “logic or”“&&” = “logic and”
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 44
Testing and Debugging
'Analyze'
'Error Box'
'Run Scenario'
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 45
Run Your Experiment
'Run Experiment'
10/16/07 C:\Christopher - MEG\An Introduction To Presentation.odp page 46
Experimental Design Considerations
Repetition Signal-to-noise-ratio
AT LEAST 60 trials per condition.
BreaksHappy 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 47
Experimental Design Considerations
Sufficient port codesAllocate 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 48
Resources
Presentation help file is okay, but confusingNeurobehavioral Systems forum:
“www.neurobs.com/chatter_box/search”
ERP Lab Server Library:“\\Currawong\ERP\LIBRARY”