Builder concepts构建器概念
Routines and Flow例程与流程
The Builder view of the PsychoPy® application is designed to allow the rapid development of a wide range of experiments for experimental psychology and cognitive neuroscience experiments.
PsychoPy®应用的构建器视图旨在为实验心理学和认知神经科学实验提供快速开发多种实验的能力。
The Builder view comprises two main panels for viewing the experiment’s Routines (upper left) and another for viewing the Flow (lower part of the window).
构建器视图包含两个主要面板:上方左侧用于查看实验的例程(Routines),下方窗口区域用于查看流程(Flow)。
An experiment can have any number of Routines, describing the timing of stimuli, instructions and responses. These are portrayed in a simple track-based view, similar to that of video-editing software, which allows stimuli to come on go off repeatedly and to overlap with each other.
实验可以包含任意数量的例程(Routines),用于描述刺激呈现、指导语和反应的时间进程。这些例程以类似视频编辑软件的简单轨道化视图呈现,允许刺激反复出现、相互叠加。
The way in which these Routines are combined and/or repeated is controlled by the Flow panel. All experiments have exactly one Flow. This takes the form of a standard flowchart allowing a sequence of routines to occur one after another, and for loops to be inserted around one or more of the Routines. The loop also controls variables that change between repetitions, such as stimulus attributes.
例程的组合方式和重复次数由流程面板(Flow panel)控制。所有实验必须包含且仅有一个流程(Flow)。流程采用标准流程图形式,允许按顺序排列多个例程,并在例程周围插入循环。循环同时控制每次重复时变化的变量(如刺激属性)。
If it is your first time opening PsychoPy®, we highly recommend taking a look at the large number of inbuilt demos that come with PsychoPy®. This can be done through selecting Demos > unpack demos within your application. Another good place to get started is to take a look at the many openly available demos at pavlovia.org you can view an intro to Pavlovia at our Youtube channel.
如果您是首次打开PsychoPy®,我们强烈建议您查看应用内置的大量演示实验。可通过菜单栏选择「Demos > 解压演示」访问这些示例。另一个入门途径是访问Pavlovia平台的开源演示库(pavlovia.org),您可以在我们的YouTube频道观看Pavlovia平台介绍视频。
The |PsychoPy| builder, the Routines panel an the Flow are highlighted, if you are new to |PsychoPy|, we recommend starting by unpacking your demos and exploring the example tasks
|PsychoPy| 构建器、例程面板(Routines panel)和流程(Flow)会被突出显示。若您是 |PsychoPy| 新手,我们建议您从解压演示实验并探索示例任务开始。
The components panel组件面板
You can add components to an experiment by selecting components from the Components panel. This is currently divided into 7 sections:
您可以通过从组件面板(Components panel)中选择组件向实验添加组件。当前面板分为7个部分:
Favorites - your commonly used components
收藏夹 - 常用组件
Stimuli - components used to present a stimulus (e.g. a visual image or shape, or an auditory tone or file)
刺激 - 用于呈现刺激的组件(例如视觉图像/形状,或听觉音调/文件)
Responses - stimulu used to gather responses (e.g. keyboards or mouse components - amongst many others!)
反应 - 用于收集反应的组件(例如键盘或鼠标组件等!)
Custom - builder can be used to make a fair few complex experiments now, but for added flexibility, you can add code components at any point in an experiment (e.g. for providing response-dependant feedback).
自定义 - 构建器现已支持创建较复杂的实验,但为增加灵活性,您可在实验任意位置添加代码组件(例如提供反应依赖性反馈)。
EEG - PsychoPy® can actually be used with a range of EEG devices. Most of these are interacted with through delivering a trigger through the parallel port (see I/O below), or serial port (see ../api/serial.html). However, PsychoPy® Builder has inbuilt support (i.e. no need for code snippets) for working with Emotiv EEG, you can view a Youtube tutorial on how to use Emotiv EEG with PsychoPy here.
EEG - PsychoPy® 可与多种脑电设备配合使用。多数设备通过并行端口发送触发信号(见下方I/O说明)或串口通信(见../api/serial.html)。但PsychoPy®构建器已内置对Emotiv脑电的支持(无需代码片段),您可通过此链接查看YouTube教程。
Eyetracking - PsychoPy® 2021.2 released inbuilt supprort for eyetrackers! PsychoPy® had supported eye tracker research for a while, but not via components in PsychoPy® builder. You can learn more about these from the more specific components.html info.
眼动追踪 - PsychoPy® 2021.2 已内置眼动仪支持!此前PsychoPy®虽支持眼动研究,但无法通过构建器组件实现。更多信息请参阅components.html文档。
I/O - I/O stands for “input/output” under the hood this is ../api/iohub.html, this is useful for if you are working with external hardware devices requiring communication via the parallel port (e.g. EEG).
I/O - I/O代表“输入/输出”,底层对应../api/iohub.html。此功能适用于需通过并行端口(如EEG设备)与外部硬件通信的场景。
Making experiments to go online创建可在线运行的实验
Buttons to interact with pavlovia.org from your experiment builder
从实验构建器与pavlovia.org交互的按钮
Before making an experiment to go online, it is a good idea to check the status of online options - remember PsychoJS (the javascript sister library of PsychoPy®) is younger that PsychoPy® - so not everything can be done online yet! but for most components there are prototype work arounds to still make things possible (e.e. RDKs and staircases). You can learn more about taking experiments online from builder via the online documentation.
在创建在线实验前,建议先查看在线选项的状态——请注意PsychoJS(PsychoPy®的JavaScript姊妹库)比PsychoPy®年轻,因此并非所有功能都能在线实现!不过大多数组件已有原型解决方案(例如随机点运动刺激RDKs和阶梯法staircases)。您可通过在线文档了解如何通过构建器将实验部署到线上。