psychopy 2024.1.3__py3-none-any.whl → 2024.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of psychopy might be problematic. Click here for more details.
- psychopy/.DS_Store +0 -0
- psychopy/CHANGELOG.txt +206 -0
- psychopy/GIT_SHA +1 -0
- psychopy/VERSION +1 -0
- psychopy/__init__.py +77 -15
- psychopy/app/Resources/classic/plugin16.png +0 -0
- psychopy/app/Resources/classic/plugin16@2x.png +0 -0
- psychopy/app/Resources/dark/plugin16.png +0 -0
- psychopy/app/Resources/dark/plugin16@2x.png +0 -0
- psychopy/app/Resources/light/plugin16.png +0 -0
- psychopy/app/Resources/light/plugin16@2x.png +0 -0
- psychopy/app/__init__.py +76 -2
- psychopy/app/_psychopyApp.py +126 -101
- psychopy/app/builder/builder.py +14 -10
- psychopy/app/builder/dialogs/__init__.py +8 -8
- psychopy/app/builder/dialogs/dlgsConditions.py +12 -13
- psychopy/app/builder/dialogs/paramCtrls.py +24 -57
- psychopy/app/builder/localizedStrings.py +11 -9
- psychopy/app/builder/validators.py +2 -2
- psychopy/app/coder/codeEditorBase.py +8 -8
- psychopy/app/coder/coder.py +4 -4
- psychopy/app/connections/sendusage.py +2 -2
- psychopy/app/connections/updates.py +9 -9
- psychopy/app/dialogs.py +34 -2
- psychopy/app/idle.py +31 -0
- psychopy/app/jobs.py +21 -3
- psychopy/app/linuxconfig/__init__.py +9 -0
- psychopy/app/locale/ar_001/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ar_001/LC_MESSAGE/messages.po +4602 -2540
- psychopy/app/locale/es_CO/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_CO/LC_MESSAGE/messages.po +56 -54
- psychopy/app/locale/es_ES/LC_MESSAGE/messages.po +53 -43
- psychopy/app/locale/es_US/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_US/LC_MESSAGE/messages.po +56 -54
- psychopy/app/locale/ja_JP/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ja_JP/LC_MESSAGE/messages.po +1258 -1176
- psychopy/app/locale/pt_PT/LC_MESSAGE/messages.po +9415 -5
- psychopy/app/pavlovia_ui/_base.py +33 -3
- psychopy/app/pavlovia_ui/search.py +0 -1
- psychopy/app/plugin_manager/dialog.py +104 -51
- psychopy/app/plugin_manager/packages.py +5 -0
- psychopy/app/plugin_manager/plugins.py +152 -67
- psychopy/app/preferencesDlg.py +8 -8
- psychopy/app/psychopyApp.py +11 -5
- psychopy/app/ribbon.py +124 -14
- psychopy/app/runner/runner.py +6 -1
- psychopy/app/stdout/stdOutRich.py +27 -11
- psychopy/app/themes/icons.py +52 -2
- psychopy/assets/__init__.py +0 -0
- psychopy/assets/click.png +0 -0
- psychopy/assets/clicknext.png +0 -0
- psychopy/assets/next.png +0 -0
- psychopy/assets/psychopy.ico +0 -0
- psychopy/assets/psychopy.png +0 -0
- psychopy/assets/templates/__init__.py +0 -0
- psychopy/assets/touch.png +0 -0
- psychopy/assets/touchnext.png +0 -0
- psychopy/assets/window.ico +0 -0
- psychopy/changes/2023.1.0.md +9 -0
- psychopy/changes/2024.1.0.md +16 -0
- psychopy/changes/__init__.py +0 -0
- psychopy/clock.py +2 -2
- psychopy/colors.py +2 -1
- psychopy/compatibility.py +53 -1
- psychopy/contrib/.DS_Store +0 -0
- psychopy/contrib/configobj/__init__.py +10 -8
- psychopy/data/__init__.py +3 -2
- psychopy/data/base.py +5 -5
- psychopy/data/experiment.py +130 -4
- psychopy/data/routine.py +56 -0
- psychopy/data/staircase.py +2 -2
- psychopy/data/trial.py +559 -97
- psychopy/data/utils.py +56 -21
- psychopy/demos/.DS_Store +0 -0
- psychopy/demos/builder/.DS_Store +0 -0
- psychopy/demos/builder/Design Templates/.DS_Store +0 -0
- psychopy/demos/builder/Experiments/.DS_Store +0 -0
- psychopy/demos/builder/Feature Demos/.DS_Store +0 -0
- psychopy/demos/builder/Feature Demos/buttonBox/buttonBoxDemo.psyexp +375 -0
- psychopy/demos/builder/Feature Demos/buttonBox/readme.md +5 -0
- psychopy/demos/builder/Feature Demos/pilotMode/pilotMode.psyexp +433 -0
- psychopy/demos/builder/Feature Demos/pilotMode/readme.md +7 -0
- psychopy/demos/builder/Feature Demos/progress/progressBar.psyexp +4 -4
- psychopy/demos/builder/Hardware/.DS_Store +0 -0
- psychopy/demos/builder/Helper Tools/.DS_Store +0 -0
- psychopy/demos/coder/.DS_Store +0 -0
- psychopy/demos/coder/hardware/testSoundLatency.py +2 -2
- psychopy/demos/coder/iohub/.DS_Store +0 -0
- psychopy/demos/coder/misc/hdf5_2_csv +33 -0
- psychopy/event.py +30 -29
- psychopy/experiment/.DS_Store +0 -0
- psychopy/experiment/_experiment.py +6 -6
- psychopy/experiment/components/.DS_Store +0 -0
- psychopy/experiment/components/__init__.py +6 -3
- psychopy/experiment/components/_base.py +286 -131
- psychopy/experiment/components/aperture/.DS_Store +0 -0
- psychopy/experiment/components/brush/.DS_Store +0 -0
- psychopy/experiment/components/button/.DS_Store +0 -0
- psychopy/experiment/components/button/__init__.py +5 -1
- psychopy/experiment/components/buttonBox/.DS_Store +0 -0
- psychopy/experiment/components/buttonBox/__init__.py +21 -12
- psychopy/experiment/components/camera/.DS_Store +0 -0
- psychopy/experiment/components/code/.DS_Store +0 -0
- psychopy/experiment/components/dots/.DS_Store +0 -0
- psychopy/experiment/components/eyetracker_record/.DS_Store +0 -0
- psychopy/experiment/components/eyetracker_record/__init__.py +92 -30
- psychopy/experiment/components/form/.DS_Store +0 -0
- psychopy/experiment/components/form/__init__.py +6 -2
- psychopy/experiment/components/grating/.DS_Store +0 -0
- psychopy/experiment/components/grating/__init__.py +14 -3
- psychopy/experiment/components/image/.DS_Store +0 -0
- psychopy/experiment/components/image/__init__.py +14 -3
- psychopy/experiment/components/joyButtons/.DS_Store +0 -0
- psychopy/experiment/components/joystick/.DS_Store +0 -0
- psychopy/experiment/components/keyboard/.DS_Store +0 -0
- psychopy/experiment/components/keyboard/__init__.py +22 -10
- psychopy/experiment/components/microphone/.DS_Store +0 -0
- psychopy/experiment/components/microphone/__init__.py +59 -39
- psychopy/experiment/components/mouse/.DS_Store +0 -0
- psychopy/experiment/components/mouse/__init__.py +44 -29
- psychopy/experiment/components/movie/.DS_Store +0 -0
- psychopy/experiment/components/movie/__init__.py +1 -1
- psychopy/experiment/components/panorama/.DS_Store +0 -0
- psychopy/experiment/components/parallelOut/.DS_Store +0 -0
- psychopy/experiment/components/patch/.DS_Store +0 -0
- psychopy/experiment/components/polygon/.DS_Store +0 -0
- psychopy/experiment/components/polygon/__init__.py +26 -6
- psychopy/experiment/components/progress/.DS_Store +0 -0
- psychopy/experiment/components/progress/__init__.py +1 -1
- psychopy/experiment/components/ratingScale/.DS_Store +0 -0
- psychopy/experiment/components/resourceManager/.DS_Store +0 -0
- psychopy/experiment/components/roi/.DS_Store +0 -0
- psychopy/experiment/components/roi/__init__.py +5 -0
- psychopy/experiment/components/routineSettings/.DS_Store +0 -0
- psychopy/experiment/components/routineSettings/__init__.py +57 -10
- psychopy/experiment/components/serialOut/.DS_Store +0 -0
- psychopy/experiment/components/settings/.DS_Store +0 -0
- psychopy/experiment/components/settings/__init__.py +117 -42
- psychopy/experiment/components/slider/.DS_Store +0 -0
- psychopy/experiment/components/sound/.DS_Store +0 -0
- psychopy/experiment/components/sound/__init__.py +54 -19
- psychopy/experiment/components/static/.DS_Store +0 -0
- psychopy/experiment/components/static/__init__.py +1 -1
- psychopy/experiment/components/text/.DS_Store +0 -0
- psychopy/experiment/components/text/__init__.py +28 -3
- psychopy/experiment/components/textbox/.DS_Store +0 -0
- psychopy/experiment/components/textbox/__init__.py +12 -2
- psychopy/experiment/components/unknown/.DS_Store +0 -0
- psychopy/experiment/components/unknown/__init__.py +1 -2
- psychopy/experiment/components/unknownPlugin/.DS_Store +0 -0
- psychopy/experiment/components/unknownPlugin/__init__.py +2 -2
- psychopy/experiment/components/variable/.DS_Store +0 -0
- psychopy/experiment/flow.py +11 -4
- psychopy/experiment/loops.py +85 -37
- psychopy/experiment/params.py +74 -32
- psychopy/experiment/py2js_transpiler.py +8 -1
- psychopy/experiment/routines/.DS_Store +0 -0
- psychopy/experiment/routines/_base.py +102 -22
- psychopy/experiment/routines/counterbalance/.DS_Store +0 -0
- psychopy/experiment/routines/counterbalance/__init__.py +5 -1
- psychopy/experiment/routines/eyetracker_calibrate/.DS_Store +0 -0
- psychopy/experiment/routines/eyetracker_validate/.DS_Store +0 -0
- psychopy/experiment/routines/pavlovia_survey/.DS_Store +0 -0
- psychopy/experiment/routines/photodiodeValidator/.DS_Store +0 -0
- psychopy/experiment/routines/photodiodeValidator/__init__.py +7 -6
- psychopy/experiment/routines/unknown/.DS_Store +0 -0
- psychopy/gui/wxgui.py +4 -4
- psychopy/hardware/.DS_Store +0 -0
- psychopy/hardware/__init__.py +1 -1
- psychopy/hardware/base.py +12 -0
- psychopy/hardware/camera/__init__.py +1 -15
- psychopy/hardware/cedrus.py +10 -11
- psychopy/hardware/crs/colorcal.py +13 -22
- psychopy/hardware/crs/optical.py +10 -20
- psychopy/hardware/emulator.py +17 -14
- psychopy/hardware/eyetracker.py +42 -118
- psychopy/hardware/gammasci.py +4 -15
- psychopy/hardware/keyboard.py +102 -11
- psychopy/hardware/listener.py +3 -0
- psychopy/hardware/microphone.py +148 -18
- psychopy/hardware/minolta.py +8 -15
- psychopy/hardware/photodiode.py +191 -16
- psychopy/hardware/photometer/__init__.py +11 -19
- psychopy/hardware/pr.py +8 -15
- psychopy/hardware/speaker.py +39 -4
- psychopy/info.py +0 -71
- psychopy/iohub/.DS_Store +0 -0
- psychopy/iohub/__init__.py +1 -1
- psychopy/iohub/client/__init__.py +30 -20
- psychopy/iohub/client/keyboard.py +24 -24
- psychopy/iohub/datastore/__init__.py +2 -2
- psychopy/iohub/datastore/util.py +2 -2
- psychopy/iohub/default_config.yaml +1 -1
- psychopy/iohub/devices/.DS_Store +0 -0
- psychopy/iohub/devices/__init__.py +112 -25
- psychopy/iohub/devices/deviceConfigValidation.py +2 -1
- psychopy/iohub/devices/experiment/default_experiment.yaml +12 -1
- psychopy/iohub/devices/experiment/supported_config_settings.yaml +5 -1
- psychopy/iohub/devices/eyetracker/.DS_Store +0 -0
- psychopy/iohub/devices/eyetracker/__init__.py +46 -0
- psychopy/iohub/devices/eyetracker/calibration/procedure.py +2 -2
- psychopy/iohub/devices/eyetracker/hw/gazepoint/__init__.py +14 -2
- psychopy/iohub/devices/eyetracker/hw/mouse/eyetracker.py +3 -4
- psychopy/iohub/server.py +2 -2
- psychopy/iohub/start_iohub_process.py +3 -0
- psychopy/iohub/util/__init__.py +62 -70
- psychopy/layout.py +5 -5
- psychopy/logging.py +8 -1
- psychopy/microphone.py +10 -37
- psychopy/platform_specific/__init__.py +0 -2
- psychopy/platform_specific/darwin.py +1 -3
- psychopy/platform_specific/linux.py +31 -33
- psychopy/platform_specific/win32.py +38 -13
- psychopy/plugins/__init__.py +148 -116
- psychopy/plugins/util.py +39 -0
- psychopy/preferences/Darwin.spec +4 -2
- psychopy/preferences/FreeBSD.spec +4 -2
- psychopy/preferences/Linux.spec +4 -2
- psychopy/preferences/Windows.spec +4 -2
- psychopy/preferences/baseNoArch.spec +4 -2
- psychopy/preferences/preferences.py +47 -24
- psychopy/projects/pavlovia.py +47 -4
- psychopy/scripts/psyexpCompile.py +0 -4
- psychopy/session.py +153 -21
- psychopy/sound/__init__.py +31 -21
- psychopy/sound/_base.py +20 -3
- psychopy/sound/audioclip.py +320 -33
- psychopy/sound/backend_ptb.py +47 -58
- psychopy/sound/backend_pygame.py +1 -1
- psychopy/sound/backend_pysound.py +6 -15
- psychopy/sound/transcribe.py +53 -0
- psychopy/tests/.DS_Store +0 -0
- psychopy/tests/data/.DS_Store +0 -0
- psychopy/tests/data/TestUnknownPluginComponent_load_resave.psyexp +135 -0
- psychopy/tests/data/Test_textbox/test_ori_0_bottom right.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_0_center.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_0_top left.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_120_bottom right.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_120_center.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_120_top left.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_180_bottom right.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_180_center.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_180_top left.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_240_bottom right.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_240_center.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_240_top left.png +0 -0
- psychopy/tests/data/correctScript/.DS_Store +0 -0
- psychopy/tests/data/test_components/testClearKeyboard/testClearKeyboard.psyexp +200 -0
- psychopy/tests/data/test_session/.DS_Store +0 -0
- psychopy/tests/data/test_session/root/testFutureTrials/testFutureTrials.psyexp +155 -0
- psychopy/tests/data/test_session/root/testTrialNav/trialNav.psyexp +158 -0
- psychopy/tests/test_app/.DS_Store +0 -0
- psychopy/tests/test_app/conftest.py +2 -2
- psychopy/tests/test_app/test_speed.py +4 -1
- psychopy/tests/test_data/test_TrialHandler2.py +146 -1
- psychopy/tests/test_experiment/.DS_Store +0 -0
- psychopy/tests/test_experiment/needs_wx/genComponsTemplate.py +3 -3
- psychopy/tests/test_experiment/needs_wx/test_components.py +2 -2
- psychopy/tests/test_experiment/test_components/test_KeyboardComponent.py +28 -0
- psychopy/tests/test_experiment/test_components/test_UnknownPluginComponent.py +27 -0
- psychopy/tests/test_experiment/test_components/test_base_components.py +58 -0
- psychopy/tests/test_experiment/test_py2js.py +1 -1
- psychopy/tests/test_hardware/test_keyboard.py +184 -16
- psychopy/tests/test_hardware/test_ports.py +1 -11
- psychopy/tests/test_liaison/test_Liaison.py +47 -0
- psychopy/tests/test_misc/test_core.py +5 -0
- psychopy/tests/test_session/test_Session.py +5 -1
- psychopy/tests/test_tools/test_versionchooser.py +39 -8
- psychopy/tests/test_visual/test_all_stimuli.py +0 -97
- psychopy/tests/test_visual/test_image.py +6 -5
- psychopy/tests/test_visual/test_textbox.py +36 -0
- psychopy/tests/utils.py +4 -0
- psychopy/tools/filetools.py +1 -1
- psychopy/tools/pkgtools.py +160 -137
- psychopy/tools/versionchooser.py +10 -10
- psychopy/tools/wizard.py +3 -3
- psychopy/visual/.DS_Store +0 -0
- psychopy/visual/backends/pygletbackend.py +24 -13
- psychopy/visual/basevisual.py +5 -11
- psychopy/visual/button.py +2 -14
- psychopy/visual/helpers.py +5 -5
- psychopy/visual/line.py +1 -2
- psychopy/visual/movie2.py +7 -816
- psychopy/visual/movie3.py +7 -589
- psychopy/visual/movies/__init__.py +8 -11
- psychopy/visual/movies/frame.py +5 -2
- psychopy/visual/movies/players/ffpyplayer_player.py +5 -2
- psychopy/visual/noise.py +8 -7
- psychopy/visual/patch.py +7 -16
- psychopy/visual/progress.py +1 -1
- psychopy/visual/radial.py +9 -7
- psychopy/visual/ratingscale.py +8 -1415
- psychopy/visual/secondorder.py +10 -9
- psychopy/visual/shape.py +7 -2
- psychopy/visual/text.py +1 -1
- psychopy/visual/textbox2/textbox2.py +28 -5
- psychopy/web.py +5 -2
- {psychopy-2024.1.3.dist-info → psychopy-2024.2.0.dist-info}/METADATA +8 -13
- {psychopy-2024.1.3.dist-info → psychopy-2024.2.0.dist-info}/RECORD +313 -219
- {psychopy-2024.1.3.dist-info → psychopy-2024.2.0.dist-info}/WHEEL +1 -1
- psychopy/app/Resources/click.png +0 -0
- psychopy/app/Resources/next.png +0 -0
- psychopy/experiment/components/patch/__init__.py +0 -121
- psychopy/experiment/components/patch/classic/patch.png +0 -0
- psychopy/experiment/components/patch/dark/patch.png +0 -0
- psychopy/experiment/components/patch/dark/patch@2x.png +0 -0
- psychopy/experiment/components/patch/light/patch.png +0 -0
- psychopy/experiment/components/patch/light/patch@2x.png +0 -0
- psychopy/experiment/components/ratingScale/__init__.py +0 -337
- psychopy/experiment/components/ratingScale/classic/ratingscale.png +0 -0
- psychopy/experiment/components/ratingScale/classic/ratingscale@2x.png +0 -0
- psychopy/experiment/components/ratingScale/dark/ratingScale@2x.png +0 -0
- psychopy/experiment/components/ratingScale/dark/ratingscale.png +0 -0
- psychopy/experiment/components/ratingScale/light/ratingScale@2x.png +0 -0
- psychopy/experiment/components/ratingScale/light/ratingscale.png +0 -0
- psychopy/platform_specific/posix.py +0 -16
- psychopy/tests/test_sound/test_microphone.py +0 -217
- psychopy/tests/test_visual/test_ratingScale.py +0 -299
- /psychopy/{app/Resources → assets}/Psychopy Window Favicon@16w.png +0 -0
- /psychopy/{app/Resources → assets}/Psychopy Window Favicon@32w.png +0 -0
- /psychopy/{app/Resources → assets}/USB-C.png +0 -0
- /psychopy/{app/Resources → assets}/USB.png +0 -0
- /psychopy/{app/Resources → assets}/creditCard.png +0 -0
- /psychopy/{app/Resources → assets}/default.mp3 +0 -0
- /psychopy/{app/Resources → assets}/default.mp4 +0 -0
- /psychopy/{app/Resources → assets}/default.png +0 -0
- /psychopy/{app/Resources → assets/templates}/instruct1.png +0 -0
- /psychopy/{app/Resources → assets/templates}/instruct2.png +0 -0
- {psychopy-2024.1.3.dist-info → psychopy-2024.2.0.dist-info}/entry_points.txt +0 -0
- {psychopy-2024.1.3.dist-info → psychopy-2024.2.0.dist-info}/licenses/AUTHORS.md +0 -0
- {psychopy-2024.1.3.dist-info → psychopy-2024.2.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<?xml version="1.0" ?>
|
|
2
|
+
<PsychoPy2experiment encoding="utf-8" version="2024.1.0">
|
|
3
|
+
<Settings>
|
|
4
|
+
<Param val="3" valType="str" updates="None" name="Audio latency priority"/>
|
|
5
|
+
<Param val="ptb" valType="str" updates="None" name="Audio lib"/>
|
|
6
|
+
<Param val="" valType="str" updates="None" name="Completed URL"/>
|
|
7
|
+
<Param val="auto" valType="str" updates="None" name="Data file delimiter"/>
|
|
8
|
+
<Param val="u'data/%s_%s_%s' % (expInfo['participant'], expName, expInfo['date'])" valType="code" updates="None" name="Data filename"/>
|
|
9
|
+
<Param val="True" valType="bool" updates="None" name="Enable Escape"/>
|
|
10
|
+
<Param val="" valType="str" updates="None" name="End Message"/>
|
|
11
|
+
<Param val="{'participant':'f"{randint(0, 999999):06.0f}"', 'session':'001'}" valType="code" updates="None" name="Experiment info"/>
|
|
12
|
+
<Param val="True" valType="bool" updates="None" name="Force stereo"/>
|
|
13
|
+
<Param val="True" valType="bool" updates="None" name="Full-screen window"/>
|
|
14
|
+
<Param val="" valType="str" updates="None" name="HTML path"/>
|
|
15
|
+
<Param val="" valType="str" updates="None" name="Incomplete URL"/>
|
|
16
|
+
<Param val="testMonitor" valType="str" updates="None" name="Monitor"/>
|
|
17
|
+
<Param val="[]" valType="list" updates="None" name="Resources"/>
|
|
18
|
+
<Param val="False" valType="bool" updates="None" name="Save csv file"/>
|
|
19
|
+
<Param val="False" valType="bool" updates="None" name="Save excel file"/>
|
|
20
|
+
<Param val="False" valType="bool" updates="None" name="Save hdf5 file"/>
|
|
21
|
+
<Param val="True" valType="bool" updates="None" name="Save log file"/>
|
|
22
|
+
<Param val="True" valType="bool" updates="None" name="Save psydat file"/>
|
|
23
|
+
<Param val="True" valType="bool" updates="None" name="Save wide csv file"/>
|
|
24
|
+
<Param val="1" valType="num" updates="None" name="Screen"/>
|
|
25
|
+
<Param val="True" valType="bool" updates="None" name="Show info dlg"/>
|
|
26
|
+
<Param val="False" valType="bool" updates="None" name="Show mouse"/>
|
|
27
|
+
<Param val="height" valType="str" updates="None" name="Units"/>
|
|
28
|
+
<Param val="" valType="str" updates="None" name="Use version"/>
|
|
29
|
+
<Param val="(1024, 768)" valType="list" updates="None" name="Window size (pixels)"/>
|
|
30
|
+
<Param val="none" valType="str" updates="None" name="backgroundFit"/>
|
|
31
|
+
<Param val="" valType="str" updates="None" name="backgroundImg"/>
|
|
32
|
+
<Param val="avg" valType="str" updates="None" name="blendMode"/>
|
|
33
|
+
<Param val="float" valType="str" updates="None" name="clockFormat"/>
|
|
34
|
+
<Param val="{'thisRow.t': 'priority.CRITICAL', 'expName': 'priority.LOW'}" valType="dict" updates="None" name="colPriority"/>
|
|
35
|
+
<Param val="$[0,0,0]" valType="color" updates="None" name="color"/>
|
|
36
|
+
<Param val="rgb" valType="str" updates="None" name="colorSpace"/>
|
|
37
|
+
<Param val="100.1.1.1" valType="str" updates="None" name="elAddress"/>
|
|
38
|
+
<Param val="FILTER_LEVEL_2" valType="str" updates="None" name="elDataFiltering"/>
|
|
39
|
+
<Param val="FILTER_LEVEL_OFF" valType="str" updates="None" name="elLiveFiltering"/>
|
|
40
|
+
<Param val="EYELINK 1000 DESKTOP" valType="str" updates="None" name="elModel"/>
|
|
41
|
+
<Param val="ELLIPSE_FIT" valType="str" updates="None" name="elPupilAlgorithm"/>
|
|
42
|
+
<Param val="PUPIL_AREA" valType="str" updates="None" name="elPupilMeasure"/>
|
|
43
|
+
<Param val="1000" valType="num" updates="None" name="elSampleRate"/>
|
|
44
|
+
<Param val="False" valType="bool" updates="None" name="elSimMode"/>
|
|
45
|
+
<Param val="RIGHT_EYE" valType="str" updates="None" name="elTrackEyes"/>
|
|
46
|
+
<Param val="PUPIL_CR_TRACKING" valType="str" updates="None" name="elTrackingMode"/>
|
|
47
|
+
<Param val="testFutureTrials" valType="str" updates="None" name="expName"/>
|
|
48
|
+
<Param val="on Sync" valType="str" updates="None" name="exportHTML"/>
|
|
49
|
+
<Param val="None" valType="str" updates="None" name="eyetracker"/>
|
|
50
|
+
<Param val="" valType="code" updates="None" name="frameRate"/>
|
|
51
|
+
<Param val="Attempting to measure frame rate of screen, please wait..." valType="str" updates="None" name="frameRateMsg"/>
|
|
52
|
+
<Param val="127.0.0.1" valType="str" updates="None" name="gpAddress"/>
|
|
53
|
+
<Param val="4242" valType="num" updates="None" name="gpPort"/>
|
|
54
|
+
<Param val="ioHub" valType="str" updates="None" name="keyboardBackend"/>
|
|
55
|
+
<Param val="warning" valType="code" updates="None" name="logging level"/>
|
|
56
|
+
<Param val="True" valType="bool" updates="None" name="measureFrameRate"/>
|
|
57
|
+
<Param val="MIDDLE_BUTTON" valType="list" updates="None" name="mgBlink"/>
|
|
58
|
+
<Param val="CONTINUOUS" valType="str" updates="None" name="mgMove"/>
|
|
59
|
+
<Param val="0.5" valType="num" updates="None" name="mgSaccade"/>
|
|
60
|
+
<Param val="neon.local" valType="str" updates="None" name="plCompanionAddress"/>
|
|
61
|
+
<Param val="8080" valType="num" updates="None" name="plCompanionPort"/>
|
|
62
|
+
<Param val="True" valType="bool" updates="None" name="plCompanionRecordingEnabled"/>
|
|
63
|
+
<Param val="0.6" valType="num" updates="None" name="plConfidenceThreshold"/>
|
|
64
|
+
<Param val="True" valType="bool" updates="None" name="plPupilCaptureRecordingEnabled"/>
|
|
65
|
+
<Param val="" valType="str" updates="None" name="plPupilCaptureRecordingLocation"/>
|
|
66
|
+
<Param val="127.0.0.1" valType="str" updates="None" name="plPupilRemoteAddress"/>
|
|
67
|
+
<Param val="50020" valType="num" updates="None" name="plPupilRemotePort"/>
|
|
68
|
+
<Param val="1000" valType="num" updates="None" name="plPupilRemoteTimeoutMs"/>
|
|
69
|
+
<Param val="False" valType="bool" updates="None" name="plPupillometryOnly"/>
|
|
70
|
+
<Param val="psychopy_iohub_surface" valType="str" updates="None" name="plSurfaceName"/>
|
|
71
|
+
<Param val="0" valType="code" updates="None" name="runMode"/>
|
|
72
|
+
<Param val="False" valType="bool" updates="None" name="rush"/>
|
|
73
|
+
<Param val="time" valType="str" updates="None" name="sortColumns"/>
|
|
74
|
+
<Param val="" valType="str" updates="None" name="tbLicenseFile"/>
|
|
75
|
+
<Param val="" valType="str" updates="None" name="tbModel"/>
|
|
76
|
+
<Param val="60" valType="num" updates="None" name="tbSampleRate"/>
|
|
77
|
+
<Param val="" valType="str" updates="None" name="tbSerialNo"/>
|
|
78
|
+
<Param val="pyglet" valType="str" updates="None" name="winBackend"/>
|
|
79
|
+
</Settings>
|
|
80
|
+
<Routines>
|
|
81
|
+
<Routine name="trial">
|
|
82
|
+
<RoutineSettingsComponent name="trial" plugin="None">
|
|
83
|
+
<Param val="none" valType="str" updates="None" name="backgroundFit"/>
|
|
84
|
+
<Param val="" valType="str" updates="None" name="backgroundImg"/>
|
|
85
|
+
<Param val="$[0,0,0]" valType="color" updates="None" name="color"/>
|
|
86
|
+
<Param val="rgb" valType="str" updates="None" name="colorSpace"/>
|
|
87
|
+
<Param val="" valType="str" updates="constant" name="desc"/>
|
|
88
|
+
<Param val="False" valType="bool" updates="None" name="disabled"/>
|
|
89
|
+
<Param val="" valType="code" updates="None" name="durationEstim"/>
|
|
90
|
+
<Param val="trial" valType="code" updates="None" name="name"/>
|
|
91
|
+
<Param val="True" valType="bool" updates="None" name="saveStartStop"/>
|
|
92
|
+
<Param val="" valType="code" updates="constant" name="skipIf"/>
|
|
93
|
+
<Param val="duration (s)" valType="str" updates="None" name="stopType"/>
|
|
94
|
+
<Param val="" valType="code" updates="constant" name="stopVal"/>
|
|
95
|
+
<Param val="False" valType="bool" updates="None" name="useWindowParams"/>
|
|
96
|
+
</RoutineSettingsComponent>
|
|
97
|
+
<TextboxComponent name="textbox" plugin="None">
|
|
98
|
+
<Param val="center" valType="str" updates="constant" name="alignment"/>
|
|
99
|
+
<Param val="center" valType="str" updates="constant" name="anchor"/>
|
|
100
|
+
<Param val="True" valType="bool" updates="constant" name="autoLog"/>
|
|
101
|
+
<Param val="False" valType="bool" updates="constant" name="bold"/>
|
|
102
|
+
<Param val="None" valType="color" updates="constant" name="borderColor"/>
|
|
103
|
+
<Param val="2" valType="num" updates="constant" name="borderWidth"/>
|
|
104
|
+
<Param val="white" valType="color" updates="constant" name="color"/>
|
|
105
|
+
<Param val="rgb" valType="str" updates="constant" name="colorSpace"/>
|
|
106
|
+
<Param val="1" valType="num" updates="constant" name="contrast"/>
|
|
107
|
+
<Param val="False" valType="bool" updates="None" name="disabled"/>
|
|
108
|
+
<Param val="" valType="code" updates="None" name="durationEstim"/>
|
|
109
|
+
<Param val="False" valType="bool" updates="constant" name="editable"/>
|
|
110
|
+
<Param val="None" valType="color" updates="constant" name="fillColor"/>
|
|
111
|
+
<Param val="False" valType="bool" updates="constant" name="flipHoriz"/>
|
|
112
|
+
<Param val="False" valType="bool" updates="constant" name="flipVert"/>
|
|
113
|
+
<Param val="Arial" valType="str" updates="constant" name="font"/>
|
|
114
|
+
<Param val="False" valType="bool" updates="constant" name="italic"/>
|
|
115
|
+
<Param val="LTR" valType="str" updates="None" name="languageStyle"/>
|
|
116
|
+
<Param val="0.05" valType="num" updates="constant" name="letterHeight"/>
|
|
117
|
+
<Param val="1.0" valType="num" updates="constant" name="lineSpacing"/>
|
|
118
|
+
<Param val="textbox" valType="code" updates="None" name="name"/>
|
|
119
|
+
<Param val="" valType="num" updates="constant" name="opacity"/>
|
|
120
|
+
<Param val="0" valType="num" updates="constant" name="ori"/>
|
|
121
|
+
<Param val="visible" valType="str" updates="constant" name="overflow"/>
|
|
122
|
+
<Param val="0" valType="num" updates="constant" name="padding"/>
|
|
123
|
+
<Param val="Type here..." valType="str" updates="constant" name="placeholder"/>
|
|
124
|
+
<Param val="(0, 0)" valType="list" updates="constant" name="pos"/>
|
|
125
|
+
<Param val="True" valType="bool" updates="None" name="saveStartStop"/>
|
|
126
|
+
<Param val="(0.5, 0.5)" valType="list" updates="constant" name="size"/>
|
|
127
|
+
<Param val="" valType="list" updates="constant" name="speechPoint"/>
|
|
128
|
+
<Param val="" valType="code" updates="None" name="startEstim"/>
|
|
129
|
+
<Param val="time (s)" valType="str" updates="None" name="startType"/>
|
|
130
|
+
<Param val="0.0" valType="code" updates="None" name="startVal"/>
|
|
131
|
+
<Param val="duration (s)" valType="str" updates="None" name="stopType"/>
|
|
132
|
+
<Param val="0.2" valType="code" updates="constant" name="stopVal"/>
|
|
133
|
+
<Param val="True" valType="bool" updates="None" name="syncScreenRefresh"/>
|
|
134
|
+
<Param val="$trials.getFutureTrial("1")" valType="str" updates="set every repeat" name="text"/>
|
|
135
|
+
<Param val="from exp settings" valType="str" updates="None" name="units"/>
|
|
136
|
+
<Param val="" valType="code" updates="None" name="validator"/>
|
|
137
|
+
</TextboxComponent>
|
|
138
|
+
</Routine>
|
|
139
|
+
</Routines>
|
|
140
|
+
<Flow>
|
|
141
|
+
<LoopInitiator loopType="TrialHandler" name="trials">
|
|
142
|
+
<Param name="Selected rows" updates="None" val="" valType="str"/>
|
|
143
|
+
<Param name="conditions" updates="None" val="None" valType="str"/>
|
|
144
|
+
<Param name="conditionsFile" updates="None" val="" valType="file"/>
|
|
145
|
+
<Param name="endPoints" updates="None" val="[0, 1]" valType="num"/>
|
|
146
|
+
<Param name="isTrials" updates="None" val="True" valType="bool"/>
|
|
147
|
+
<Param name="loopType" updates="None" val="random" valType="str"/>
|
|
148
|
+
<Param name="nReps" updates="None" val="5" valType="num"/>
|
|
149
|
+
<Param name="name" updates="None" val="trials" valType="code"/>
|
|
150
|
+
<Param name="random seed" updates="None" val="" valType="code"/>
|
|
151
|
+
</LoopInitiator>
|
|
152
|
+
<Routine name="trial"/>
|
|
153
|
+
<LoopTerminator name="trials"/>
|
|
154
|
+
</Flow>
|
|
155
|
+
</PsychoPy2experiment>
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
<?xml version="1.0" ?>
|
|
2
|
+
<PsychoPy2experiment encoding="utf-8" version="2024.1.4">
|
|
3
|
+
<Settings>
|
|
4
|
+
<Param val="3" valType="str" updates="None" name="Audio latency priority"/>
|
|
5
|
+
<Param val="ptb" valType="str" updates="None" name="Audio lib"/>
|
|
6
|
+
<Param val="" valType="str" updates="None" name="Completed URL"/>
|
|
7
|
+
<Param val="auto" valType="str" updates="None" name="Data file delimiter"/>
|
|
8
|
+
<Param val=""data/last"" valType="code" updates="None" name="Data filename"/>
|
|
9
|
+
<Param val="True" valType="bool" updates="None" name="Enable Escape"/>
|
|
10
|
+
<Param val="" valType="str" updates="None" name="End Message"/>
|
|
11
|
+
<Param val="{'participant': 'f"{randint(0, 999999):06.0f}"', 'session': '001'}" valType="code" updates="None" name="Experiment info"/>
|
|
12
|
+
<Param val="True" valType="bool" updates="None" name="Force stereo"/>
|
|
13
|
+
<Param val="True" valType="bool" updates="None" name="Full-screen window"/>
|
|
14
|
+
<Param val="" valType="str" updates="None" name="HTML path"/>
|
|
15
|
+
<Param val="" valType="str" updates="None" name="Incomplete URL"/>
|
|
16
|
+
<Param val="testMonitor" valType="str" updates="None" name="Monitor"/>
|
|
17
|
+
<Param val="[]" valType="list" updates="None" name="Resources"/>
|
|
18
|
+
<Param val="False" valType="bool" updates="None" name="Save csv file"/>
|
|
19
|
+
<Param val="False" valType="bool" updates="None" name="Save excel file"/>
|
|
20
|
+
<Param val="False" valType="bool" updates="None" name="Save hdf5 file"/>
|
|
21
|
+
<Param val="True" valType="bool" updates="None" name="Save log file"/>
|
|
22
|
+
<Param val="True" valType="bool" updates="None" name="Save psydat file"/>
|
|
23
|
+
<Param val="True" valType="bool" updates="None" name="Save wide csv file"/>
|
|
24
|
+
<Param val="1" valType="num" updates="None" name="Screen"/>
|
|
25
|
+
<Param val="True" valType="bool" updates="None" name="Show info dlg"/>
|
|
26
|
+
<Param val="False" valType="bool" updates="None" name="Show mouse"/>
|
|
27
|
+
<Param val="height" valType="str" updates="None" name="Units"/>
|
|
28
|
+
<Param val="" valType="str" updates="None" name="Use version"/>
|
|
29
|
+
<Param val="[1920, 1080]" valType="list" updates="None" name="Window size (pixels)"/>
|
|
30
|
+
<Param val="none" valType="str" updates="None" name="backgroundFit"/>
|
|
31
|
+
<Param val="" valType="str" updates="None" name="backgroundImg"/>
|
|
32
|
+
<Param val="avg" valType="str" updates="None" name="blendMode"/>
|
|
33
|
+
<Param val="float" valType="str" updates="None" name="clockFormat"/>
|
|
34
|
+
<Param val="{'thisRow.t': 'priority.CRITICAL', 'expName': 'priority.LOW'}" valType="dict" updates="None" name="colPriority"/>
|
|
35
|
+
<Param val="$[0,0,0]" valType="color" updates="None" name="color"/>
|
|
36
|
+
<Param val="rgb" valType="str" updates="None" name="colorSpace"/>
|
|
37
|
+
<Param val="100.1.1.1" valType="str" updates="None" name="elAddress"/>
|
|
38
|
+
<Param val="FILTER_LEVEL_2" valType="str" updates="None" name="elDataFiltering"/>
|
|
39
|
+
<Param val="FILTER_LEVEL_OFF" valType="str" updates="None" name="elLiveFiltering"/>
|
|
40
|
+
<Param val="EYELINK 1000 DESKTOP" valType="str" updates="None" name="elModel"/>
|
|
41
|
+
<Param val="ELLIPSE_FIT" valType="str" updates="None" name="elPupilAlgorithm"/>
|
|
42
|
+
<Param val="PUPIL_AREA" valType="str" updates="None" name="elPupilMeasure"/>
|
|
43
|
+
<Param val="1000" valType="num" updates="None" name="elSampleRate"/>
|
|
44
|
+
<Param val="False" valType="bool" updates="None" name="elSimMode"/>
|
|
45
|
+
<Param val="RIGHT_EYE" valType="str" updates="None" name="elTrackEyes"/>
|
|
46
|
+
<Param val="PUPIL_CR_TRACKING" valType="str" updates="None" name="elTrackingMode"/>
|
|
47
|
+
<Param val="trialNav" valType="str" updates="None" name="expName"/>
|
|
48
|
+
<Param val="on Sync" valType="str" updates="None" name="exportHTML"/>
|
|
49
|
+
<Param val="None" valType="str" updates="None" name="eyetracker"/>
|
|
50
|
+
<Param val="" valType="code" updates="None" name="frameRate"/>
|
|
51
|
+
<Param val="Attempting to measure frame rate of screen, please wait..." valType="str" updates="None" name="frameRateMsg"/>
|
|
52
|
+
<Param val="127.0.0.1" valType="str" updates="None" name="gpAddress"/>
|
|
53
|
+
<Param val="4242" valType="num" updates="None" name="gpPort"/>
|
|
54
|
+
<Param val="ioHub" valType="str" updates="None" name="keyboardBackend"/>
|
|
55
|
+
<Param val="warning" valType="code" updates="None" name="logging level"/>
|
|
56
|
+
<Param val="True" valType="bool" updates="None" name="measureFrameRate"/>
|
|
57
|
+
<Param val="('MIDDLE_BUTTON',)" valType="list" updates="None" name="mgBlink"/>
|
|
58
|
+
<Param val="CONTINUOUS" valType="str" updates="None" name="mgMove"/>
|
|
59
|
+
<Param val="0.5" valType="num" updates="None" name="mgSaccade"/>
|
|
60
|
+
<Param val="neon.local" valType="str" updates="None" name="plCompanionAddress"/>
|
|
61
|
+
<Param val="8080" valType="num" updates="None" name="plCompanionPort"/>
|
|
62
|
+
<Param val="True" valType="bool" updates="None" name="plCompanionRecordingEnabled"/>
|
|
63
|
+
<Param val="0.6" valType="num" updates="None" name="plConfidenceThreshold"/>
|
|
64
|
+
<Param val="True" valType="bool" updates="None" name="plPupilCaptureRecordingEnabled"/>
|
|
65
|
+
<Param val="" valType="str" updates="None" name="plPupilCaptureRecordingLocation"/>
|
|
66
|
+
<Param val="127.0.0.1" valType="str" updates="None" name="plPupilRemoteAddress"/>
|
|
67
|
+
<Param val="50020" valType="num" updates="None" name="plPupilRemotePort"/>
|
|
68
|
+
<Param val="1000" valType="num" updates="None" name="plPupilRemoteTimeoutMs"/>
|
|
69
|
+
<Param val="False" valType="bool" updates="None" name="plPupillometryOnly"/>
|
|
70
|
+
<Param val="psychopy_iohub_surface" valType="str" updates="None" name="plSurfaceName"/>
|
|
71
|
+
<Param val="0" valType="code" updates="None" name="runMode"/>
|
|
72
|
+
<Param val="False" valType="bool" updates="None" name="rush"/>
|
|
73
|
+
<Param val="time" valType="str" updates="None" name="sortColumns"/>
|
|
74
|
+
<Param val="" valType="str" updates="None" name="tbLicenseFile"/>
|
|
75
|
+
<Param val="" valType="str" updates="None" name="tbModel"/>
|
|
76
|
+
<Param val="60" valType="num" updates="None" name="tbSampleRate"/>
|
|
77
|
+
<Param val="" valType="str" updates="None" name="tbSerialNo"/>
|
|
78
|
+
<Param val="pyglet" valType="str" updates="None" name="winBackend"/>
|
|
79
|
+
</Settings>
|
|
80
|
+
<Routines>
|
|
81
|
+
<Routine name="trial">
|
|
82
|
+
<RoutineSettingsComponent name="trial" plugin="None">
|
|
83
|
+
<Param val="none" valType="str" updates="None" name="backgroundFit"/>
|
|
84
|
+
<Param val="" valType="str" updates="None" name="backgroundImg"/>
|
|
85
|
+
<Param val="$[0,0,0]" valType="color" updates="None" name="color"/>
|
|
86
|
+
<Param val="rgb" valType="str" updates="None" name="colorSpace"/>
|
|
87
|
+
<Param val="" valType="str" updates="constant" name="desc"/>
|
|
88
|
+
<Param val="False" valType="bool" updates="None" name="disabled"/>
|
|
89
|
+
<Param val="" valType="code" updates="None" name="durationEstim"/>
|
|
90
|
+
<Param val="trial" valType="code" updates="None" name="name"/>
|
|
91
|
+
<Param val="True" valType="bool" updates="None" name="saveStartStop"/>
|
|
92
|
+
<Param val="" valType="code" updates="constant" name="skipIf"/>
|
|
93
|
+
<Param val="duration (s)" valType="str" updates="None" name="stopType"/>
|
|
94
|
+
<Param val="" valType="code" updates="constant" name="stopVal"/>
|
|
95
|
+
<Param val="False" valType="bool" updates="None" name="useWindowParams"/>
|
|
96
|
+
</RoutineSettingsComponent>
|
|
97
|
+
<CodeComponent name="code" plugin="None">
|
|
98
|
+
<Param val="" valType="extendedCode" updates="constant" name="Before Experiment"/>
|
|
99
|
+
<Param val="" valType="extendedCode" updates="constant" name="Before JS Experiment"/>
|
|
100
|
+
<Param val="# some values to move forwards/backwards by and the values at that point&#10;cases = [&#10; # move backwards and forwards and check we land in the right place&#10; (+4, 4),&#10; (-1, 4),&#10; (-3, 2),&#10; (+2, 5),&#10; (-1, 5),&#10; (+2, 8),&#10; # move back past the start and check we land at the start&#10; (-10, 0),&#10; # move forwards past the end and check we land at the end&#10; (+10, 9),&#10;]" valType="extendedCode" updates="constant" name="Begin Experiment"/>
|
|
101
|
+
<Param val="/* Syntax Error: Fix Python code */" valType="extendedCode" updates="constant" name="Begin JS Experiment"/>
|
|
102
|
+
<Param val="" valType="extendedCode" updates="constant" name="Begin JS Routine"/>
|
|
103
|
+
<Param val="" valType="extendedCode" updates="constant" name="Begin Routine"/>
|
|
104
|
+
<Param val="Auto->JS" valType="str" updates="None" name="Code Type"/>
|
|
105
|
+
<Param val="if frameN == 0:&#10; # take (and remove) the first value from cases&#10; adj, expected = cases.pop(0)&#10; # move forwards/back by adj&#10; if adj < 0:&#10; trials.rewindTrials(adj)&#10; else:&#10; trials.skipTrials(adj)&#10; # does the current thisN match what we expect?&#10; assert trials.thisN == expected, f"Expected {expected}, got {trials.thisN}"" valType="extendedCode" updates="constant" name="Each Frame"/>
|
|
106
|
+
<Param val="var _pj;&#10;function _pj_snippets(container) {&#10; function _assert(comp, msg) {&#10; function PJAssertionError(message) {&#10; this.name = "PJAssertionError";&#10; this.message = (message || "Custom error PJAssertionError");&#10; if (((typeof Error.captureStackTrace) === "function")) {&#10; Error.captureStackTrace(this, this.constructor);&#10; } else {&#10; this.stack = new Error(message).stack;&#10; }&#10; }&#10; PJAssertionError.prototype = Object.create(Error.prototype);&#10; PJAssertionError.prototype.constructor = PJAssertionError;&#10; msg = (msg || "Assertion failed.");&#10; if ((! comp)) {&#10; throw new PJAssertionError(msg);&#10; }&#10; }&#10; container["_assert"] = _assert;&#10; return container;&#10;}&#10;_pj = {};&#10;_pj_snippets(_pj);&#10;if ((frameN === 0)) {&#10; [adj, expected] = cases.splice(0, 1);&#10; if ((adj < 0)) {&#10; trials.rewindTrials(adj);&#10; } else {&#10; trials.skipTrials(adj);&#10; }&#10; _pj._assert((trials.thisN === expected), `Expected ${expected}, got ${trials.thisN}`);&#10;}&#10;" valType="extendedCode" updates="constant" name="Each JS Frame"/>
|
|
107
|
+
<Param val="" valType="extendedCode" updates="constant" name="End Experiment"/>
|
|
108
|
+
<Param val="" valType="extendedCode" updates="constant" name="End JS Experiment"/>
|
|
109
|
+
<Param val="" valType="extendedCode" updates="constant" name="End JS Routine"/>
|
|
110
|
+
<Param val="" valType="extendedCode" updates="constant" name="End Routine"/>
|
|
111
|
+
<Param val="False" valType="bool" updates="None" name="disabled"/>
|
|
112
|
+
<Param val="code" valType="code" updates="None" name="name"/>
|
|
113
|
+
</CodeComponent>
|
|
114
|
+
<TextComponent name="text" plugin="None">
|
|
115
|
+
<Param val="white" valType="color" updates="constant" name="color"/>
|
|
116
|
+
<Param val="rgb" valType="str" updates="constant" name="colorSpace"/>
|
|
117
|
+
<Param val="1" valType="num" updates="constant" name="contrast"/>
|
|
118
|
+
<Param val="False" valType="bool" updates="None" name="disabled"/>
|
|
119
|
+
<Param val="False" valType="code" updates="constant" name="draggable"/>
|
|
120
|
+
<Param val="" valType="code" updates="None" name="durationEstim"/>
|
|
121
|
+
<Param val="None" valType="str" updates="constant" name="flip"/>
|
|
122
|
+
<Param val="Arial" valType="str" updates="constant" name="font"/>
|
|
123
|
+
<Param val="LTR" valType="str" updates="None" name="languageStyle"/>
|
|
124
|
+
<Param val="0.05" valType="num" updates="constant" name="letterHeight"/>
|
|
125
|
+
<Param val="text" valType="code" updates="None" name="name"/>
|
|
126
|
+
<Param val="" valType="num" updates="constant" name="opacity"/>
|
|
127
|
+
<Param val="0" valType="num" updates="constant" name="ori"/>
|
|
128
|
+
<Param val="(0, 0)" valType="list" updates="constant" name="pos"/>
|
|
129
|
+
<Param val="True" valType="bool" updates="None" name="saveStartStop"/>
|
|
130
|
+
<Param val="" valType="code" updates="None" name="startEstim"/>
|
|
131
|
+
<Param val="time (s)" valType="str" updates="None" name="startType"/>
|
|
132
|
+
<Param val="0.0" valType="code" updates="None" name="startVal"/>
|
|
133
|
+
<Param val="duration (s)" valType="str" updates="None" name="stopType"/>
|
|
134
|
+
<Param val="0.1" valType="code" updates="constant" name="stopVal"/>
|
|
135
|
+
<Param val="True" valType="bool" updates="None" name="syncScreenRefresh"/>
|
|
136
|
+
<Param val="$trials.thisN" valType="str" updates="set every repeat" name="text"/>
|
|
137
|
+
<Param val="from exp settings" valType="str" updates="None" name="units"/>
|
|
138
|
+
<Param val="" valType="code" updates="None" name="validator"/>
|
|
139
|
+
<Param val="" valType="num" updates="constant" name="wrapWidth"/>
|
|
140
|
+
</TextComponent>
|
|
141
|
+
</Routine>
|
|
142
|
+
</Routines>
|
|
143
|
+
<Flow>
|
|
144
|
+
<LoopInitiator loopType="TrialHandler" name="trials">
|
|
145
|
+
<Param name="Selected rows" updates="None" val="" valType="str"/>
|
|
146
|
+
<Param name="conditions" updates="None" val="None" valType="str"/>
|
|
147
|
+
<Param name="conditionsFile" updates="None" val="" valType="file"/>
|
|
148
|
+
<Param name="endPoints" updates="None" val="[0, 1]" valType="num"/>
|
|
149
|
+
<Param name="isTrials" updates="None" val="True" valType="bool"/>
|
|
150
|
+
<Param name="loopType" updates="None" val="sequential" valType="str"/>
|
|
151
|
+
<Param name="nReps" updates="None" val="10" valType="num"/>
|
|
152
|
+
<Param name="name" updates="None" val="trials" valType="code"/>
|
|
153
|
+
<Param name="random seed" updates="None" val="" valType="code"/>
|
|
154
|
+
</LoopInitiator>
|
|
155
|
+
<Routine name="trial"/>
|
|
156
|
+
<LoopTerminator name="trials"/>
|
|
157
|
+
</Flow>
|
|
158
|
+
</PsychoPy2experiment>
|
|
Binary file
|
|
@@ -9,12 +9,12 @@ py.test fixtures to create an instance of PsychoPyApp for testing
|
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
import pytest
|
|
12
|
-
from
|
|
12
|
+
from packaging.version import Version
|
|
13
13
|
import psychopy.app as app
|
|
14
14
|
from PIL import Image
|
|
15
15
|
Image.DEBUG = False
|
|
16
16
|
|
|
17
|
-
if
|
|
17
|
+
if Version(pytest.__version__) < Version('5'):
|
|
18
18
|
class VersionError(Exception):
|
|
19
19
|
pass
|
|
20
20
|
raise VersionError("PsychoPy test suite requires pytest>=5.4")
|
|
@@ -3,7 +3,7 @@ import sys
|
|
|
3
3
|
import numpy
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
|
|
6
|
-
from
|
|
6
|
+
from psychopy.tests.utils import TESTS_DATA_PATH, RUNNING_IN_VM
|
|
7
7
|
|
|
8
8
|
import shutil
|
|
9
9
|
from tempfile import mkdtemp
|
|
@@ -16,6 +16,9 @@ from ... import logging
|
|
|
16
16
|
class TestSpeed:
|
|
17
17
|
def setup_method(self):
|
|
18
18
|
self.tmp_dir = mkdtemp(prefix='psychopy-tests-app')
|
|
19
|
+
# skip speed tests under vm
|
|
20
|
+
if RUNNING_IN_VM:
|
|
21
|
+
pytest.skip()
|
|
19
22
|
|
|
20
23
|
def teardown_method(self):
|
|
21
24
|
shutil.rmtree(self.tmp_dir, ignore_errors=True)
|
|
@@ -138,7 +138,7 @@ class TestTrialHandler2:
|
|
|
138
138
|
|
|
139
139
|
for thisTrial in trials:
|
|
140
140
|
resp = 'resp' + str(thisTrial['trialType'])
|
|
141
|
-
randResp = rng.rand()
|
|
141
|
+
randResp = np.round(rng.rand(), 9)
|
|
142
142
|
trials.addData('resp', resp)
|
|
143
143
|
trials.addData('rand', randResp)
|
|
144
144
|
|
|
@@ -244,6 +244,151 @@ class TestTrialHandler2:
|
|
|
244
244
|
|
|
245
245
|
t_loaded = fromFile(path)
|
|
246
246
|
assert t == t_loaded
|
|
247
|
+
|
|
248
|
+
def test_getAllTrials(self):
|
|
249
|
+
"""
|
|
250
|
+
Check that TrialHandler2.getAllTrials returns as expected
|
|
251
|
+
"""
|
|
252
|
+
# make a trial handler
|
|
253
|
+
t = data.TrialHandler2(
|
|
254
|
+
self.conditions,
|
|
255
|
+
nReps=2,
|
|
256
|
+
method="sequential"
|
|
257
|
+
)
|
|
258
|
+
# check that calling now (before upcoming trials are calculated) doesn't break anything
|
|
259
|
+
trials, i = t.getAllTrials()
|
|
260
|
+
assert trials == [None]
|
|
261
|
+
assert i == 0
|
|
262
|
+
# move on to the first trial, triggering upcoming trials to be calculated
|
|
263
|
+
t.__next__()
|
|
264
|
+
# get an exemplar array of what trials should look like
|
|
265
|
+
exemplar, _ = t.getAllTrials()
|
|
266
|
+
# define array of cases to try
|
|
267
|
+
cases = [
|
|
268
|
+
{'advance': 2, 'i': 2},
|
|
269
|
+
{'advance': 1, 'i': 3},
|
|
270
|
+
{'advance': -2, 'i': 1},
|
|
271
|
+
]
|
|
272
|
+
# try cases
|
|
273
|
+
for case in cases:
|
|
274
|
+
# move forwards/backwards according to case values
|
|
275
|
+
if case['advance'] >= 0:
|
|
276
|
+
t.skipTrials(case['advance'])
|
|
277
|
+
else:
|
|
278
|
+
t.rewindTrials(case['advance'])
|
|
279
|
+
# get trials
|
|
280
|
+
trials, i = t.getAllTrials()
|
|
281
|
+
# make sure array is unchanged and i is as we expect
|
|
282
|
+
assert trials == exemplar
|
|
283
|
+
assert i == case['i']
|
|
284
|
+
|
|
285
|
+
def test_getFutureTrials(self):
|
|
286
|
+
"""
|
|
287
|
+
Check that TrialHandler2 can return future trials correctly.
|
|
288
|
+
"""
|
|
289
|
+
# make a trial handler
|
|
290
|
+
t = data.TrialHandler2(
|
|
291
|
+
self.conditions,
|
|
292
|
+
nReps=2,
|
|
293
|
+
method="sequential"
|
|
294
|
+
)
|
|
295
|
+
# check that calling now (before upcoming trials are calculated) doesn't break anything
|
|
296
|
+
up1 = t.getFutureTrial(1)
|
|
297
|
+
ups3 = t.getFutureTrials(3)
|
|
298
|
+
# move on to the first trial, triggering upcoming trials to be calculated
|
|
299
|
+
t.__next__()
|
|
300
|
+
# define array of answers
|
|
301
|
+
answers = [
|
|
302
|
+
{'thisN': 5, 'thisRepN': 2, 'thisTrialN': 2, 'thisIndex': 2},
|
|
303
|
+
{'thisN': 1, 'thisRepN': 1, 'thisTrialN': 1, 'thisIndex': 1},
|
|
304
|
+
{'thisN': 2, 'thisRepN': 1, 'thisTrialN': 2, 'thisIndex': 2},
|
|
305
|
+
{'thisN': 3, 'thisRepN': 2, 'thisTrialN': 0, 'thisIndex': 0},
|
|
306
|
+
{'thisN': 4, 'thisRepN': 2, 'thisTrialN': 1, 'thisIndex': 1},
|
|
307
|
+
{'thisN': 5, 'thisRepN': 2, 'thisTrialN': 2, 'thisIndex': 2},
|
|
308
|
+
None,
|
|
309
|
+
]
|
|
310
|
+
# get future trials
|
|
311
|
+
for n in range(7):
|
|
312
|
+
trial = t.getFutureTrial(n)
|
|
313
|
+
if trial is not None:
|
|
314
|
+
# if we got a trial, make sure each attribute matches expected
|
|
315
|
+
for key in answers[n]:
|
|
316
|
+
assert getattr(trial, key) == answers[n][key]
|
|
317
|
+
else:
|
|
318
|
+
# if we got None, make sure we were expecting to
|
|
319
|
+
assert answers[n] is None
|
|
320
|
+
# test getting all trials
|
|
321
|
+
trials = t.getFutureTrials(None)
|
|
322
|
+
for i in range(len(trials)):
|
|
323
|
+
assert trials[i] == t.upcomingTrials[i]
|
|
324
|
+
|
|
325
|
+
def test_skipTrials_rewindTrials(self):
|
|
326
|
+
# make trial hancler
|
|
327
|
+
t = data.TrialHandler2(
|
|
328
|
+
self.conditions,
|
|
329
|
+
nReps=2,
|
|
330
|
+
method="sequential"
|
|
331
|
+
)
|
|
332
|
+
t.__next__()
|
|
333
|
+
# some values to move forwards/backwards by and the values at that point
|
|
334
|
+
cases = [
|
|
335
|
+
# move backwards and forwards and check we land in the right place
|
|
336
|
+
(+4, {'thisN': 4, 'thisRepN': 2, 'thisTrialN': 1, 'thisIndex': 1}),
|
|
337
|
+
(-1, {'thisN': 3, 'thisRepN': 2, 'thisTrialN': 0, 'thisIndex': 0}),
|
|
338
|
+
(-3, {'thisN': 0, 'thisRepN': 1, 'thisTrialN': 0, 'thisIndex': 0}),
|
|
339
|
+
(+2, {'thisN': 2, 'thisRepN': 1, 'thisTrialN': 2, 'thisIndex': 2}),
|
|
340
|
+
(-1, {'thisN': 1, 'thisRepN': 1, 'thisTrialN': 1, 'thisIndex': 1}),
|
|
341
|
+
(+2, {'thisN': 3, 'thisRepN': 2, 'thisTrialN': 0, 'thisIndex': 0}),
|
|
342
|
+
# move back past the start and check we land at the start
|
|
343
|
+
(-10, {'thisN': 0, 'thisRepN': 1, 'thisTrialN': 0, 'thisIndex': 0}),
|
|
344
|
+
# move forwards past the end and check we land at the end
|
|
345
|
+
(+10, {'thisN': 5, 'thisRepN': 2, 'thisTrialN': 2, 'thisIndex': 2}),
|
|
346
|
+
]
|
|
347
|
+
# iterate through cases
|
|
348
|
+
for inc, answer in cases:
|
|
349
|
+
if inc < 0:
|
|
350
|
+
# if increment is negative, rewind
|
|
351
|
+
t.rewindTrials(inc)
|
|
352
|
+
else:
|
|
353
|
+
# if positive, skip
|
|
354
|
+
t.skipTrials(inc)
|
|
355
|
+
# check that new current Trial is correct
|
|
356
|
+
for key in answer:
|
|
357
|
+
assert getattr(t.thisTrial, key) == answer[key], (
|
|
358
|
+
f"Was expecting current trial to match all fields {answer}, instead was "
|
|
359
|
+
f"{t.thisTrial.getDict()} (different {key})"
|
|
360
|
+
)
|
|
361
|
+
# check that trials are still in the correct order
|
|
362
|
+
if t.upcomingTrials:
|
|
363
|
+
assert t.upcomingTrials[0].thisN == t.thisTrial.thisN + 1
|
|
364
|
+
else:
|
|
365
|
+
# if there's no upcoming trials, thisN should be 5
|
|
366
|
+
assert t.thisTrial.thisN == 5
|
|
367
|
+
if t.elapsedTrials:
|
|
368
|
+
assert t.elapsedTrials[-1].thisN == t.thisTrial.thisN - 1
|
|
369
|
+
else:
|
|
370
|
+
# if there's no elapsed trials, thisN should be 0
|
|
371
|
+
assert t.thisTrial.thisN == 0
|
|
372
|
+
|
|
373
|
+
def test_finished(self):
|
|
374
|
+
# make trial hancler
|
|
375
|
+
t = data.TrialHandler2(
|
|
376
|
+
self.conditions,
|
|
377
|
+
nReps=2,
|
|
378
|
+
method="sequential"
|
|
379
|
+
)
|
|
380
|
+
t.__next__()
|
|
381
|
+
# there are trials remaining, so .finished should be False
|
|
382
|
+
assert not t.finished
|
|
383
|
+
# try setting .finished and confirm that subsequent trials are skipped
|
|
384
|
+
t.finished = True
|
|
385
|
+
assert not len(t.upcomingTrials)
|
|
386
|
+
# now set not finished and confirm trials are back
|
|
387
|
+
t.finished = False
|
|
388
|
+
assert len(t.upcomingTrials)
|
|
389
|
+
# now skip past the end and confirm that .finished is True again
|
|
390
|
+
t.skipTrials(n=100)
|
|
391
|
+
assert t.finished
|
|
247
392
|
|
|
248
393
|
|
|
249
394
|
class TestTrialHandler2Output():
|
|
Binary file
|
|
@@ -2,10 +2,10 @@ import sys
|
|
|
2
2
|
import os
|
|
3
3
|
import io
|
|
4
4
|
|
|
5
|
-
from
|
|
5
|
+
from packaging.version import Version
|
|
6
6
|
import wx
|
|
7
7
|
|
|
8
|
-
if
|
|
8
|
+
if Version(wx.__version__) < Version('2.9'):
|
|
9
9
|
tmpApp = wx.PySimpleApp()
|
|
10
10
|
else:
|
|
11
11
|
tmpApp = wx.App(False)
|
|
@@ -26,7 +26,7 @@ try:
|
|
|
26
26
|
allComp = getAllComponents(fetchIcons=False)
|
|
27
27
|
except Exception:
|
|
28
28
|
import wx
|
|
29
|
-
if
|
|
29
|
+
if Version(wx.__version__) < Version('2.9'):
|
|
30
30
|
tmpApp = wx.PySimpleApp()
|
|
31
31
|
else:
|
|
32
32
|
tmpApp = wx.App(False)
|
|
@@ -8,7 +8,7 @@ import warnings
|
|
|
8
8
|
from psychopy import constants
|
|
9
9
|
from psychopy.experiment import getAllComponents, Param, utils
|
|
10
10
|
from psychopy import experiment
|
|
11
|
-
from
|
|
11
|
+
from packaging.version import Version
|
|
12
12
|
|
|
13
13
|
# use "python genComponsTemplate.py --out" to generate a new profile to test against
|
|
14
14
|
# = analogous to a baseline image to compare screenshots
|
|
@@ -44,7 +44,7 @@ class TestComponents():
|
|
|
44
44
|
cls.allComp = getAllComponents(fetchIcons=False)
|
|
45
45
|
except Exception:
|
|
46
46
|
import wx
|
|
47
|
-
if
|
|
47
|
+
if Version(wx.__version__) < Version('2.9'):
|
|
48
48
|
tmpApp = wx.PySimpleApp()
|
|
49
49
|
else:
|
|
50
50
|
tmpApp = wx.App(False)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from psychopy.experiment.components.keyboard import KeyboardComponent
|
|
3
|
+
from psychopy.hardware.keyboard import Keyboard, KeyboardDevice
|
|
4
|
+
from psychopy.tests import utils
|
|
5
|
+
from psychopy.tests.test_experiment.test_components import BaseComponentTests
|
|
6
|
+
from psychopy import session
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TestKeyboardComponent(BaseComponentTests):
|
|
10
|
+
comp = KeyboardComponent
|
|
11
|
+
libraryClass = Keyboard
|
|
12
|
+
|
|
13
|
+
def setup_class(self):
|
|
14
|
+
# make a Session
|
|
15
|
+
self.session = session.Session(
|
|
16
|
+
root=Path(utils.TESTS_DATA_PATH) / "test_components",
|
|
17
|
+
)
|
|
18
|
+
# setup default window
|
|
19
|
+
self.session.setupWindowFromParams({})
|
|
20
|
+
|
|
21
|
+
def testKeyboardClear(self):
|
|
22
|
+
"""
|
|
23
|
+
Test that KeyPress responses are cleared at the start of each Routine
|
|
24
|
+
"""
|
|
25
|
+
# add keyboard clear experiment
|
|
26
|
+
self.session.addExperiment("testClearKeyboard/testClearKeyboard.psyexp", "keyboardClear")
|
|
27
|
+
# run keyboard clear experiment (will error if assertion not met)
|
|
28
|
+
self.session.runExperiment("keyboardClear")
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from psychopy.tests.test_experiment.test_components.test_base_components import BaseComponentTests
|
|
2
|
+
from psychopy.experiment.components.unknownPlugin import UnknownPluginComponent
|
|
3
|
+
from psychopy.experiment import Experiment
|
|
4
|
+
from psychopy.tests import utils
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
class TestUnknownPluginComponent(BaseComponentTests):
|
|
8
|
+
comp = UnknownPluginComponent
|
|
9
|
+
|
|
10
|
+
def test_load_resave(self):
|
|
11
|
+
"""
|
|
12
|
+
Test that loading an experiment with an unrecognised plugin Component retains the original
|
|
13
|
+
name and source plugin for that Component.
|
|
14
|
+
"""
|
|
15
|
+
# load experiment from file which has an unrecognised plugin component in
|
|
16
|
+
testExp = Path(utils.TESTS_DATA_PATH) / "TestUnknownPluginComponent_load_resave.psyexp"
|
|
17
|
+
exp = Experiment.fromFile(testExp)
|
|
18
|
+
# get unrecognised component
|
|
19
|
+
comp = exp.routines['trial'][-1]
|
|
20
|
+
# check its type and plugin values
|
|
21
|
+
assert comp.type == "TestFromPluginComponent"
|
|
22
|
+
assert comp.plugin == "psychopy-plugin-which-doesnt-exist"
|
|
23
|
+
# get its xml
|
|
24
|
+
xml = comp._xml
|
|
25
|
+
# check its tag and plugin attribute are retained
|
|
26
|
+
assert xml.tag == "TestFromPluginComponent"
|
|
27
|
+
assert comp.plugin == "psychopy-plugin-which-doesnt-exist"
|