Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Generated by OpenSesame 2.8.0~pre11 (Gutsy Gibson)
- # Sun Nov 02 14:18:14 2014 (nt)
- # <http://www.cogsci.nl/opensesame>
- set mouse_backend "psycho"
- set subject_parity "even"
- set height "768"
- set font_family "mono"
- set font_italic "no"
- set synth_backend "legacy"
- set title "RDM"
- set coordinates "relative"
- set start "experiment"
- set sampler_backend "legacy"
- set transparent_variables "no"
- set foreground "white"
- set font_bold "no"
- set description "Default description"
- set background "black"
- set font_size "18"
- set keyboard_backend "psycho"
- set canvas_backend "psycho"
- set compensation "0"
- set bidi "yes"
- set subject_nr "0"
- set width "1024"
- define loop accuracy_loop
- set repeat "150"
- set description "Repeatedly runs another item"
- set item "accuracy_sequence"
- set column_order "coher;dir"
- set cycles "4"
- set order "random"
- setcycle 0 dir "0"
- setcycle 0 coher ".05"
- setcycle 1 dir "0"
- setcycle 1 coher ".15"
- setcycle 2 dir "180"
- setcycle 2 coher ".05"
- setcycle 3 dir "180"
- setcycle 3 coher ".15"
- run accuracy_sequence
- define sketchpad speed_insructions
- set duration "keypress"
- set description "Displays stimuli"
- draw image 0 0 "3.png" scale=1 center=1 show_if="always"
- draw image 0 0 "speed instructions.png" scale=1 center=1 show_if="always"
- define sequence accuracy_sequence
- set flush_keyboard "yes"
- set description "Runs a number of items in sequence"
- run fixation "always"
- run inline_script "always"
- run feedback_mistake "[correct]=0"
- run blank "always"
- run delay250 "always"
- run brake "[count_exp_sequence]%50=49"
- run logger "always"
- define sketchpad blank
- set duration "250"
- set description "Displays stimuli"
- define sequence measurment_sequence
- set flush_keyboard "yes"
- set description "Runs a number of items in sequence"
- run fixation "always"
- run inline_script "always"
- run feedback_mistake "[correct]=0"
- run blank "always"
- run delay250 "always"
- run logger "always"
- define sketchpad accuracy_instruction
- set duration "keypress"
- set description "Displays stimuli"
- draw image 0 0 "2slow.png" scale=1 center=1 show_if="always"
- draw image 0 0 "accuracy instructions.png" scale=1 center=1 show_if="always"
- define sketchpad end
- set duration "keypress"
- set description "Displays stimuli"
- draw image 0 0 "end.png" scale=1 center=1 show_if="always"
- define sketchpad practice_instructions
- set duration "keypress"
- set description "Displays stimuli"
- draw image 0 0 "0.png" scale=1 center=1 show_if="always"
- draw image 0 0 "practice instructions.png" scale=1 center=1 show_if="always"
- define advanced_delay delay250
- set duration "250"
- set jitter "0"
- set description "Waits for a specified duration"
- set jitter_mode "Std. Dev."
- define feedback feedback_slow
- set duration "250"
- set reset_variables "yes"
- set description "Provides feedback to the participant"
- draw textline 0 0 "לאט מדיי" center=1 color=white font_family="mono" font_size=45 font_italic=no font_bold=no show_if="always" html="yes"
- define sequence experiment
- run practice_instructions "always"
- run practice_loop "always"
- run measurment_instrucrions "always"
- run measurment_loop "always"
- run accuracy_instruction "always"
- run accuracy_loop "[subject_parity]=odd"
- run speed_loop "[subject_parity]=even"
- run speed_insructions "always"
- run accuracy_loop "[subject_parity]=even"
- run speed_loop "[subject_parity]=odd"
- run end "always"
- define logger logger
- set description "Logs experimental data"
- define loop measurment_loop
- set repeat "8"
- set description "Repeatedly runs another item"
- set item "measurment_sequence"
- set column_order "coher;dir"
- set cycles "4"
- set order "random"
- setcycle 0 coher ".05"
- setcycle 0 dir "0"
- setcycle 1 coher ".15"
- setcycle 1 dir "0"
- setcycle 2 coher ".05"
- setcycle 2 dir "180"
- setcycle 3 coher ".15"
- setcycle 3 dir "180"
- run measurment_sequence
- define loop practice_loop
- set repeat "1"
- set description "Repeatedly runs another item"
- set skip "0"
- set item "practice_sequence"
- set break_if "never"
- set column_order "coher;dir"
- set cycles "4"
- set order "sequential"
- setcycle 0 coher ".5"
- setcycle 0 dir "0"
- setcycle 1 coher ".5"
- setcycle 1 dir "180"
- setcycle 2 coher "1"
- setcycle 2 dir "0"
- setcycle 3 coher "1"
- setcycle 3 dir "180"
- run practice_sequence
- define feedback feedback_mistake
- set duration "250"
- set reset_variables "yes"
- set description "Provides feedback to the participant"
- draw textline 0 0 "טעות" center=1 color=white font_family="mono" font_size=45 font_italic=no font_bold=no show_if="[correct]=0" html="yes"
- define fixation_dot fixation
- set foreground "white"
- set style "cross"
- set description "Presents a central fixation dot with a choice of various styles"
- set duration "300"
- set background "black"
- set y "0"
- set x "0"
- set penwidth "3"
- define sequence speed_sequence
- set flush_keyboard "yes"
- set description "Runs a number of items in sequence"
- run fixation "always"
- run inline_script "always"
- run feedback_mistake "[correct]=0"
- run feedback_slow " [response_time]>[avg_rt] and [correct]=1"
- run blank "always"
- run delay250 "always"
- run brake "[count_exp_sequence]%50=49"
- run logger "always"
- define sequence practice_sequence
- set flush_keyboard "yes"
- set description "Runs a number of items in sequence"
- run fixation "always"
- run inline_script "always"
- run feedback_mistake "[correct]=0"
- run blank "always"
- run delay250 "always"
- run logger "always"
- define inline_script inline_script
- ___run__
- from psychopy.visual import DotStim
- from psychopy import event
- from openexp.keyboard import keyboard
- # Create a DotStim, which is automatically updated with every `draw()` call.
- ds = DotStim(win, fieldSize=900, speed=4, dotLife=22, nDots=300, coherence= \
- self.get('coher'),dotSize=1.0,signalDots='different',dir=self.get('dir'), \
- noiseDots='walk')
- t0 = self.time()
- if self.get('dir')==0:
- exp.set('correct_response','l')
- else:
- exp.set('correct_response','s')
- for i in range(500):
- ds.draw()
- win.flip()
- keys = event.getKeys(keyList=['s', 'l'])
- if keys != []:
- t1 = self.time()
- response = keys[0]
- response_time = t1 - t0
- exp.set('response', response)
- exp.set('response_time', response_time)
- if self.get('response')==self.get('correct_response'):
- exp.set('correct',1)
- else:
- exp.set('correct',0)
- break
- __end__
- set _prepare ""
- set description "Executes Python code"
- define loop speed_loop
- set repeat "150"
- set description "Repeatedly runs another item"
- set item "speed_sequence"
- set column_order "coher;dir"
- set cycles "4"
- set order "random"
- setcycle 0 dir "0"
- setcycle 0 coher ".05"
- setcycle 1 dir "0"
- setcycle 1 coher ".15"
- setcycle 2 dir "180"
- setcycle 2 coher ".05"
- setcycle 3 dir "180"
- setcycle 3 coher ".15"
- run speed_sequence
- define sketchpad brake
- define sketchpad measurment_instrucrions
- set duration "keypress"
- set description "Displays stimuli"
- draw image 0 0 "1.png" scale=1 center=1 show_if="always"
- draw image 0 0 "measurment instructions.png" scale=1 center=1 show_if="always"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement