psychopy 2024.2.5__py3-none-any.whl → 2025.1.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/CHANGELOG.txt +4 -4
- psychopy/GIT_SHA +1 -1
- psychopy/LICENSE.txt +1 -1
- psychopy/VERSION +1 -1
- psychopy/__init__.py +10 -7
- psychopy/alerts/__init__.py +1 -1
- psychopy/alerts/_alerts.py +53 -17
- psychopy/alerts/_errorHandler.py +3 -4
- psychopy/alerts/alertsCatalogue/3210.yaml +27 -0
- psychopy/alerts/alertsCatalogue/3610.yaml +19 -0
- psychopy/alerts/alertsCatalogue/4130.yaml +19 -0
- psychopy/alerts/alertsCatalogue/alertCategories.yaml +8 -1
- psychopy/alerts/alertsCatalogue/alertmsg.py +1 -1
- psychopy/alerts/alerttools.py +0 -16
- psychopy/app/Resources/betasplash.png +0 -0
- psychopy/app/Resources/betasplash@2x.png +0 -0
- psychopy/app/Resources/classic/case.png +0 -0
- psychopy/app/Resources/classic/case@2x.png +0 -0
- psychopy/app/Resources/classic/fileaudio.png +0 -0
- psychopy/app/Resources/classic/fileaudio@2x.png +0 -0
- psychopy/app/Resources/classic/filecss.png +0 -0
- psychopy/app/Resources/classic/filecss@2x.png +0 -0
- psychopy/app/Resources/classic/filecsv.png +0 -0
- psychopy/app/Resources/classic/filecsv@2x.png +0 -0
- psychopy/app/Resources/classic/filedesign.png +0 -0
- psychopy/app/Resources/classic/filedesign@2x.png +0 -0
- psychopy/app/Resources/classic/filefont.png +0 -0
- psychopy/app/Resources/classic/filefont@2x.png +0 -0
- psychopy/app/Resources/classic/filegit.png +0 -0
- psychopy/app/Resources/classic/filegit@2x.png +0 -0
- psychopy/app/Resources/classic/filehtml.png +0 -0
- psychopy/app/Resources/classic/filehtml@2x.png +0 -0
- psychopy/app/Resources/classic/fileimage.png +0 -0
- psychopy/app/Resources/classic/fileimage@2x.png +0 -0
- psychopy/app/Resources/classic/fileinfo.png +0 -0
- psychopy/app/Resources/classic/fileinfo@2x.png +0 -0
- psychopy/app/Resources/classic/filejs.png +0 -0
- psychopy/app/Resources/classic/filejs@2x.png +0 -0
- psychopy/app/Resources/classic/filejson.png +0 -0
- psychopy/app/Resources/classic/filejson@2x.png +0 -0
- psychopy/app/Resources/classic/filepkg.png +0 -0
- psychopy/app/Resources/classic/filepkg@2x.png +0 -0
- psychopy/app/Resources/classic/filepsyexp.png +0 -0
- psychopy/app/Resources/classic/filepsyexp@2x.png +0 -0
- psychopy/app/Resources/classic/filepy.png +0 -0
- psychopy/app/Resources/classic/filepy@2x.png +0 -0
- psychopy/app/Resources/classic/filetxt.png +0 -0
- psychopy/app/Resources/classic/filetxt@2x.png +0 -0
- psychopy/app/Resources/classic/fileunknown.png +0 -0
- psychopy/app/Resources/classic/fileunknown@2x.png +0 -0
- psychopy/app/Resources/classic/filevideo.png +0 -0
- psychopy/app/Resources/classic/filevideo@2x.png +0 -0
- psychopy/app/Resources/classic/find.png +0 -0
- psychopy/app/Resources/classic/find@2x.png +0 -0
- psychopy/app/Resources/classic/loop.png +0 -0
- psychopy/app/Resources/classic/loop@2x.png +0 -0
- psychopy/app/Resources/classic/regex.png +0 -0
- psychopy/app/Resources/classic/regex@2x.png +0 -0
- psychopy/app/Resources/dark/case.png +0 -0
- psychopy/app/Resources/dark/case@2x.png +0 -0
- psychopy/app/Resources/dark/fileaudio.png +0 -0
- psychopy/app/Resources/dark/fileaudio@2x.png +0 -0
- psychopy/app/Resources/dark/filecss.png +0 -0
- psychopy/app/Resources/dark/filecss@2x.png +0 -0
- psychopy/app/Resources/dark/filecsv.png +0 -0
- psychopy/app/Resources/dark/filecsv@2x.png +0 -0
- psychopy/app/Resources/dark/filedesign.png +0 -0
- psychopy/app/Resources/dark/filedesign@2x.png +0 -0
- psychopy/app/Resources/dark/filefont.png +0 -0
- psychopy/app/Resources/dark/filefont@2x.png +0 -0
- psychopy/app/Resources/dark/filegit.png +0 -0
- psychopy/app/Resources/dark/filegit@2x.png +0 -0
- psychopy/app/Resources/dark/filehtml.png +0 -0
- psychopy/app/Resources/dark/filehtml@2x.png +0 -0
- psychopy/app/Resources/dark/fileimage.png +0 -0
- psychopy/app/Resources/dark/fileimage@2x.png +0 -0
- psychopy/app/Resources/dark/fileinfo.png +0 -0
- psychopy/app/Resources/dark/fileinfo@2x.png +0 -0
- psychopy/app/Resources/dark/filejs.png +0 -0
- psychopy/app/Resources/dark/filejs@2x.png +0 -0
- psychopy/app/Resources/dark/filejson.png +0 -0
- psychopy/app/Resources/dark/filejson@2x.png +0 -0
- psychopy/app/Resources/dark/filepkg.png +0 -0
- psychopy/app/Resources/dark/filepkg@2x.png +0 -0
- psychopy/app/Resources/dark/filepsyexp.png +0 -0
- psychopy/app/Resources/dark/filepsyexp@2x.png +0 -0
- psychopy/app/Resources/dark/filepy.png +0 -0
- psychopy/app/Resources/dark/filepy@2x.png +0 -0
- psychopy/app/Resources/dark/filetxt.png +0 -0
- psychopy/app/Resources/dark/filetxt@2x.png +0 -0
- psychopy/app/Resources/dark/fileunknown.png +0 -0
- psychopy/app/Resources/dark/fileunknown@2x.png +0 -0
- psychopy/app/Resources/dark/filevideo.png +0 -0
- psychopy/app/Resources/dark/filevideo@2x.png +0 -0
- psychopy/app/Resources/dark/find.png +0 -0
- psychopy/app/Resources/dark/find@2x.png +0 -0
- psychopy/app/Resources/dark/loop.png +0 -0
- psychopy/app/Resources/dark/loop@2x.png +0 -0
- psychopy/app/Resources/dark/regex.png +0 -0
- psychopy/app/Resources/dark/regex@2x.png +0 -0
- psychopy/app/Resources/light/case.png +0 -0
- psychopy/app/Resources/light/case@2x.png +0 -0
- psychopy/app/Resources/light/fileaudio.png +0 -0
- psychopy/app/Resources/light/fileaudio@2x.png +0 -0
- psychopy/app/Resources/light/filecss.png +0 -0
- psychopy/app/Resources/light/filecss@2x.png +0 -0
- psychopy/app/Resources/light/filecsv.png +0 -0
- psychopy/app/Resources/light/filecsv@2x.png +0 -0
- psychopy/app/Resources/light/filedesign.png +0 -0
- psychopy/app/Resources/light/filedesign@2x.png +0 -0
- psychopy/app/Resources/light/filefont.png +0 -0
- psychopy/app/Resources/light/filefont@2x.png +0 -0
- psychopy/app/Resources/light/filegit.png +0 -0
- psychopy/app/Resources/light/filegit@2x.png +0 -0
- psychopy/app/Resources/light/filehtml.png +0 -0
- psychopy/app/Resources/light/filehtml@2x.png +0 -0
- psychopy/app/Resources/light/fileimage.png +0 -0
- psychopy/app/Resources/light/fileimage@2x.png +0 -0
- psychopy/app/Resources/light/fileinfo.png +0 -0
- psychopy/app/Resources/light/fileinfo@2x.png +0 -0
- psychopy/app/Resources/light/filejs.png +0 -0
- psychopy/app/Resources/light/filejs@2x.png +0 -0
- psychopy/app/Resources/light/filejson.png +0 -0
- psychopy/app/Resources/light/filejson@2x.png +0 -0
- psychopy/app/Resources/light/filepkg.png +0 -0
- psychopy/app/Resources/light/filepkg@2x.png +0 -0
- psychopy/app/Resources/light/filepsyexp.png +0 -0
- psychopy/app/Resources/light/filepsyexp@2x.png +0 -0
- psychopy/app/Resources/light/filepy.png +0 -0
- psychopy/app/Resources/light/filepy@2x.png +0 -0
- psychopy/app/Resources/light/filetxt.png +0 -0
- psychopy/app/Resources/light/filetxt@2x.png +0 -0
- psychopy/app/Resources/light/fileunknown.png +0 -0
- psychopy/app/Resources/light/fileunknown@2x.png +0 -0
- psychopy/app/Resources/light/filevideo.png +0 -0
- psychopy/app/Resources/light/filevideo@2x.png +0 -0
- psychopy/app/Resources/light/find.png +0 -0
- psychopy/app/Resources/light/find@2x.png +0 -0
- psychopy/app/Resources/light/loop.png +0 -0
- psychopy/app/Resources/light/loop@2x.png +0 -0
- psychopy/app/Resources/light/regex.png +0 -0
- psychopy/app/Resources/light/regex@2x.png +0 -0
- psychopy/app/Resources/routine_templates/Basic.psyexp +0 -1
- psychopy/app/Resources/routine_templates/Misc.psyexp +0 -1
- psychopy/app/Resources/routine_templates/Online.psyexp +0 -2
- psychopy/app/Resources/routine_templates/Trials.psyexp +0 -1
- psychopy/app/Resources/splash.png +0 -0
- psychopy/app/Resources/splash@2x.png +0 -0
- psychopy/app/__init__.py +49 -8
- psychopy/app/__main__.py +3 -0
- psychopy/app/_psychopyApp.py +134 -125
- psychopy/app/builder/builder.py +42 -22
- psychopy/app/builder/dialogs/__init__.py +44 -11
- psychopy/app/builder/dialogs/dlgsCode.py +1 -1
- psychopy/app/builder/dialogs/dlgsConditions.py +1 -1
- psychopy/app/builder/dialogs/findDlg.py +106 -20
- psychopy/app/builder/dialogs/paramCtrls.py +42 -1
- psychopy/app/builder/validators.py +1 -1
- psychopy/app/coder/codeEditorBase.py +8 -8
- psychopy/app/coder/coder.py +32 -29
- psychopy/app/coder/fileBrowser.py +68 -22
- psychopy/app/coder/folding.py +1 -1
- psychopy/app/coder/psychoParser.py +1 -1
- psychopy/app/coder/repl.py +1 -1
- psychopy/app/coder/sourceTree.py +1 -1
- psychopy/app/connections/__init__.py +1 -1
- psychopy/app/connections/news.py +1 -1
- psychopy/app/connections/sendusage.py +1 -1
- psychopy/app/connections/updates.py +1 -1
- psychopy/app/console.py +1 -1
- psychopy/app/errorDlg.py +1 -1
- psychopy/app/frametracker.py +1 -1
- psychopy/app/idle.py +1 -1
- psychopy/app/jobs.py +5 -2
- psychopy/app/linuxconfig/__init__.py +1 -1
- psychopy/app/locale/ar_001/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ar_001/LC_MESSAGE/messages.po +4 -4
- psychopy/app/locale/cs_CZ/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/da_DK/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/de_DE/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/de_DE/LC_MESSAGE/messages.po +3 -3
- psychopy/app/locale/el_GR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/en_NZ/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/en_US/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_CO/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_CO/LC_MESSAGE/messages.po +4 -4
- psychopy/app/locale/es_ES/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_ES/LC_MESSAGE/messages.po +4 -4
- psychopy/app/locale/es_US/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_US/LC_MESSAGE/messages.po +4 -4
- psychopy/app/locale/et_EE/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/et_EE/LC_MESSAGE/messages.po +2 -2
- psychopy/app/locale/fa_IR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/fa_IR/LC_MESSAGE/messages.po +1 -1
- psychopy/app/locale/fi_FI/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/fr_FR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/fr_FR/LC_MESSAGE/messages.po +2 -2
- psychopy/app/locale/he_IL/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/he_IL/LC_MESSAGE/messages.po +2 -2
- psychopy/app/locale/hi_IN/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/hi_IN/LC_MESSAGE/messages.po +2 -2
- psychopy/app/locale/hu_HU/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/it_IT/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/it_IT/LC_MESSAGE/messages.po +2 -2
- psychopy/app/locale/ja_JP/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ja_JP/LC_MESSAGE/messages.po +3421 -2396
- psychopy/app/locale/ko_KR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ms_MY/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ms_MY/LC_MESSAGE/messages.po +2 -2
- psychopy/app/locale/nl_NL/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/nn_NO/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/pl_PL/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/pt_PT/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/pt_PT/LC_MESSAGE/messages.po +4 -4
- psychopy/app/locale/ro_RO/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ru_RU/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/sv_SE/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/sv_SE/LC_MESSAGE/messages.po +2 -2
- psychopy/app/locale/tr_TR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/tr_TR/LC_MESSAGE/messages.po +2 -2
- psychopy/app/locale/zh_CN/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/zh_CN/LC_MESSAGE/messages.po +3 -3
- psychopy/app/locale/zh_TW/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/zh_TW/LC_MESSAGE/messages.po +2 -2
- psychopy/app/{builder/localizedStrings.py → localizedStrings.py} +173 -26
- psychopy/app/pavlovia_ui/__init__.py +1 -1
- psychopy/app/pavlovia_ui/_base.py +1 -1
- psychopy/app/pavlovia_ui/functions.py +1 -1
- psychopy/app/pavlovia_ui/menu.py +1 -1
- psychopy/app/pavlovia_ui/project.py +1 -1
- psychopy/app/pavlovia_ui/search.py +1 -1
- psychopy/app/pavlovia_ui/sync.py +1 -1
- psychopy/app/pavlovia_ui/user.py +1 -1
- psychopy/app/plugin_manager/dialog.py +34 -96
- psychopy/app/plugin_manager/packages.py +10 -14
- psychopy/app/plugin_manager/plugins.py +64 -4
- psychopy/app/preferencesDlg.py +12 -37
- psychopy/app/psychopyApp.py +130 -44
- psychopy/app/ribbon.py +1 -0
- psychopy/app/runner/runner.py +19 -7
- psychopy/app/runner/scriptProcess.py +11 -6
- psychopy/app/stdout/stdOutRich.py +9 -2
- psychopy/app/themes/fonts.py +1 -1
- psychopy/app/themes/icons.py +2 -38
- psychopy/app/ui/__init__.py +1 -1
- psychopy/app/utils.py +3 -3
- psychopy/assets/default.mp3 +0 -0
- psychopy/assets/fonts/NotoSans-Bold.ttf +0 -0
- psychopy/assets/fonts/NotoSans-BoldItalic.ttf +0 -0
- psychopy/assets/fonts/NotoSans-Italic.ttf +0 -0
- psychopy/assets/fonts/NotoSans-Regular.ttf +0 -0
- psychopy/assets/voicekeyThresholdStim.wav +0 -0
- psychopy/clock.py +4 -1
- psychopy/colors.py +2 -0
- psychopy/core.py +1 -1
- psychopy/data/base.py +1 -1
- psychopy/data/experiment.py +151 -46
- psychopy/data/routine.py +27 -1
- psychopy/data/staircase.py +2 -1
- psychopy/data/trial.py +62 -14
- psychopy/data/utils.py +1 -1
- psychopy/demos/builder/Design Templates/branchedExperiment/branchedExperiment.psyexp +333 -218
- psychopy/demos/builder/Design Templates/psychophysicsStaircase/psychophysicsStaircase.psyexp +261 -239
- psychopy/demos/builder/Design Templates/psychophysicsStairsInterleaved/psychophysicsStaircaseInterleaved.psyexp +319 -180
- psychopy/demos/builder/Design Templates/randomisedBlocks/randomisedBlocks.psyexp +204 -116
- psychopy/demos/builder/Experiments/BART/assets/background.jpg +0 -0
- psychopy/demos/builder/Experiments/BART/assets/blueBalloon.png +0 -0
- psychopy/demos/builder/Experiments/BART/assets/greenBalloon.png +0 -0
- psychopy/demos/builder/Experiments/BART/assets/redBalloon.png +0 -0
- psychopy/demos/builder/Experiments/BART/bart.psyexp +779 -866
- psychopy/demos/builder/Experiments/BigFiveInventory/BFI.psyexp +242 -180
- psychopy/demos/builder/Experiments/GoNoGo/gng.psyexp +419 -406
- psychopy/demos/builder/Experiments/dragAndDrop/README.md +2 -37
- psychopy/demos/builder/Experiments/dragAndDrop/drag_and_drop.psyexp +460 -1204
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/blank_grid.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/make_shapes.psyexp +221 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/readme.md +4 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/solution_1.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/solution_10.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/solution_2.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/solution_3.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/solution_4.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/solution_5.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/solution_6.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/solution_7.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/solution_8.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/solution_9.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/solutions.xlsx +0 -0
- psychopy/demos/builder/Experiments/mentalRotation/MentalRotation.psyexp +583 -542
- psychopy/demos/builder/Experiments/navon/NavonTask.psyexp +458 -427
- psychopy/demos/builder/Experiments/sternberg/sternberg.psyexp +588 -550
- psychopy/demos/builder/Experiments/stroop/stroop.psyexp +303 -207
- psychopy/demos/builder/Experiments/stroopExtended/stroop.psyexp +390 -215
- psychopy/demos/builder/Experiments/stroopExtended/stroopReverse.psyexp +390 -215
- psychopy/demos/builder/Experiments/stroopVoice/stroopVoice.psyexp +357 -331
- psychopy/demos/builder/Feature Demos/buttonBox/buttonBoxDemo.psyexp +3 -2
- psychopy/demos/builder/Feature Demos/counterbalance/counterbalance.psyexp +287 -277
- psychopy/demos/builder/Feature Demos/gratings/gratings.psyexp +370 -320
- psychopy/demos/builder/Feature Demos/noise/noise.psyexp +452 -399
- psychopy/demos/builder/Feature Demos/panorama/panorama.psyexp +168 -133
- psychopy/demos/builder/Feature Demos/pilotMode/pilotMode.psyexp +4 -3
- psychopy/demos/builder/Feature Demos/progress/progressBar.psyexp +420 -392
- psychopy/demos/builder/Feature Demos/sliders/sliders.psyexp +917 -871
- psychopy/demos/builder/Feature Demos/visualValidator/readme.md +7 -0
- psychopy/demos/builder/Feature Demos/visualValidator/visualValidator.psyexp +200 -0
- psychopy/demos/builder/Hardware/EEG_parallel_component/EEG_triggers_parallel_comp.psyexp +25 -9
- psychopy/demos/builder/Hardware/EEG_serial_code/EEG_triggers_serial_code.psyexp +372 -361
- psychopy/demos/builder/Hardware/EEG_serial_component/EEG_triggers_serial_comp.psyexp +25 -9
- psychopy/demos/builder/Hardware/EGI_netstation/stroop.psyexp +320 -235
- psychopy/demos/builder/Hardware/Eyetracking_visual_search/visualSearch.psyexp +790 -651
- psychopy/demos/builder/Hardware/camera/camera.psyexp +326 -246
- psychopy/demos/builder/Hardware/eyetracking/eyetracking.psyexp +432 -327
- psychopy/demos/builder/Hardware/eyetracking_custom_cal/eyetracking_custom_cal.psyexp +440 -321
- psychopy/demos/builder/Hardware/fMRI/fMRI_demo.psyexp +190 -181
- psychopy/demos/builder/Hardware/lab_streaming_layer/lsl_triggers_demo.psyexp +323 -312
- psychopy/demos/builder/Hardware/lab_streaming_layer/lsl_triggers_demo_legacy.psyexp +360 -0
- psychopy/demos/builder/Hardware/lab_streaming_layer/lsl_triggers_demo_legacy_legacy.psyexp +312 -0
- psychopy/demos/builder/Hardware/lab_streaming_layer_legacy/lsl_triggers_demo_legacy.psyexp +329 -273
- psychopy/demos/builder/Hardware/lab_streaming_layer_legacy/lsl_triggers_demo_legacy_legacy.psyexp +360 -0
- psychopy/demos/builder/Hardware/lab_streaming_layer_legacy/lsl_triggers_demo_legacy_legacy_legacy.psyexp +312 -0
- psychopy/demos/builder/Hardware/microphone/microphone.psyexp +450 -404
- psychopy/demos/builder/Hardware/pump/pump.psyexp +593 -329
- psychopy/demos/builder/Helper Tools/achorVSalignment/FlowCircular-Regular.ttf +0 -0
- psychopy/demos/builder/Helper Tools/achorVSalignment/anchorAlignment.psyexp +336 -274
- psychopy/demos/builder/Helper Tools/clockFace/clockFace.psyexp +200 -149
- psychopy/demos/builder/Helper Tools/colors/colors.psyexp +300 -279
- psychopy/demos/builder/Helper Tools/drawPolygon/drawPolygon.psyexp +677 -564
- psychopy/demos/builder/Helper Tools/keyNameFinder/keyNameFinder.psyexp +214 -158
- psychopy/demos/builder/Helper Tools/spatialUnits/unitDemo.psyexp +195 -146
- psychopy/demos/coder/experiment control/runtimeInfo.py +1 -1
- psychopy/devices/__init__.py +1 -1
- psychopy/event.py +1 -1
- psychopy/exceptions.py +1 -1
- psychopy/experiment/__init__.py +1 -1
- psychopy/experiment/_experiment.py +30 -9
- psychopy/experiment/components/__init__.py +1 -6
- psychopy/experiment/components/_base.py +44 -19
- psychopy/experiment/components/aperture/__init__.py +1 -1
- psychopy/experiment/components/brush/__init__.py +2 -2
- psychopy/experiment/components/button/__init__.py +24 -28
- psychopy/experiment/components/camera/__init__.py +38 -39
- psychopy/experiment/components/code/__init__.py +1 -1
- psychopy/experiment/components/dots/__init__.py +1 -1
- psychopy/experiment/components/eyetracker_record/__init__.py +7 -3
- psychopy/experiment/components/form/__init__.py +3 -3
- psychopy/experiment/components/grating/__init__.py +1 -1
- psychopy/experiment/components/image/__init__.py +1 -1
- psychopy/experiment/components/joyButtons/__init__.py +2 -2
- psychopy/experiment/components/joyButtons/virtualJoyButtons.py +1 -1
- psychopy/experiment/components/joystick/__init__.py +3 -3
- psychopy/experiment/components/joystick/virtualJoystick.py +1 -1
- psychopy/experiment/components/keyboard/__init__.py +98 -122
- psychopy/experiment/components/microphone/__init__.py +54 -98
- psychopy/experiment/components/mouse/__init__.py +92 -93
- psychopy/experiment/components/movie/__init__.py +28 -50
- psychopy/experiment/components/parallelOut/__init__.py +3 -3
- psychopy/experiment/components/polygon/__init__.py +2 -3
- psychopy/experiment/components/roi/__init__.py +2 -2
- psychopy/experiment/components/routineSettings/__init__.py +2 -0
- psychopy/experiment/components/serialOut/__init__.py +7 -7
- psychopy/experiment/components/settings/__init__.py +317 -313
- psychopy/experiment/components/settings/eyetracking.py +108 -0
- psychopy/experiment/components/slider/__init__.py +5 -5
- psychopy/experiment/components/sound/__init__.py +168 -78
- psychopy/experiment/components/soundsensor/__init__.py +361 -0
- psychopy/experiment/components/soundsensor/classic/soundsensor.png +0 -0
- psychopy/experiment/components/soundsensor/classic/soundsensor@2x.png +0 -0
- psychopy/experiment/components/soundsensor/dark/soundsensor.png +0 -0
- psychopy/experiment/components/soundsensor/dark/soundsensor@2x.png +0 -0
- psychopy/experiment/components/soundsensor/light/soundsensor.png +0 -0
- psychopy/experiment/components/soundsensor/light/soundsensor@2x.png +0 -0
- psychopy/experiment/components/static/__init__.py +59 -33
- psychopy/experiment/components/text/__init__.py +2 -6
- psychopy/experiment/components/textbox/__init__.py +3 -7
- psychopy/experiment/components/unknown/__init__.py +2 -0
- psychopy/experiment/components/unknownPlugin/__init__.py +2 -0
- psychopy/experiment/exports.py +1 -1
- psychopy/experiment/flow.py +2 -2
- psychopy/experiment/localization.py +1 -1
- psychopy/experiment/loops.py +43 -10
- psychopy/experiment/params.py +6 -4
- psychopy/experiment/plugins.py +8 -1
- psychopy/experiment/py2js.py +1 -1
- psychopy/experiment/py2js_transpiler.py +1 -1
- psychopy/experiment/routines/__init__.py +1 -1
- psychopy/experiment/routines/_base.py +23 -24
- psychopy/experiment/routines/audioValidator/__init__.py +343 -0
- psychopy/experiment/routines/audioValidator/classic/audio_validator.png +0 -0
- psychopy/experiment/routines/audioValidator/classic/audio_validator@2x.png +0 -0
- psychopy/experiment/routines/audioValidator/dark/audio_validator.png +0 -0
- psychopy/experiment/routines/audioValidator/dark/audio_validator@2x.png +0 -0
- psychopy/experiment/routines/audioValidator/light/audio_validator.png +0 -0
- psychopy/experiment/routines/audioValidator/light/audio_validator@2x.png +0 -0
- psychopy/experiment/routines/eyetracker_calibrate/__init__.py +76 -17
- psychopy/experiment/routines/eyetracker_validate/__init__.py +1 -1
- psychopy/experiment/routines/unknown/__init__.py +2 -0
- psychopy/experiment/routines/{photodiodeValidator → visualValidator}/__init__.py +89 -120
- psychopy/experiment/routines/visualValidator/classic/visual_validator.png +0 -0
- psychopy/experiment/routines/visualValidator/classic/visual_validator@2x.png +0 -0
- psychopy/experiment/routines/visualValidator/dark/visual_validator.png +0 -0
- psychopy/experiment/routines/visualValidator/dark/visual_validator@2x.png +0 -0
- psychopy/experiment/routines/visualValidator/light/visual_validator.png +0 -0
- psychopy/experiment/routines/visualValidator/light/visual_validator@2x.png +0 -0
- psychopy/experiment/utils.py +1 -1
- psychopy/gui/__init__.py +1 -1
- psychopy/gui/qtgui.py +15 -6
- psychopy/gui/wxgui.py +1 -1
- psychopy/hardware/__init__.py +0 -1
- psychopy/hardware/base.py +147 -16
- psychopy/hardware/bbtk/__init__.py +10 -16
- psychopy/hardware/brainproducts.py +7 -13
- psychopy/hardware/button.py +21 -2
- psychopy/hardware/buttonbox/__init__.py +1 -1
- psychopy/hardware/camera/__init__.py +16 -3
- psychopy/hardware/cedrus.py +5 -16
- psychopy/hardware/crs/__init__.py +1 -1
- psychopy/hardware/crs/bits.py +36 -33
- psychopy/hardware/crs/colorcal.py +8 -11
- psychopy/hardware/crs/optical.py +7 -10
- psychopy/hardware/crs/shaders.py +18 -5
- psychopy/hardware/emotiv.py +1 -1
- psychopy/hardware/emulator.py +11 -5
- psychopy/hardware/exceptions.py +86 -0
- psychopy/hardware/forp.py +18 -23
- psychopy/hardware/gammasci.py +8 -3
- psychopy/hardware/iolab.py +8 -19
- psychopy/hardware/joystick/__init__.py +865 -266
- psychopy/hardware/joystick/_base.py +251 -0
- psychopy/hardware/joystick/backend_glfw.py +306 -0
- psychopy/hardware/joystick/backend_pyglet.py +309 -0
- psychopy/hardware/joystick/mappings.py +287 -0
- psychopy/hardware/keyboard.py +4 -2
- psychopy/hardware/labhackers.py +1 -1
- psychopy/hardware/labjacks.py +9 -13
- psychopy/hardware/{photodiode.py → lightsensor.py} +146 -203
- psychopy/hardware/listener.py +9 -8
- psychopy/hardware/manager.py +24 -35
- psychopy/hardware/microphone.py +534 -154
- psychopy/hardware/minolta.py +14 -4
- psychopy/hardware/mouse/__init__.py +1 -1
- psychopy/hardware/photometer/__init__.py +2 -2
- psychopy/hardware/pr.py +14 -4
- psychopy/hardware/qmix.py +18 -27
- psychopy/hardware/serialdevice.py +43 -12
- psychopy/hardware/soundsensor.py +473 -0
- psychopy/hardware/spatial/__init__.py +231 -0
- psychopy/hardware/speaker.py +298 -36
- psychopy/hardware/triggerbox/__init__.py +1 -1
- psychopy/hardware/triggerbox/base.py +1 -1
- psychopy/hardware/triggerbox/parallel.py +1 -1
- psychopy/info.py +1 -1
- psychopy/iohub/devices/eyetracker/__init__.py +10 -18
- psychopy/iohub/devices/eyetracker/calibration/procedure.py +15 -33
- psychopy/iohub/devices/eyetracker/hw/pupil_labs/neon/__init__.py +1 -0
- psychopy/iohub/devices/mouse/linux2.py +2 -1
- psychopy/layout.py +1 -1
- psychopy/liaison.py +91 -39
- psychopy/locale_setup.py +11 -1
- psychopy/localization/__init__.py +1 -1
- psychopy/localization/_localization.py +1 -1
- psychopy/localization/messages.pot +2 -2
- psychopy/logging.py +14 -12
- psychopy/microphone.py +4 -3
- psychopy/misc.py +1 -1
- psychopy/monitors/MonitorCenter.py +3 -3
- psychopy/monitors/__init__.py +1 -1
- psychopy/monitors/calibData.py +1 -1
- psychopy/monitors/calibTools.py +3 -2
- psychopy/platform_specific/__init__.py +1 -1
- psychopy/platform_specific/darwin.py +1 -1
- psychopy/platform_specific/linux.py +1 -1
- psychopy/platform_specific/win32.py +1 -1
- psychopy/plugins/__init__.py +26 -17
- psychopy/plugins/util.py +65 -0
- psychopy/preferences/Darwin.spec +11 -3
- psychopy/preferences/FreeBSD.spec +11 -3
- psychopy/preferences/Linux.spec +11 -3
- psychopy/preferences/Windows.spec +11 -3
- psychopy/preferences/__init__.py +1 -1
- psychopy/preferences/baseNoArch.spec +11 -3
- psychopy/preferences/hints.py +78 -61
- psychopy/preferences/preferences.py +82 -13
- psychopy/projects/__init__.py +1 -1
- psychopy/projects/pavlovia.py +29 -13
- psychopy/scripts/psyexpCompile.py +1 -1
- psychopy/session.py +81 -8
- psychopy/sound/__init__.py +25 -10
- psychopy/sound/_base.py +134 -34
- psychopy/sound/audioclip.py +38 -15
- psychopy/sound/audiodevice.py +1 -1
- psychopy/sound/backend_ptb.py +53 -321
- psychopy/sound/backend_pygame.py +7 -3
- psychopy/sound/backend_pyo.py +53 -22
- psychopy/sound/backend_pysound.py +10 -27
- psychopy/sound/backend_sounddevice.py +33 -21
- psychopy/sound/exceptions.py +1 -1
- psychopy/sound/microphone.py +83 -5
- psychopy/sound/transcribe.py +3 -3
- psychopy/tests/data/test_basic_run.py +1 -0
- psychopy/tests/data/test_sounds/default_16000.wav +0 -0
- psychopy/tests/data/test_sounds/default_192000.wav +0 -0
- psychopy/tests/data/test_sounds/default_22050.wav +0 -0
- psychopy/tests/data/test_sounds/default_32000.wav +0 -0
- psychopy/tests/data/test_sounds/default_44100.wav +0 -0
- psychopy/tests/data/test_sounds/default_48000.wav +0 -0
- psychopy/tests/data/test_sounds/default_8000.wav +0 -0
- psychopy/tests/data/test_sounds/default_96000.wav +0 -0
- psychopy/tests/test_alerts/test_alerttools.py +2 -1
- psychopy/tests/test_app/test_command_line.py +65 -0
- psychopy/tests/test_data/test_TrialHandler2.py +18 -7
- psychopy/tests/test_demos/test_builder_demos.py +1 -1
- psychopy/tests/test_experiment/needs_wx/componsTemplate.txt +5238 -4188
- psychopy/tests/test_experiment/needs_wx/test_components.py +1 -1
- psychopy/tests/test_experiment/test_components/test_RoutineSettingsComponent.py +16 -0
- psychopy/tests/test_experiment/test_components/test_all_components.py +1 -1
- psychopy/tests/test_experiment/test_components/test_base_components.py +26 -17
- psychopy/tests/test_experiment/test_loops.py +12 -4
- psychopy/tests/test_experiment/test_params.py +17 -4
- psychopy/tests/test_experiment/test_routines/test_PhotodiodeValidationRoutine.py +2 -2
- psychopy/tests/test_hardware/test_photodiode.py +66 -0
- psychopy/tests/test_liaison/test_Liaison.py +4 -4
- psychopy/tests/test_misc/test_clock.py +2 -0
- psychopy/tests/test_misc/test_color.py +2 -0
- psychopy/tests/test_misc/test_event.py +1 -0
- psychopy/tests/test_plugins/__init__.py +0 -0
- psychopy/tests/test_plugins/test_plugin_stubs.py +125 -0
- psychopy/tests/test_sound/test_sound.py +111 -40
- psychopy/tests/test_tools/test_colorspacetools.py +24 -23
- psychopy/tests/test_tools/test_mathtools.py +9 -9
- psychopy/tests/test_tools/test_viewtools.py +101 -0
- psychopy/tests/test_validators/__init__.py +0 -0
- psychopy/tests/test_validators/test_voicekeyValidator.py +95 -0
- psychopy/tests/test_visual/test_all_stimuli.py +2 -2
- psychopy/tests/test_visual/test_basevisual.py +37 -7
- psychopy/tests/test_visual/test_button.py +2 -2
- psychopy/tests/test_visual/test_circle.py +10 -2
- psychopy/tests/test_visual/test_dots.py +1 -1
- psychopy/tests/test_visual/test_form.py +13 -13
- psychopy/tests/test_visual/test_gamma.py +3 -3
- psychopy/tests/test_visual/test_image.py +2 -2
- psychopy/tests/test_visual/test_progress.py +2 -2
- psychopy/tests/test_visual/test_roi.py +8 -2
- psychopy/tests/test_visual/test_shape.py +2 -2
- psychopy/tests/test_visual/test_slider.py +2 -2
- psychopy/tests/test_visual/test_target.py +2 -2
- psychopy/tests/test_visual/test_textbox.py +6 -8
- psychopy/tests/test_visual/test_winScalePos.py +6 -5
- psychopy/tests/test_visual/test_window.py +17 -0
- psychopy/tests/utils.py +51 -1
- psychopy/tools/__init__.py +1 -1
- psychopy/tools/arraytools.py +2 -2
- psychopy/tools/attributetools.py +52 -1
- psychopy/tools/audiotools.py +4 -1
- psychopy/tools/colorspacetools.py +6 -4
- psychopy/tools/coordinatetools.py +1 -1
- psychopy/tools/fileerrortools.py +21 -9
- psychopy/tools/filetools.py +2 -2
- psychopy/tools/fontmanager.py +47 -28
- psychopy/tools/gltools.py +2964 -558
- psychopy/tools/imagetools.py +1 -1
- psychopy/tools/mathtools.py +997 -127
- psychopy/tools/monitorunittools.py +7 -1
- psychopy/tools/movietools.py +1 -2
- psychopy/tools/pkgtools.py +157 -127
- psychopy/tools/plottools.py +1 -1
- psychopy/tools/rifttools.py +1 -1
- psychopy/tools/stereotools.py +1 -1
- psychopy/tools/stimulustools.py +172 -2
- psychopy/tools/stringtools.py +22 -2
- psychopy/tools/systemtools.py +1 -1
- psychopy/tools/typetools.py +1 -1
- psychopy/tools/unittools.py +1 -1
- psychopy/tools/versionchooser.py +3 -1
- psychopy/tools/viewtools.py +54 -70
- psychopy/tools/wizard.py +2 -2
- psychopy/validation/__init__.py +6 -0
- psychopy/validation/audio.py +74 -0
- psychopy/validation/visual.py +115 -0
- psychopy/visual/__init__.py +1 -4
- psychopy/visual/aperture.py +9 -6
- psychopy/visual/backends/__init__.py +1 -1
- psychopy/visual/backends/_base.py +1 -1
- psychopy/visual/backends/gamma.py +1 -1
- psychopy/visual/backends/glfwbackend.py +8 -12
- psychopy/visual/backends/pygamebackend.py +1 -1
- psychopy/visual/backends/pygletbackend.py +32 -11
- psychopy/visual/basevisual.py +93 -13
- psychopy/visual/brush.py +1 -1
- psychopy/visual/bufferimage.py +90 -10
- psychopy/visual/button.py +1 -1
- psychopy/visual/circle.py +12 -20
- psychopy/visual/custommouse.py +1 -1
- psychopy/visual/dot.py +80 -14
- psychopy/visual/elementarray.py +84 -10
- psychopy/visual/filters.py +1 -1
- psychopy/visual/form.py +43 -28
- psychopy/visual/grating.py +105 -25
- psychopy/visual/helpers.py +1 -1
- psychopy/visual/image.py +98 -20
- psychopy/visual/line.py +15 -25
- psychopy/visual/movie.py +1 -1
- psychopy/visual/movie2.py +4 -3
- psychopy/visual/movie3.py +4 -3
- psychopy/visual/movies/__init__.py +1 -1
- psychopy/visual/movies/frame.py +1 -1
- psychopy/visual/movies/metadata.py +1 -1
- psychopy/visual/movies/players/__init__.py +1 -1
- psychopy/visual/movies/players/_base.py +1 -1
- psychopy/visual/movies/players/ffpyplayer_player.py +2 -3
- psychopy/visual/nnlvs.py +9 -6
- psychopy/visual/noise.py +4 -16
- psychopy/visual/patch.py +4 -3
- psychopy/visual/pie.py +3 -14
- psychopy/visual/polygon.py +21 -28
- psychopy/visual/radial.py +4 -18
- psychopy/visual/ratingscale.py +4 -3
- psychopy/visual/rect.py +16 -25
- psychopy/visual/rift.py +8 -2
- psychopy/visual/secondorder.py +4 -16
- psychopy/visual/shaders.py +620 -286
- psychopy/visual/shape.py +281 -90
- psychopy/visual/simpleimage.py +1 -1
- psychopy/visual/slider.py +78 -25
- psychopy/visual/stim3d.py +5 -608
- psychopy/visual/text.py +13 -3
- psychopy/visual/textbox2/textbox2.py +188 -56
- psychopy/visual/vlcmoviestim.py +1 -1
- psychopy/visual/window.py +373 -200
- psychopy/web.py +1 -1
- {psychopy-2024.2.5.dist-info → psychopy-2025.1.0.dist-info}/METADATA +9 -9
- {psychopy-2024.2.5.dist-info → psychopy-2025.1.0.dist-info}/RECORD +644 -621
- psychopy/.DS_Store +0 -0
- psychopy/__init__.py.orig +0 -65
- psychopy/app/.DS_Store +0 -0
- psychopy/app/Resources/.DS_Store +0 -0
- psychopy/app/Resources/classic/filecsv16.png +0 -0
- psychopy/app/Resources/classic/fileimage16.png +0 -0
- psychopy/app/Resources/classic/fileunknown16.png +0 -0
- psychopy/app/Resources/dark/filecsv16.png +0 -0
- psychopy/app/Resources/dark/filecsv16@2x.png +0 -0
- psychopy/app/Resources/dark/fileimage16.png +0 -0
- psychopy/app/Resources/dark/fileimage16@2x.png +0 -0
- psychopy/app/Resources/dark/fileunknown16.png +0 -0
- psychopy/app/Resources/dark/fileunknown16@2x.png +0 -0
- psychopy/app/Resources/fonts/OpenSans-Bold.ttf +0 -0
- psychopy/app/Resources/fonts/OpenSans-BoldItalic.ttf +0 -0
- psychopy/app/Resources/fonts/OpenSans-ExtraBold.ttf +0 -0
- psychopy/app/Resources/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- psychopy/app/Resources/fonts/OpenSans-Italic.ttf +0 -0
- psychopy/app/Resources/fonts/OpenSans-Light.ttf +0 -0
- psychopy/app/Resources/fonts/OpenSans-LightItalic.ttf +0 -0
- psychopy/app/Resources/fonts/OpenSans-Regular.ttf +0 -0
- psychopy/app/Resources/fonts/OpenSans-SemiBold.ttf +0 -0
- psychopy/app/Resources/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- psychopy/app/Resources/light/filecsv16.png +0 -0
- psychopy/app/Resources/light/filecsv16@2x.png +0 -0
- psychopy/app/Resources/light/fileimage16.png +0 -0
- psychopy/app/Resources/light/fileimage16@2x.png +0 -0
- psychopy/app/Resources/light/fileunknown16.png +0 -0
- psychopy/app/Resources/light/fileunknown16@2x.png +0 -0
- psychopy/app/Resources/psychopySplash.png +0 -0
- psychopy/app/Resources/psychopySplash@2x.png +0 -0
- psychopy/app/builder/builder.py.orig +0 -3932
- psychopy/app/builder/dialogs/__init__.py.orig +0 -1679
- psychopy/app/builder/dialogs/paramCtrls.py.orig +0 -713
- psychopy/app/colorpicker/__init__.py.orig +0 -411
- psychopy/app/locale/ar_001/.DS_Store +0 -0
- psychopy/app/locale/ar_001/LC_MESSAGE/.DS_Store +0 -0
- psychopy/core.py.orig +0 -169
- psychopy/demos/builder/.DS_Store +0 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/randomisedBlocks_lastrun.py +0 -330
- psychopy/demos/builder/Experiments/.DS_Store +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/archived_conditions.xlsx +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/draw grid stim.py +0 -61
- psychopy/demos/builder/Experiments/dragAndDrop/shapeMaker.psyexp +0 -91
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/grid_image_1.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/grid_image_10.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/grid_image_2.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/grid_image_3.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/grid_image_4.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/grid_image_5.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/grid_image_6.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/grid_image_7.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/grid_image_8.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/stimuli/grid_image_9.png +0 -0
- psychopy/demos/builder/Experiments/dragAndDrop/updated_conditions.xlsx +0 -0
- psychopy/demos/builder/Tools/.DS_Store +0 -0
- psychopy/demos/builder/Tools/gammaCalibration/.DS_Store +0 -0
- psychopy/demos/builder/Tools/gammaCalibration/data/.DS_Store +0 -0
- psychopy/demos/builder/Tools/gammaCalibration/data/_gamma_correction_visual_2022-05-18_14h18.29.439.csv +0 -38
- psychopy/demos/builder/Tools/gammaCalibration/data/_gamma_correction_visual_2022-05-18_14h18.29.439.log +0 -3418
- psychopy/demos/builder/Tools/gammaCalibration/data/_gamma_correction_visual_2022-05-18_14h18.29.439.psydat +0 -0
- psychopy/demos/builder/Tools/gammaCalibration/data/x1_gamma_correction_visual_2022-05-17_13h59.42.928.csv +0 -2
- psychopy/demos/builder/Tools/gammaCalibration/data/x1_gamma_correction_visual_2022-05-17_13h59.42.928.log +0 -15
- psychopy/demos/builder/Tools/gammaCalibration/data/x1_gamma_correction_visual_2022-05-17_13h59.42.928.psydat +0 -0
- psychopy/demos/builder/Tools/gammaCalibration/gamma_correction_visual_lastrun.py +0 -562
- psychopy/demos/coder/.DS_Store +0 -0
- psychopy/demos/coder/experiment control/info_gamma.pickle +0 -0
- psychopy/demos/coder/iohub/.iohpid +0 -1
- psychopy/demos/coder/iohub/eyetracking/.iohpid +0 -1
- psychopy/demos/coder/iohub/wintab/.DS_Store +0 -0
- psychopy/demos/coder/stimuli/.DS_Store +0 -0
- psychopy/experiment/_experiment.py.orig +0 -1032
- psychopy/experiment/components/.DS_Store +0 -0
- psychopy/experiment/components/_base.py.orig +0 -823
- psychopy/experiment/components/form/.DS_Store +0 -0
- psychopy/experiment/components/microphone/__init__.py.orig +0 -490
- psychopy/experiment/components/settings/__init__.py.orig +0 -1337
- psychopy/experiment/components/textbox/__init__.py.orig +0 -310
- psychopy/experiment/components/webcam/.DS_Store +0 -0
- psychopy/experiment/components/webcam/light/.DS_Store +0 -0
- psychopy/experiment/loops.py.orig +0 -829
- psychopy/experiment/params.py.orig +0 -408
- psychopy/experiment/routine.py.orig +0 -503
- psychopy/experiment/routines/photodiodeValidator/classic/photodiode_validator.png +0 -0
- psychopy/experiment/routines/photodiodeValidator/classic/photodiode_validator@2x.png +0 -0
- psychopy/experiment/routines/photodiodeValidator/dark/photodiode_validator.png +0 -0
- psychopy/experiment/routines/photodiodeValidator/dark/photodiode_validator@2x.png +0 -0
- psychopy/experiment/routines/photodiodeValidator/light/photodiode_validator.png +0 -0
- psychopy/experiment/routines/photodiodeValidator/light/photodiode_validator@2x.png +0 -0
- psychopy/hardware/.DS_Store +0 -0
- psychopy/hardware/brainproducts.py.orig +0 -680
- psychopy/hardware/iolab.py.orig +0 -238
- psychopy/iohub/datastore/__init__.py.orig +0 -443
- psychopy/iohub/datastore/util.py.orig +0 -692
- psychopy/iohub/devices/mouse/darwin.py.orig +0 -427
- psychopy/iohub/devices/mouse/linux2.py.orig +0 -198
- psychopy/preferences/.DS_Store +0 -0
- psychopy/projects/pavlovia.py.orig +0 -1295
- psychopy/tests/.DS_Store +0 -0
- psychopy/tests/data/.DS_Store +0 -0
- psychopy/tests/data/TestCircle_fill_local.png +0 -0
- psychopy/tests/data/aperture1_normHexbackground_local.png +0 -0
- psychopy/tests/data/aperture1_norm_local.png +0 -0
- psychopy/tests/data/aperture2_normHexbackground_local.png +0 -0
- psychopy/tests/data/beatandrcos_height_local.png +0 -0
- psychopy/tests/data/beatandrcos_normAddBlend_local.png +0 -0
- psychopy/tests/data/beatandrcos_normHexbackground_local.png +0 -0
- psychopy/tests/data/beatandrcos_norm_local.png +0 -0
- psychopy/tests/data/beatandrcos_stencil_local.png +0 -0
- psychopy/tests/data/blend_add_height_local.png +0 -0
- psychopy/tests/data/blend_add_normAddBlend_local.png +0 -0
- psychopy/tests/data/blend_add_normHexbackground_local.png +0 -0
- psychopy/tests/data/blend_add_normNoShade_local.png +0 -0
- psychopy/tests/data/blend_add_norm_local.png +0 -0
- psychopy/tests/data/blend_add_stencil_local.png +0 -0
- psychopy/tests/data/bufferimg_gabor_height_local.png +0 -0
- psychopy/tests/data/bufferimg_gabor_normAddBlend_local.png +0 -0
- psychopy/tests/data/bufferimg_gabor_normHexbackground_local.png +0 -0
- psychopy/tests/data/bufferimg_gabor_normNoShade_local.png +0 -0
- psychopy/tests/data/bufferimg_gabor_norm_local.png +0 -0
- psychopy/tests/data/bufferimg_gabor_stencil_local.png +0 -0
- psychopy/tests/data/circleHex_height_local.png +0 -0
- psychopy/tests/data/circleHex_normAddBlend_local.png +0 -0
- psychopy/tests/data/circleHex_normHexbackground_local.png +0 -0
- psychopy/tests/data/circleHex_normNoShade_local.png +0 -0
- psychopy/tests/data/circleHex_norm_local.png +0 -0
- psychopy/tests/data/circleHex_stencil_local.png +0 -0
- psychopy/tests/data/color_comparison_local.png +0 -0
- psychopy/tests/data/correctScript/.DS_Store +0 -0
- psychopy/tests/data/dots_height_local.png +0 -0
- psychopy/tests/data/dots_normAddBlend_local.png +0 -0
- psychopy/tests/data/dots_normHexbackground_local.png +0 -0
- psychopy/tests/data/dots_normNoShade_local.png +0 -0
- psychopy/tests/data/dots_norm_local.png +0 -0
- psychopy/tests/data/dots_stencil_local.png +0 -0
- psychopy/tests/data/elarray1_height_local.png +0 -0
- psychopy/tests/data/elarray1_normAddBlend_local.png +0 -0
- psychopy/tests/data/elarray1_normHexbackground_local.png +0 -0
- psychopy/tests/data/elarray1_norm_local.png +0 -0
- psychopy/tests/data/elarray1_stencil_local.png +0 -0
- psychopy/tests/data/envelopeandrcos_height_local.png +0 -0
- psychopy/tests/data/envelopeandrcos_normAddBlend_local.png +0 -0
- psychopy/tests/data/envelopeandrcos_normHexbackground_local.png +0 -0
- psychopy/tests/data/envelopeandrcos_norm_local.png +0 -0
- psychopy/tests/data/envelopeandrcos_stencil_local.png +0 -0
- psychopy/tests/data/envelopepowerandrcos_height_local.png +0 -0
- psychopy/tests/data/envelopepowerandrcos_normAddBlend_local.png +0 -0
- psychopy/tests/data/envelopepowerandrcos_normHexbackground_local.png +0 -0
- psychopy/tests/data/envelopepowerandrcos_norm_local.png +0 -0
- psychopy/tests/data/envelopepowerandrcos_stencil_local.png +0 -0
- psychopy/tests/data/gabor1_height_local.png +0 -0
- psychopy/tests/data/gabor1_normAddBlend_local.png +0 -0
- psychopy/tests/data/gabor1_normHexbackground_local.png +0 -0
- psychopy/tests/data/gabor1_normNoShade_local.png +0 -0
- psychopy/tests/data/gabor1_norm_local.png +0 -0
- psychopy/tests/data/gabor1_stencil_local.png +0 -0
- psychopy/tests/data/greyscale_normHexbackground_local.png +0 -0
- psychopy/tests/data/imageAndGauss_height_local.png +0 -0
- psychopy/tests/data/imageAndGauss_normAddBlend_local.png +0 -0
- psychopy/tests/data/imageAndGauss_normHexbackground_local.png +0 -0
- psychopy/tests/data/imageAndGauss_normNoShade_local.png +0 -0
- psychopy/tests/data/imageAndGauss_norm_local.png +0 -0
- psychopy/tests/data/imageAndGauss_stencil_local.png +0 -0
- psychopy/tests/data/movFrame1_stencil_local.png +0 -0
- psychopy/tests/data/noiseAndRcos_height_local.png +0 -0
- psychopy/tests/data/noiseAndRcos_normAddBlend_local.png +0 -0
- psychopy/tests/data/noiseAndRcos_normHexbackground_local.png +0 -0
- psychopy/tests/data/noiseAndRcos_normNoShade_local.png +0 -0
- psychopy/tests/data/noiseAndRcos_norm_local.png +0 -0
- psychopy/tests/data/noiseAndRcos_stencil_local.png +0 -0
- psychopy/tests/data/noiseFiltersAndRcos_height_local.png +0 -0
- psychopy/tests/data/noiseFiltersAndRcos_normAddBlend_local.png +0 -0
- psychopy/tests/data/noiseFiltersAndRcos_normHexbackground_local.png +0 -0
- psychopy/tests/data/noiseFiltersAndRcos_normNoShade_local.png +0 -0
- psychopy/tests/data/noiseFiltersAndRcos_norm_local.png +0 -0
- psychopy/tests/data/noiseFiltersAndRcos_stencil_local.png +0 -0
- psychopy/tests/data/numpyImage_height_local.png +0 -0
- psychopy/tests/data/numpyImage_normAddBlend_local.png +0 -0
- psychopy/tests/data/numpyImage_normHexbackground_local.png +0 -0
- psychopy/tests/data/numpyImage_normNoShade_local.png +0 -0
- psychopy/tests/data/numpyImage_norm_local.png +0 -0
- psychopy/tests/data/numpyImage_stencil_local.png +0 -0
- psychopy/tests/data/shape2_1_normAddBlend_local.png +0 -0
- psychopy/tests/data/shape2_1_normHexbackground_local.png +0 -0
- psychopy/tests/data/shape2_1_normNoShade_local.png +0 -0
- psychopy/tests/data/shape2_1_norm_local.png +0 -0
- psychopy/tests/data/shape2_1_stencil_local.png +0 -0
- psychopy/tests/data/text1_height_local.png +0 -0
- psychopy/tests/data/text1_normAddBlend_local.png +0 -0
- psychopy/tests/data/text1_normHexbackground_local.png +0 -0
- psychopy/tests/data/text1_norm_local.png +0 -0
- psychopy/tests/data/text1_stencil_local.png +0 -0
- psychopy/tests/data/wedge1_height_local.png +0 -0
- psychopy/tests/data/wedge1_normAddBlend_local.png +0 -0
- psychopy/tests/data/wedge1_normHexbackground_local.png +0 -0
- psychopy/tests/data/wedge1_normNoShade_local.png +0 -0
- psychopy/tests/data/wedge1_norm_local.png +0 -0
- psychopy/tests/data/wedge1_stencil_local.png +0 -0
- psychopy/tests/test_app/.DS_Store +0 -0
- psychopy/tests/test_app/test_builder/.DS_Store +0 -0
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1206.log +0 -177
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1206.psydat +0 -0
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1206.xlsx +0 -0
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1324.log +0 -168
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1324.psydat +0 -0
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1324.xlsx +0 -0
- psychopy/tests/test_data/.DS_Store +0 -0
- psychopy/tests/test_hardware/test_CRS_BitsSharp.py +0 -67
- psychopy/tests/test_hardware/test_CRS_BitsSharp.py.orig +0 -68
- psychopy/tests/test_hardware/test_CRS_bitsShaders.py +0 -110
- psychopy/tests/test_visual/test_image.py.orig +0 -219
- psychopy/visual/basevisual.py.orig +0 -1723
- psychopy/visual/form.py.orig +0 -1181
- psychopy/visual/text.py.orig +0 -752
- psychopy/visual/textbox2/textbox2.py.orig +0 -1315
- psychopy/visual/windowwarp.py.orig +0 -463
- /psychopy/{app/cortex.log → alerts/alertsCatalogue/3600.yaml} +0 -0
- /psychopy/{app/Resources → assets}/fonts/Arvo-Bold.ttf +0 -0
- /psychopy/{app/Resources → assets}/fonts/Arvo-BoldItalic.ttf +0 -0
- /psychopy/{app/Resources → assets}/fonts/Arvo-Italic.ttf +0 -0
- /psychopy/{app/Resources → assets}/fonts/Arvo-Regular.ttf +0 -0
- /psychopy/{app/Resources → assets}/fonts/DejaVuSerif.ttf +0 -0
- /psychopy/{app/Resources → assets}/fonts/IndieFlower-Regular.ttf +0 -0
- /psychopy/{app/Resources → assets}/fonts/JetBrainsMono-Italic-VariableFont_wght.ttf +0 -0
- /psychopy/{app/Resources → assets}/fonts/JetBrainsMono-VariableFont_wght.ttf +0 -0
- /psychopy/demos/builder/Experiments/{GoNoGo → goNoGo}/readme.md +0 -0
- {psychopy-2024.2.5.dist-info → psychopy-2025.1.0.dist-info}/WHEEL +0 -0
- {psychopy-2024.2.5.dist-info → psychopy-2025.1.0.dist-info}/entry_points.txt +0 -0
- {psychopy-2024.2.5.dist-info → psychopy-2025.1.0.dist-info}/licenses/LICENSE +0 -0
psychopy/visual/stim3d.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"""Classes for 3D stimuli."""
|
|
5
5
|
|
|
6
6
|
# Part of the PsychoPy library
|
|
7
|
-
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-
|
|
7
|
+
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2025 Open Science Tools Ltd.
|
|
8
8
|
# Distributed under the terms of the GNU General Public License (GPL).
|
|
9
9
|
|
|
10
10
|
from psychopy import logging
|
|
@@ -26,6 +26,10 @@ import numpy as np
|
|
|
26
26
|
|
|
27
27
|
import pyglet.gl as GL
|
|
28
28
|
|
|
29
|
+
# classes moved out of this module
|
|
30
|
+
RigidBodyPose = mt.RigidBodyPose
|
|
31
|
+
BoundingBox = mt.BoundingBox
|
|
32
|
+
|
|
29
33
|
|
|
30
34
|
class LightSource:
|
|
31
35
|
"""Class for representing a light source in a scene. This is a
|
|
@@ -1160,613 +1164,6 @@ class BlinnPhongMaterial:
|
|
|
1160
1164
|
GL.glEnable(GL.GL_COLOR_MATERIAL)
|
|
1161
1165
|
|
|
1162
1166
|
|
|
1163
|
-
class RigidBodyPose:
|
|
1164
|
-
"""Class for representing rigid body poses. This is a lazy-imported
|
|
1165
|
-
class, therefore import using full path
|
|
1166
|
-
`from psychopy.visual.stim3d import RigidBodyPose` when inheriting
|
|
1167
|
-
from it.
|
|
1168
|
-
|
|
1169
|
-
This class is an abstract representation of a rigid body pose, where the
|
|
1170
|
-
position of the body in a scene is represented by a vector/coordinate and
|
|
1171
|
-
the orientation with a quaternion. Pose can be manipulated and interacted
|
|
1172
|
-
with using class methods and attributes. Rigid body poses assume a
|
|
1173
|
-
right-handed coordinate system (-Z is forward and +Y is up).
|
|
1174
|
-
|
|
1175
|
-
Poses can be converted to 4x4 transformation matrices with `getModelMatrix`.
|
|
1176
|
-
One can use these matrices when rendering to transform the vertices of a
|
|
1177
|
-
model associated with the pose by passing them to OpenGL. Matrices are
|
|
1178
|
-
cached internally to avoid recomputing them if `pos` and `ori` attributes
|
|
1179
|
-
have not been updated.
|
|
1180
|
-
|
|
1181
|
-
Operators `*` and `~` can be used on `RigidBodyPose` objects to combine and
|
|
1182
|
-
invert poses. For instance, you can multiply (`*`) poses to get a new pose
|
|
1183
|
-
which is the combination of both orientations and translations by::
|
|
1184
|
-
|
|
1185
|
-
newPose = rb1 * rb2
|
|
1186
|
-
|
|
1187
|
-
Likewise, a pose can be inverted by using the `~` operator::
|
|
1188
|
-
|
|
1189
|
-
invPose = ~rb
|
|
1190
|
-
|
|
1191
|
-
Multiplying a pose by its inverse will result in an identity pose with no
|
|
1192
|
-
translation and default orientation where `pos=[0, 0, 0]` and
|
|
1193
|
-
`ori=[0, 0, 0, 1]`::
|
|
1194
|
-
|
|
1195
|
-
identityPose = ~rb * rb
|
|
1196
|
-
|
|
1197
|
-
Warnings
|
|
1198
|
-
--------
|
|
1199
|
-
This class is experimental and may result in undefined behavior.
|
|
1200
|
-
|
|
1201
|
-
"""
|
|
1202
|
-
def __init__(self, pos=(0., 0., 0.), ori=(0., 0., 0., 1.)):
|
|
1203
|
-
"""
|
|
1204
|
-
Parameters
|
|
1205
|
-
----------
|
|
1206
|
-
pos : array_like
|
|
1207
|
-
Position vector `[x, y, z]` for the origin of the rigid body.
|
|
1208
|
-
ori : array_like
|
|
1209
|
-
Orientation quaternion `[x, y, z, w]` where `x`, `y`, `z` are
|
|
1210
|
-
imaginary and `w` is real.
|
|
1211
|
-
|
|
1212
|
-
"""
|
|
1213
|
-
self._pos = np.ascontiguousarray(pos, dtype=np.float32)
|
|
1214
|
-
self._ori = np.ascontiguousarray(ori, dtype=np.float32)
|
|
1215
|
-
|
|
1216
|
-
self._modelMatrix = mt.posOriToMatrix(
|
|
1217
|
-
self._pos, self._ori, dtype=np.float32)
|
|
1218
|
-
|
|
1219
|
-
# computed only if needed
|
|
1220
|
-
self._normalMatrix = np.zeros((4, 4), dtype=np.float32, order='C')
|
|
1221
|
-
self._invModelMatrix = np.zeros((4, 4), dtype=np.float32, order='C')
|
|
1222
|
-
|
|
1223
|
-
# additional useful vectors
|
|
1224
|
-
self._at = np.zeros((3,), dtype=np.float32, order='C')
|
|
1225
|
-
self._up = np.zeros((3,), dtype=np.float32, order='C')
|
|
1226
|
-
|
|
1227
|
-
# compute matrices only if `pos` and `ori` attributes have been updated
|
|
1228
|
-
self._matrixNeedsUpdate = False
|
|
1229
|
-
self._invMatrixNeedsUpdate = True
|
|
1230
|
-
self._normalMatrixNeedsUpdate = True
|
|
1231
|
-
|
|
1232
|
-
self.pos = pos
|
|
1233
|
-
self.ori = ori
|
|
1234
|
-
|
|
1235
|
-
self._bounds = None
|
|
1236
|
-
|
|
1237
|
-
def __repr__(self):
|
|
1238
|
-
return 'RigidBodyPose({}, {}), %s)'.format(self.pos, self.ori)
|
|
1239
|
-
|
|
1240
|
-
@property
|
|
1241
|
-
def bounds(self):
|
|
1242
|
-
"""Bounding box associated with this pose."""
|
|
1243
|
-
return self._bounds
|
|
1244
|
-
|
|
1245
|
-
@bounds.setter
|
|
1246
|
-
def bounds(self, value):
|
|
1247
|
-
self._bounds = value
|
|
1248
|
-
|
|
1249
|
-
@property
|
|
1250
|
-
def pos(self):
|
|
1251
|
-
"""Position vector (X, Y, Z)."""
|
|
1252
|
-
return self._pos
|
|
1253
|
-
|
|
1254
|
-
@pos.setter
|
|
1255
|
-
def pos(self, value):
|
|
1256
|
-
self._pos = np.ascontiguousarray(value, dtype=np.float32)
|
|
1257
|
-
self._normalMatrixNeedsUpdate = self._matrixNeedsUpdate = \
|
|
1258
|
-
self._invMatrixNeedsUpdate = True
|
|
1259
|
-
|
|
1260
|
-
@property
|
|
1261
|
-
def ori(self):
|
|
1262
|
-
"""Orientation quaternion (X, Y, Z, W)."""
|
|
1263
|
-
return self._ori
|
|
1264
|
-
|
|
1265
|
-
@ori.setter
|
|
1266
|
-
def ori(self, value):
|
|
1267
|
-
self._ori = np.ascontiguousarray(value, dtype=np.float32)
|
|
1268
|
-
self._normalMatrixNeedsUpdate = self._matrixNeedsUpdate = \
|
|
1269
|
-
self._invMatrixNeedsUpdate = True
|
|
1270
|
-
|
|
1271
|
-
@property
|
|
1272
|
-
def posOri(self):
|
|
1273
|
-
"""The position (x, y, z) and orientation (x, y, z, w)."""
|
|
1274
|
-
return self._pos, self._ori
|
|
1275
|
-
|
|
1276
|
-
@posOri.setter
|
|
1277
|
-
def posOri(self, value):
|
|
1278
|
-
self._pos = np.ascontiguousarray(value[0], dtype=np.float32)
|
|
1279
|
-
self._ori = np.ascontiguousarray(value[1], dtype=np.float32)
|
|
1280
|
-
self._matrixNeedsUpdate = self._invMatrixNeedsUpdate = \
|
|
1281
|
-
self._normalMatrixNeedsUpdate = True
|
|
1282
|
-
|
|
1283
|
-
@property
|
|
1284
|
-
def at(self):
|
|
1285
|
-
"""Vector defining the forward direction (-Z) of this pose."""
|
|
1286
|
-
if self._matrixNeedsUpdate: # matrix needs update, this need to be too
|
|
1287
|
-
atDir = [0., 0., -1.]
|
|
1288
|
-
self._at = mt.applyQuat(self.ori, atDir, out=self._at)
|
|
1289
|
-
|
|
1290
|
-
return self._at
|
|
1291
|
-
|
|
1292
|
-
@property
|
|
1293
|
-
def up(self):
|
|
1294
|
-
"""Vector defining the up direction (+Y) of this pose."""
|
|
1295
|
-
if self._matrixNeedsUpdate: # matrix needs update, this need to be too
|
|
1296
|
-
upDir = [0., 1., 0.]
|
|
1297
|
-
self._up = mt.applyQuat(self.ori, upDir, out=self._up)
|
|
1298
|
-
|
|
1299
|
-
return self._up
|
|
1300
|
-
|
|
1301
|
-
def __mul__(self, other):
|
|
1302
|
-
"""Multiply two poses, combining them to get a new pose."""
|
|
1303
|
-
newOri = mt.multQuat(self._ori, other.ori)
|
|
1304
|
-
return RigidBodyPose(mt.transform(other.pos, newOri, self._pos), newOri)
|
|
1305
|
-
|
|
1306
|
-
def __imul__(self, other):
|
|
1307
|
-
"""Inplace multiplication. Transforms this pose by another."""
|
|
1308
|
-
self._ori = mt.multQuat(self._ori, other.ori)
|
|
1309
|
-
self._pos = mt.transform(other.pos, self._ori, self._pos)
|
|
1310
|
-
|
|
1311
|
-
def copy(self):
|
|
1312
|
-
"""Get a new `RigidBodyPose` object which copies the position and
|
|
1313
|
-
orientation of this one. Copies are independent and do not reference
|
|
1314
|
-
each others data.
|
|
1315
|
-
|
|
1316
|
-
Returns
|
|
1317
|
-
-------
|
|
1318
|
-
RigidBodyPose
|
|
1319
|
-
Copy of this pose.
|
|
1320
|
-
|
|
1321
|
-
"""
|
|
1322
|
-
return RigidBodyPose(self._pos, self._ori)
|
|
1323
|
-
|
|
1324
|
-
def isEqual(self, other):
|
|
1325
|
-
"""Check if poses have similar orientation and position.
|
|
1326
|
-
|
|
1327
|
-
Parameters
|
|
1328
|
-
----------
|
|
1329
|
-
other : `RigidBodyPose`
|
|
1330
|
-
Other pose to compare.
|
|
1331
|
-
|
|
1332
|
-
Returns
|
|
1333
|
-
-------
|
|
1334
|
-
bool
|
|
1335
|
-
Returns `True` is poses are effectively equal.
|
|
1336
|
-
|
|
1337
|
-
"""
|
|
1338
|
-
return np.isclose(self._pos, other.pos) and \
|
|
1339
|
-
np.isclose(self._ori, other.ori)
|
|
1340
|
-
|
|
1341
|
-
def setIdentity(self):
|
|
1342
|
-
"""Clear rigid body transformations.
|
|
1343
|
-
"""
|
|
1344
|
-
self._pos.fill(0.0)
|
|
1345
|
-
self._ori[:3] = 0.0
|
|
1346
|
-
self._ori[3] = 1.0
|
|
1347
|
-
self._matrixNeedsUpdate = self._normalMatrixNeedsUpdate = \
|
|
1348
|
-
self._invMatrixNeedsUpdate = True
|
|
1349
|
-
|
|
1350
|
-
def getOriAxisAngle(self, degrees=True):
|
|
1351
|
-
"""Get the axis and angle of rotation for the rigid body. Converts the
|
|
1352
|
-
orientation defined by the `ori` quaternion to and axis-angle
|
|
1353
|
-
representation.
|
|
1354
|
-
|
|
1355
|
-
Parameters
|
|
1356
|
-
----------
|
|
1357
|
-
degrees : bool, optional
|
|
1358
|
-
Specify ``True`` if `angle` is in degrees, or else it will be
|
|
1359
|
-
treated as radians. Default is ``True``.
|
|
1360
|
-
|
|
1361
|
-
Returns
|
|
1362
|
-
-------
|
|
1363
|
-
tuple
|
|
1364
|
-
Axis [rx, ry, rz] and angle.
|
|
1365
|
-
|
|
1366
|
-
"""
|
|
1367
|
-
return mt.quatToAxisAngle(self._ori, degrees)
|
|
1368
|
-
|
|
1369
|
-
def setOriAxisAngle(self, axis, angle, degrees=True):
|
|
1370
|
-
"""Set the orientation of the rigid body using an `axis` and
|
|
1371
|
-
`angle`. This sets the quaternion at `ori`.
|
|
1372
|
-
|
|
1373
|
-
Parameters
|
|
1374
|
-
----------
|
|
1375
|
-
axis : array_like
|
|
1376
|
-
Axis of rotation [rx, ry, rz].
|
|
1377
|
-
angle : float
|
|
1378
|
-
Angle of rotation.
|
|
1379
|
-
degrees : bool, optional
|
|
1380
|
-
Specify ``True`` if `angle` is in degrees, or else it will be
|
|
1381
|
-
treated as radians. Default is ``True``.
|
|
1382
|
-
|
|
1383
|
-
"""
|
|
1384
|
-
self.ori = mt.quatFromAxisAngle(axis, angle, degrees)
|
|
1385
|
-
|
|
1386
|
-
def getYawPitchRoll(self, degrees=True):
|
|
1387
|
-
"""Get the yaw, pitch and roll angles for this pose relative to the -Z
|
|
1388
|
-
world axis.
|
|
1389
|
-
|
|
1390
|
-
Parameters
|
|
1391
|
-
----------
|
|
1392
|
-
degrees : bool, optional
|
|
1393
|
-
Specify ``True`` if `angle` is in degrees, or else it will be
|
|
1394
|
-
treated as radians. Default is ``True``.
|
|
1395
|
-
|
|
1396
|
-
"""
|
|
1397
|
-
return mt.quatYawPitchRoll(self._ori, degrees)
|
|
1398
|
-
|
|
1399
|
-
@property
|
|
1400
|
-
def modelMatrix(self):
|
|
1401
|
-
"""Pose as a 4x4 model matrix (read-only)."""
|
|
1402
|
-
if not self._matrixNeedsUpdate:
|
|
1403
|
-
return self._modelMatrix
|
|
1404
|
-
else:
|
|
1405
|
-
return self.getModelMatrix()
|
|
1406
|
-
|
|
1407
|
-
@property
|
|
1408
|
-
def inverseModelMatrix(self):
|
|
1409
|
-
"""Inverse of the pose as a 4x4 model matrix (read-only)."""
|
|
1410
|
-
if not self._invMatrixNeedsUpdate:
|
|
1411
|
-
return self._invModelMatrix
|
|
1412
|
-
else:
|
|
1413
|
-
return self.getModelMatrix(inverse=True)
|
|
1414
|
-
|
|
1415
|
-
@property
|
|
1416
|
-
def normalMatrix(self):
|
|
1417
|
-
"""The normal transformation matrix."""
|
|
1418
|
-
if not self._normalMatrixNeedsUpdate:
|
|
1419
|
-
return self._normalMatrix
|
|
1420
|
-
else:
|
|
1421
|
-
return self.getNormalMatrix()
|
|
1422
|
-
|
|
1423
|
-
def getNormalMatrix(self, out=None):
|
|
1424
|
-
"""Get the present normal matrix.
|
|
1425
|
-
|
|
1426
|
-
Parameters
|
|
1427
|
-
----------
|
|
1428
|
-
out : ndarray or None
|
|
1429
|
-
Optional 4x4 array to write values to. Values written are computed
|
|
1430
|
-
using 32-bit float precision regardless of the data type of `out`.
|
|
1431
|
-
|
|
1432
|
-
Returns
|
|
1433
|
-
-------
|
|
1434
|
-
ndarray
|
|
1435
|
-
4x4 normal transformation matrix.
|
|
1436
|
-
|
|
1437
|
-
"""
|
|
1438
|
-
if not self._normalMatrixNeedsUpdate:
|
|
1439
|
-
return self._normalMatrix
|
|
1440
|
-
|
|
1441
|
-
self._normalMatrix[:, :] = np.linalg.inv(self.modelMatrix).T
|
|
1442
|
-
|
|
1443
|
-
if out is not None:
|
|
1444
|
-
out[:, :] = self._normalMatrix[:, :]
|
|
1445
|
-
|
|
1446
|
-
self._normalMatrixNeedsUpdate = False
|
|
1447
|
-
|
|
1448
|
-
return self._normalMatrix
|
|
1449
|
-
|
|
1450
|
-
def getModelMatrix(self, inverse=False, out=None):
|
|
1451
|
-
"""Get the present rigid body transformation as a 4x4 matrix.
|
|
1452
|
-
|
|
1453
|
-
Matrices are computed only if the `pos` and `ori` attributes have been
|
|
1454
|
-
updated since the last call to `getModelMatrix`. The returned matrix is
|
|
1455
|
-
an `ndarray` and row-major.
|
|
1456
|
-
|
|
1457
|
-
Parameters
|
|
1458
|
-
----------
|
|
1459
|
-
inverse : bool, optional
|
|
1460
|
-
Return the inverse of the model matrix.
|
|
1461
|
-
out : ndarray or None
|
|
1462
|
-
Optional 4x4 array to write values to. Values written are computed
|
|
1463
|
-
using 32-bit float precision regardless of the data type of `out`.
|
|
1464
|
-
|
|
1465
|
-
Returns
|
|
1466
|
-
-------
|
|
1467
|
-
ndarray
|
|
1468
|
-
4x4 transformation matrix.
|
|
1469
|
-
|
|
1470
|
-
Examples
|
|
1471
|
-
--------
|
|
1472
|
-
Using a rigid body pose to transform something in OpenGL::
|
|
1473
|
-
|
|
1474
|
-
rb = RigidBodyPose((0, 0, -2)) # 2 meters away from origin
|
|
1475
|
-
|
|
1476
|
-
# Use `array2pointer` from `psychopy.tools.arraytools` to convert
|
|
1477
|
-
# array to something OpenGL accepts.
|
|
1478
|
-
mv = array2pointer(rb.modelMatrix)
|
|
1479
|
-
|
|
1480
|
-
# use the matrix to transform the scene
|
|
1481
|
-
glMatrixMode(GL_MODELVIEW)
|
|
1482
|
-
glPushMatrix()
|
|
1483
|
-
glLoadIdentity()
|
|
1484
|
-
glMultTransposeMatrixf(mv)
|
|
1485
|
-
|
|
1486
|
-
# draw the thing here ...
|
|
1487
|
-
|
|
1488
|
-
glPopMatrix()
|
|
1489
|
-
|
|
1490
|
-
"""
|
|
1491
|
-
if self._matrixNeedsUpdate:
|
|
1492
|
-
self._modelMatrix = mt.posOriToMatrix(
|
|
1493
|
-
self._pos, self._ori, out=self._modelMatrix)
|
|
1494
|
-
|
|
1495
|
-
self._matrixNeedsUpdate = False
|
|
1496
|
-
self._normalMatrixNeedsUpdate = self._invMatrixNeedsUpdate = True
|
|
1497
|
-
|
|
1498
|
-
# only update and return the inverse matrix if requested
|
|
1499
|
-
if inverse:
|
|
1500
|
-
if self._invMatrixNeedsUpdate:
|
|
1501
|
-
self._invModelMatrix = mt.invertMatrix(
|
|
1502
|
-
self._modelMatrix, out=self._invModelMatrix)
|
|
1503
|
-
self._invMatrixNeedsUpdate = False
|
|
1504
|
-
|
|
1505
|
-
if out is not None:
|
|
1506
|
-
out[:, :] = self._invModelMatrix[:, :]
|
|
1507
|
-
|
|
1508
|
-
return self._invModelMatrix # return the inverse
|
|
1509
|
-
|
|
1510
|
-
if out is not None:
|
|
1511
|
-
out[:, :] = self._modelMatrix[:, :]
|
|
1512
|
-
|
|
1513
|
-
return self._modelMatrix
|
|
1514
|
-
|
|
1515
|
-
def getViewMatrix(self, inverse=False):
|
|
1516
|
-
"""Convert this pose into a view matrix.
|
|
1517
|
-
|
|
1518
|
-
Creates a view matrix which transforms points into eye space using the
|
|
1519
|
-
current pose as the eye position in the scene. Furthermore, you can use
|
|
1520
|
-
view matrices for rendering shadows if light positions are defined
|
|
1521
|
-
as `RigidBodyPose` objects.
|
|
1522
|
-
|
|
1523
|
-
Parameters
|
|
1524
|
-
----------
|
|
1525
|
-
inverse : bool
|
|
1526
|
-
Return the inverse of the view matrix. Default is `False`.
|
|
1527
|
-
|
|
1528
|
-
Returns
|
|
1529
|
-
-------
|
|
1530
|
-
ndarray
|
|
1531
|
-
4x4 transformation matrix.
|
|
1532
|
-
|
|
1533
|
-
"""
|
|
1534
|
-
axes = np.asarray([[0, 0, -1], [0, 1, 0]], dtype=np.float32)
|
|
1535
|
-
|
|
1536
|
-
rotMatrix = mt.quatToMatrix(self._ori, dtype=np.float32)
|
|
1537
|
-
transformedAxes = mt.applyMatrix(rotMatrix, axes, dtype=np.float32)
|
|
1538
|
-
|
|
1539
|
-
fwdVec = transformedAxes[0, :] + self._pos
|
|
1540
|
-
upVec = transformedAxes[1, :]
|
|
1541
|
-
|
|
1542
|
-
viewMatrix = vt.lookAt(self._pos, fwdVec, upVec, dtype=np.float32)
|
|
1543
|
-
|
|
1544
|
-
if inverse:
|
|
1545
|
-
viewMatrix = mt.invertMatrix(viewMatrix)
|
|
1546
|
-
|
|
1547
|
-
return viewMatrix
|
|
1548
|
-
|
|
1549
|
-
def transform(self, v, out=None):
|
|
1550
|
-
"""Transform a vector using this pose.
|
|
1551
|
-
|
|
1552
|
-
Parameters
|
|
1553
|
-
----------
|
|
1554
|
-
v : array_like
|
|
1555
|
-
Vector to transform [x, y, z].
|
|
1556
|
-
out : ndarray or None, optional
|
|
1557
|
-
Optional array to write values to. Must have the same shape as
|
|
1558
|
-
`v`.
|
|
1559
|
-
|
|
1560
|
-
Returns
|
|
1561
|
-
-------
|
|
1562
|
-
ndarray
|
|
1563
|
-
Transformed points.
|
|
1564
|
-
|
|
1565
|
-
"""
|
|
1566
|
-
return mt.transform(self._pos, self._ori, points=v, out=out)
|
|
1567
|
-
|
|
1568
|
-
def transformNormal(self, n):
|
|
1569
|
-
"""Rotate a normal vector with respect to this pose.
|
|
1570
|
-
|
|
1571
|
-
Rotates a normal vector `n` using the orientation quaternion at `ori`.
|
|
1572
|
-
|
|
1573
|
-
Parameters
|
|
1574
|
-
----------
|
|
1575
|
-
n : array_like
|
|
1576
|
-
Normal to rotate (1-D with length 3).
|
|
1577
|
-
|
|
1578
|
-
Returns
|
|
1579
|
-
-------
|
|
1580
|
-
ndarray
|
|
1581
|
-
Rotated normal `n`.
|
|
1582
|
-
|
|
1583
|
-
"""
|
|
1584
|
-
pout = np.zeros((3,), dtype=np.float32)
|
|
1585
|
-
pout[:] = n
|
|
1586
|
-
t = np.cross(self._ori[:3], n[:3]) * 2.0
|
|
1587
|
-
u = np.cross(self._ori[:3], t)
|
|
1588
|
-
t *= self._ori[3]
|
|
1589
|
-
pout[:3] += t
|
|
1590
|
-
pout[:3] += u
|
|
1591
|
-
|
|
1592
|
-
return pout
|
|
1593
|
-
|
|
1594
|
-
def __invert__(self):
|
|
1595
|
-
"""Operator `~` to invert the pose. Returns a `RigidBodyPose` object."""
|
|
1596
|
-
return RigidBodyPose(
|
|
1597
|
-
-self._pos, mt.invertQuat(self._ori, dtype=np.float32))
|
|
1598
|
-
|
|
1599
|
-
def invert(self):
|
|
1600
|
-
"""Invert this pose.
|
|
1601
|
-
"""
|
|
1602
|
-
self._ori = mt.invertQuat(self._ori, dtype=np.float32)
|
|
1603
|
-
self._pos *= -1.0
|
|
1604
|
-
|
|
1605
|
-
def inverted(self):
|
|
1606
|
-
"""Get a pose which is the inverse of this one.
|
|
1607
|
-
|
|
1608
|
-
Returns
|
|
1609
|
-
-------
|
|
1610
|
-
RigidBodyPose
|
|
1611
|
-
This pose inverted.
|
|
1612
|
-
|
|
1613
|
-
"""
|
|
1614
|
-
return RigidBodyPose(
|
|
1615
|
-
-self._pos, mt.invertQuat(self._ori, dtype=np.float32))
|
|
1616
|
-
|
|
1617
|
-
def distanceTo(self, v):
|
|
1618
|
-
"""Get the distance to a pose or point in scene units.
|
|
1619
|
-
|
|
1620
|
-
Parameters
|
|
1621
|
-
----------
|
|
1622
|
-
v : RigidBodyPose or array_like
|
|
1623
|
-
Pose or point [x, y, z] to compute distance to.
|
|
1624
|
-
|
|
1625
|
-
Returns
|
|
1626
|
-
-------
|
|
1627
|
-
float
|
|
1628
|
-
Distance to `v` from this pose's origin.
|
|
1629
|
-
|
|
1630
|
-
"""
|
|
1631
|
-
if hasattr(v, 'pos'): # v is pose-like object
|
|
1632
|
-
targetPos = v.pos
|
|
1633
|
-
else:
|
|
1634
|
-
targetPos = np.asarray(v[:3])
|
|
1635
|
-
|
|
1636
|
-
return np.sqrt(np.sum(np.square(targetPos - self.pos)))
|
|
1637
|
-
|
|
1638
|
-
def interp(self, end, s):
|
|
1639
|
-
"""Interpolate between poses.
|
|
1640
|
-
|
|
1641
|
-
Linear interpolation is used on position (Lerp) while the orientation
|
|
1642
|
-
has spherical linear interpolation (Slerp) applied taking the shortest
|
|
1643
|
-
arc on the hypersphere.
|
|
1644
|
-
|
|
1645
|
-
Parameters
|
|
1646
|
-
----------
|
|
1647
|
-
end : LibOVRPose
|
|
1648
|
-
End pose.
|
|
1649
|
-
s : float
|
|
1650
|
-
Interpolation factor between interval 0.0 and 1.0.
|
|
1651
|
-
|
|
1652
|
-
Returns
|
|
1653
|
-
-------
|
|
1654
|
-
RigidBodyPose
|
|
1655
|
-
Rigid body pose whose position and orientation is at `s` between
|
|
1656
|
-
this pose and `end`.
|
|
1657
|
-
|
|
1658
|
-
"""
|
|
1659
|
-
if not (hasattr(end, 'pos') and hasattr(end, 'ori')):
|
|
1660
|
-
raise TypeError("Object for `end` does not have attributes "
|
|
1661
|
-
"`pos` and `ori`.")
|
|
1662
|
-
|
|
1663
|
-
interpPos = mt.lerp(self._pos, end.pos, s)
|
|
1664
|
-
interpOri = mt.slerp(self._ori, end.ori, s)
|
|
1665
|
-
|
|
1666
|
-
return RigidBodyPose(interpPos, interpOri)
|
|
1667
|
-
|
|
1668
|
-
def alignTo(self, alignTo):
|
|
1669
|
-
"""Align this pose to another point or pose.
|
|
1670
|
-
|
|
1671
|
-
This sets the orientation of this pose to one which orients the forward
|
|
1672
|
-
axis towards `alignTo`.
|
|
1673
|
-
|
|
1674
|
-
Parameters
|
|
1675
|
-
----------
|
|
1676
|
-
alignTo : array_like or LibOVRPose
|
|
1677
|
-
Position vector [x, y, z] or pose to align to.
|
|
1678
|
-
|
|
1679
|
-
"""
|
|
1680
|
-
if hasattr(alignTo, 'pos'): # v is pose-like object
|
|
1681
|
-
targetPos = alignTo.pos
|
|
1682
|
-
else:
|
|
1683
|
-
targetPos = np.asarray(alignTo[:3])
|
|
1684
|
-
|
|
1685
|
-
fwd = np.asarray([0, 0, -1], dtype=np.float32)
|
|
1686
|
-
toTarget = targetPos - self._pos
|
|
1687
|
-
invPos = mt.applyQuat(
|
|
1688
|
-
mt.invertQuat(self._ori, dtype=np.float32),
|
|
1689
|
-
toTarget, dtype=np.float32)
|
|
1690
|
-
invPos = mt.normalize(invPos)
|
|
1691
|
-
|
|
1692
|
-
self.ori = mt.multQuat(
|
|
1693
|
-
self._ori, mt.alignTo(fwd, invPos, dtype=np.float32))
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
class BoundingBox:
|
|
1697
|
-
"""Class for representing object bounding boxes. This is a
|
|
1698
|
-
lazy-imported class, therefore import using full path
|
|
1699
|
-
`from psychopy.visual.stim3d import BoundingBox` when inheriting from it.
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
A bounding box is a construct which represents a 3D rectangular volume about
|
|
1703
|
-
some pose, defined by its minimum and maximum extents in the reference frame
|
|
1704
|
-
of the pose. The axes of the bounding box are aligned to the axes of the
|
|
1705
|
-
world or the associated pose.
|
|
1706
|
-
|
|
1707
|
-
Bounding boxes are primarily used for visibility testing; to determine if
|
|
1708
|
-
the extents of an object associated with a pose (eg. the vertices of a
|
|
1709
|
-
model) falls completely outside of the viewing frustum. If so, the model can
|
|
1710
|
-
be culled during rendering to avoid wasting CPU/GPU resources on objects not
|
|
1711
|
-
visible to the viewer.
|
|
1712
|
-
|
|
1713
|
-
"""
|
|
1714
|
-
def __init__(self, extents=None):
|
|
1715
|
-
self._extents = np.zeros((2, 3), np.float32)
|
|
1716
|
-
self._posCorners = np.zeros((8, 4), np.float32)
|
|
1717
|
-
|
|
1718
|
-
if extents is not None:
|
|
1719
|
-
self._extents[0, :] = extents[0]
|
|
1720
|
-
self._extents[1, :] = extents[1]
|
|
1721
|
-
else:
|
|
1722
|
-
self.clear()
|
|
1723
|
-
|
|
1724
|
-
self._computeCorners()
|
|
1725
|
-
|
|
1726
|
-
def _computeCorners(self):
|
|
1727
|
-
"""Compute the corners of the bounding box.
|
|
1728
|
-
|
|
1729
|
-
These values are cached to speed up computations if extents hasn't been
|
|
1730
|
-
updated.
|
|
1731
|
-
|
|
1732
|
-
"""
|
|
1733
|
-
for i in range(8):
|
|
1734
|
-
self._posCorners[i, 0] = \
|
|
1735
|
-
self._extents[1, 0] if (i & 1) else self._extents[0, 0]
|
|
1736
|
-
self._posCorners[i, 1] = \
|
|
1737
|
-
self._extents[1, 1] if (i & 2) else self._extents[0, 1]
|
|
1738
|
-
self._posCorners[i, 2] = \
|
|
1739
|
-
self._extents[1, 2] if (i & 4) else self._extents[0, 2]
|
|
1740
|
-
self._posCorners[i, 3] = 1.0
|
|
1741
|
-
|
|
1742
|
-
@property
|
|
1743
|
-
def isValid(self):
|
|
1744
|
-
"""`True` if the bounding box is valid."""
|
|
1745
|
-
return np.all(self._extents[0, :] <= self._extents[1, :])
|
|
1746
|
-
|
|
1747
|
-
@property
|
|
1748
|
-
def extents(self):
|
|
1749
|
-
return self._extents
|
|
1750
|
-
|
|
1751
|
-
@extents.setter
|
|
1752
|
-
def extents(self, value):
|
|
1753
|
-
self._extents[0, :] = value[0]
|
|
1754
|
-
self._extents[1, :] = value[1]
|
|
1755
|
-
self._computeCorners()
|
|
1756
|
-
|
|
1757
|
-
def fit(self, verts):
|
|
1758
|
-
"""Fit the bounding box to vertices."""
|
|
1759
|
-
np.amin(verts, axis=0, out=self._extents[0])
|
|
1760
|
-
np.amax(verts, axis=0, out=self._extents[1])
|
|
1761
|
-
self._computeCorners()
|
|
1762
|
-
|
|
1763
|
-
def clear(self):
|
|
1764
|
-
"""Clear a bounding box, invalidating it."""
|
|
1765
|
-
self._extents[0, :] = np.finfo(np.float32).max
|
|
1766
|
-
self._extents[1, :] = np.finfo(np.float32).min
|
|
1767
|
-
self._computeCorners()
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
1167
|
class BaseRigidBodyStim(ColorMixin, WindowMixin):
|
|
1771
1168
|
"""Base class for rigid body 3D stimuli.
|
|
1772
1169
|
|
psychopy/visual/text.py
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
'''
|
|
6
6
|
|
|
7
7
|
# Part of the PsychoPy library
|
|
8
|
-
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-
|
|
8
|
+
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2025 Open Science Tools Ltd.
|
|
9
9
|
# Distributed under the terms of the GNU General Public License (GPL).
|
|
10
10
|
|
|
11
11
|
import os
|
|
@@ -244,7 +244,18 @@ class TextStim(BaseVisualStim, DraggingMixin, ForeColorMixin, ContainerMixin):
|
|
|
244
244
|
GL.glDeleteLists(self._listID, 1)
|
|
245
245
|
except (ImportError, ModuleNotFoundError, TypeError, GL.lib.GLException):
|
|
246
246
|
pass # if pyglet no longer exists
|
|
247
|
-
|
|
247
|
+
|
|
248
|
+
@property
|
|
249
|
+
def opacity(self):
|
|
250
|
+
return BaseVisualStim.opacity.fget(self)
|
|
251
|
+
|
|
252
|
+
@opacity.setter
|
|
253
|
+
def opacity(self, value):
|
|
254
|
+
# do base setting
|
|
255
|
+
BaseVisualStim.opacity.fset(self, value)
|
|
256
|
+
# trigger update
|
|
257
|
+
self._needSetText = True
|
|
258
|
+
|
|
248
259
|
@attributeSetter
|
|
249
260
|
def height(self, height):
|
|
250
261
|
"""The height of the letters (Float/int or None = set default).
|
|
@@ -485,7 +496,6 @@ class TextStim(BaseVisualStim, DraggingMixin, ForeColorMixin, ContainerMixin):
|
|
|
485
496
|
if self.win.winType in ["pyglet", "glfw"]:
|
|
486
497
|
# unbind the main texture
|
|
487
498
|
GL.glActiveTexture(GL.GL_TEXTURE0)
|
|
488
|
-
# GL.glActiveTextureARB(GL.GL_TEXTURE0_ARB)
|
|
489
499
|
# the texture is specified by pyglet.font.GlyphString.draw()
|
|
490
500
|
GL.glBindTexture(GL.GL_TEXTURE_2D, 0)
|
|
491
501
|
GL.glEnable(GL.GL_TEXTURE_2D)
|