(完整word版)心理学实验软件PsychoPy方法

合集下载

PsyKey简介intro

PsyKey简介intro

PsyKey心理教学系统实验软件使用简介(65个)一、软件内容介绍PsyKey心理教学系统实验软件涵盖普通心理学、儿童心理学、实验心理学、认知心理学等学科中的主要实验内容,并以学科为主要划分依据将实验内容分为五大部分,具体内容如下:第一部分 普通心理学演示实验颜色视觉 、 知觉的整体性 、知觉的选择性 、知觉的理解性 、知觉的恒常性 、深度知觉 、错觉 、观察力 、机械记忆与意义记忆 、 表象和想象、螺旋后效、明度对比第二部分 儿童心理学实验思维策略 、辨别学习的策略 、空间认知的发展 、 天平实验 、认知方式 、儿童道德判断的发展 、小学生推理能力的测定、注意范围、时间估计、 速度估计、数字记忆、空间位置记忆第三部分 基本心理能力的实验测定注意广度 、注意分配 、时间知觉 、速度知觉 、短时记忆广度 、空间位置记忆广度 、工作记忆广度 、再认能力测试 、简单反应时 、选择反应时 、辨别反应、划消测验第四部分 经典心理学实验最小变化法——明度的差别阈限 、恒定刺激法——音高的差别阈限 、 平均差误法——线段长度差别阈限 、部分报告法——瞬时记忆 、对偶比较法——制作颜色爱好顺序量表 、评价法——信号侦察论 、系列位置效应 、句子理解速度 、似动现象 、学习迁移 、STROOP效应 、河内塔 、反应时间作为因变量的优越性、等分线段的准确性、等级排列法——制作心理顺序量表、准备时间与简单反应时第五部分 认知心理学实验概念形成 、表象的心理旋转 、减法反应时——短时记忆的视觉编码 、 空白试验法——学习的策略 、 短时记忆的信息提取 、记忆的加工水平 、视觉搜索中的非对称性 、内隐记忆 、记忆错觉 、汉语词汇加工过程的抑制机制 、无意识知觉的实验研究——错误再认、视知觉的整体加工和局部加工、字词优势效应二、软件使用演示首先,在桌面上点击PsyKey心理教学系统的图标打开系统,会出现如下所示的界面:之后会看到一个登陆窗口,如果是第一次登陆则添加新的用户编号和密码到数据库中,若不是第一次登陆,则使用已有的编号和密码进入系统,如下所示:进入系统后,打开实验列表,选择所要进行的实验,(这里以内隐记忆实验为例演示实验操作过程),如下所示:当选择了要进行的实验后,先浏览有关实验的详细信息然后阅读实验指导语,根据要求进行实验实验结束后,根据实验报告的需要,在实验结果中将个人或全体的实验结果输出。

走马灯实验的实验方法 -回复

走马灯实验的实验方法 -回复

走马灯实验的实验方法-回复走马灯实验的实验方法是一种经典的心理学实验方法,它可以通过呈现不同的视觉刺激来探究人类视觉系统的运作机制。

下面将一步一步地介绍走马灯实验的实验方法。

一、实验材料的准备为进行走马灯实验,需要准备以下材料:1.电脑2.实验软件(比如PsychoPy等软件)3.显示器4.键盘5.眼动仪6.数据记录软件(比如Excel等软件)二、实验参与者的招募和筛选在进行走马灯实验之前,需要招募一些愿意参加实验的人。

他们必须符合特定的条件,比如年龄、视力、健康状况等,以保证实验的可信度和有效性。

此外,在实验之前,需要告知参与者实验的目的、流程、时间和报酬等信息,并征得他们的同意和签署知情同意书。

三、实验的流程和设计1.实验的流程走马灯实验的基本流程如下:1.在显示器上呈现视觉刺激(比如字母、数字或符号);2.参与者需要尽快识别和记录刺激;3.参与者的反应时间(RT)和识别准确率(ACC)会被记录下来;4.重复1-3步骤喂50次或更多,以收集更多的数据。

2.实验的设计灯实验的设计可以包括以下几个要素:1.刺激的类型和数量。

刺激可以是字母、数字、符号或其他图形。

数量可以是一个或多个。

2.刺激的持续时间。

持续时间可以是几毫秒到几秒钟不等。

要使实验的成果更加可信和有效,可以使用眼动仪等技术来测量参与者的注意力和注意力分配。

3.刺激的呈现模式。

刺激的呈现模式可以是连续的(参与者需要持续关注不断变化的刺激)或间断的(刺激呈现后有休息间隔)。

4.实验的组织和分组。

为了更好地比较不同变量之间的影响,可以将参与者分为实验组和对照组,并对他们的反应时间和准确率进行比较。

四、数据的收集和分析走马灯实验之后,需要收集反应时间和识别准确率的数据,并进行分析。

数据分析通常包括以下几个步骤:1.数据的收集和存储。

数据可以通过记录实验结果、注释电脑屏幕上的指示符、使用数据记录软件等方式进行收集和存储。

2.数据的预处理。

数据预处理包括数据清洗、筛选、转换、去除异常值等步骤。

心理学的实验方法

心理学的实验方法

心理学的实验方法心理学作为一门科学,通过实验方法来研究和探索人类的心理活动、行为和思维过程。

实验方法是心理学研究中最常用的方法之一,它可以提供可靠和客观的证据,帮助心理学家们理解人类行为和心理现象背后的原因。

本文将介绍心理学实验方法的基本原理和一些常用的实验设计。

一、实验方法的基本原理心理学实验方法基于以下几个基本原理:1. 控制变量:实验中的控制组和实验组在除了处理变量(即研究者所关心的因变量)之外的其他方面是相同的,以确保实验中观察到的差异可以被归因于处理变量的影响。

2. 随机分配:实验中的参与者被随机分配到实验组和控制组,以消除个体差异的影响。

随机分配可以保证两组在开始实验时是相似的,从而增加实验结果的可靠性和效度。

3. 操作定义:实验中的变量需经过明确定义和操作,以确保研究者对实验条件的一致性和可重复性。

研究者需要准确地测量和控制每个变量,以便得到可比较和可解释的结果。

4. 双盲设计:在实验中,实验参与者和实验者都不知道自己所处的组别,以避免实验者和参与者的期望对结果产生影响。

这可以减少主观偏见,保证实验结果的客观性和可靠性。

二、常用的实验设计1. 实验组对照组设计:这是最基本的实验设计之一。

研究者将参与者随机分配到实验组和对照组,在实验组中施加处理变量,而对照组不进行处理。

通过比较两组的差异,研究者可以得出处理变量对结果的影响。

2. 重复测量设计:在这种设计中,参与者会在不同时间或不同条件下接受多次测试。

通过对同一参与者的多次测量,研究者可以在控制其他变量的情况下观察到变量之间的关系。

3. 配对设计:在配对设计中,研究者将参与者配对,并分别将一对参与者分配到实验组和对照组。

这种设计可以控制个体差异的影响,增加实验结果的可靠性。

4. 交叉设计:交叉设计是一种复杂的实验设计,参与者会在不同的实验条件下多次测试。

这种设计可以帮助研究者观察到参与者在不同条件下的变化,并减少个体差异的影响。

三、实验方法的优缺点实验方法作为心理学研究中最常用的方法之一,有其优点和局限性。

心理学实验程序编程(python)

心理学实验程序编程(python)

⼼理学实验程序编程(python)任务⼀:实现简单的屏幕的颜⾊之间的切换import pygamefrom pygame.locals import *pygame.init()win = pygame.display.set_mode((800,600),DOUBLEBUF|HWSURFACE)for i in range(10):win.fill((0,255,0))if i%2==0:win.fill((255,0,0))pygame.time.wait(500)pygame.display.flip()注意的点:需要先导⼊Pygame.locals才能⽤后来的doublebuf 以及hwsurface但是怎么样定义屏幕的颜⾊即 depth 的设置还不是很懂。

任务⼆:捕捉⿏标移动的事件,并在⿏标的位置画⼀个圆import pygamefrom pygame.locals import *import syspygame.init()win = pygame.display.set_mode((800,600),DOUBLEBUF|HWSURFACE)while True:ev = pygame.event.get()for i in ev:if not i ==None:print(i)if i.type==QUIT:pygame.quit()elif i.type==MOUSEMOTION:pygame.draw.circle(win,(255,0,0),i.pos,3, 3)pygame.display.flip()疑问:在pygame.draw.circle函数中不能加关键字如radius=, 或者width =,只能直接写值,不知道为什么。

还有在捕捉事件的过程中⼀定要加⼊死循环,不然事件会瞬间打印出来,再后来的事件发⽣之前,捕捉已经结束。

任务三:simon 效应的雏形,随机呈现⼩圆点#random circle dot in the windowimport pygame,sys,randomfrom pygame.locals import *pygame.init()win = pygame.display.set_mode((800,600),DOUBLEBUF|HWSURFACE)cor = ()position = ()for i in range(30):num = random.choice([0,1])if num ==0:cor = (255,0,0)position = (200,300)else:cor=(0,255,0)position =(600,300)pygame.time.wait(500)pygame.draw.circle(win,cor,position,10)## win.fill((0,0,0)) the display covers?when the code is here,the reason is that the background dont cansal the circlepygame.display.flip()pygame.time.delay(1000)win.fill((0,0,0))pygame.display.flip()#no no no ,because i dont have the flip(), not the background cannt cover the circlepygame.time.delay(800)pygame.quit()sys.exit()注意的点:呈现圆点后的⿊屏,要⽤filp()函数,⽽并不是背景⾊不能够覆盖圆点任务四:如何添加声⾳##add a sound to the windowimport pygamefrom pygame.locals import *pygame.init()win = pygame.display.set_mode((800,600),DOUBLEBUF|HWSURFACE)sound = pygame.mixer.Sound("C:/Users/mike1/Desktop/1111111.wav")sound.play()需要注意的点:1、其实不需要win这个屏幕依然可以运⾏声⾳⽂件2、声⾳⽂件必须是wav格式,试了⼀下mp3格式,但是并不⽀持,可以在线将mp3格式转换成wav格式。

psychopy指导语 -回复

psychopy指导语 -回复

psychopy指导语-回复Psychopy是一款非常强大的心理学实验软件工具,它可以帮助研究人员设计和运行心理学实验。

本篇文章将一步步介绍如何使用Psychopy进行实验设计和运行。

第一步:了解Psychopy的基本操作和功能Psychopy是一个开源的心理学实验软件,它集成了一系列实验设计和运行工具。

在开始使用Psychopy之前,我们需要先下载并安装最新版本的软件。

一旦安装完成,你就可以启动软件并开始使用了。

第二步:创建一个新项目在Psychopy中,每个实验都是一个项目。

在创建新项目之前,切记先确定实验的目标和研究问题。

一旦你明确了实验的目标,可以按照以下步骤创建新项目:- 在Psychopy的主界面上点击"File",然后选择"New..."。

- 在弹出的对话框中,输入项目名称和存储路径,然后点击"OK"。

第三步:设计实验任务在Psychopy中设计实验任务可以通过两种方式来实现:可视化接口或Python代码。

这两种方式各有优劣,你可以根据自己的需要选择其中一种。

使用可视化接口设计实验任务的步骤如下:1. 点击Psychopy主界面上的"Builder"按钮,进入可视化接口。

2. 在Builder界面上,你可以通过拖拽组件来创建实验任务的各个部分,如刺激呈现、响应收集和实验流程等。

3. 可以根据需要定制每个组件的属性和参数,如呈现持续时间、刺激类型和键盘响应等。

4. 最后,点击"File",然后选择"Save"保存实验任务。

使用Python代码设计实验任务的步骤如下:1. 点击Psychopy主界面上的"Coder"按钮,进入代码编辑界面。

2. 在代码编辑界面上,你可以使用Python代码来编写实验任务的各个部分,如刺激呈现、响应收集和实验流程等。

PsychoPy的线上实验模式

PsychoPy的线上实验模式

PsychoPy的线上实验模式那这个“Pavlovia”是个什么东西呢?先把它的链接地址放在这⾥:https:///(⽂末点击“阅读原⽂”可直接进⼊)在官⽅的介绍中,这是⼀个开放平台,可以在这个在线的项⽬库中浏览现有的编制好的实验程序,也可以将你⾃⼰编制的实验程序在这个平台上公开或者设置为特定⼈员或⼩组可见,还能在现有PsychoPy程序的基础上fork(创建源项⽬代码的分⽀,并拷贝到⾃⼰的账号中)并基于此创建⾃⼰的实验程序。

在Pavlovia中可以将⾃⼰创建的项⽬保存在⾃⼰的项⽬库中,实现问题追踪和多⼈协作。

只需要上传HTML或JS的⽂件(可以是通过PsychoPy,jsPsycho或者lab.js制作的实验程序)到平台上,就可以开放权限给被试测试,并且收取到的数据也会保存在⾃⼰的项⽬库中。

加上配合Sona和Prolific等被试招募服务,就可以实现实验的完全线上化,简化了实验实施的流程。

如果了解“全球最⼤同性交友⽹站”——GitHub的同学,或者使⽤过GitLab的同学可能看完上⾯的介绍就会发现,Pavlovia这个模式和GitHub/GitLab⾮常相似,⼏乎可以说是⼼理学实验的GitHub了(具体⾥⾯的项⽬详情页应该就是使⽤的GitLab)。

在Pavlovia的Docs标签下,有简要的使⽤说明介绍:在Explore标签下,可以查询到平台上现有的实验程序们。

点击launch experiment可以在线试⽤该程序,点击view code可以进⼊到实验程序的详情页,具体的下载和fork等操作可以在详情页进⾏:在Dashboard标签下,类似于是个⼈中⼼,收到的消息,个⼈创建的实验和账户信息等在此呈现。

在Store标签下是充值信息。

⽬前个⼈账号收集⼀个被试的实验数据⼤概折合⼈民币1.7元左右,价格还是很合适的。

⽽学校或机构账号⼤概是1.3W⼀年,不限制被试数:以上就是对于Pavlovia这个平台的简单介绍了,具体的功能和细节欢迎⼤家⾃⼰去使⽤、尝试和发现。

psychopy code 条件分支

psychopy code 条件分支

一、概述在心理学和认知神经科学的研究中,经常需要使用计算机程序来呈现实验材料并记录研究参与者的反应。

Psychopy是一个专门设计用于实验设计和执行的开源软件,它提供了丰富的功能和灵活的编程环境,使研究人员能够轻松地创建各种类型的心理学实验。

二、Psychopy的条件分支功能1. 概述Psychopy代码中的条件分支是一种常用的控制结构,它允许根据特定的条件来执行不同的代码段。

这种功能非常有用,因为在心理学实验中经常需要根据参与者的反应或其他条件来动态地调整实验的流程或呈现不同的实验条件。

2. 条件语句在Psychopy中,条件语句通常使用Python编程语言的if、elif 和else关键字来实现。

通过这些关键字,可以根据指定的条件来选择性地执行特定的代码块。

可以根据参与者的反应时间来呈现不同类型的刺激,或者根据不同的实验条件来执行不同的数据记录和分析操作。

3. 示例代码下面是一个使用条件分支功能的简单示例代码:```from psychopy import visual, coreimport randomwin = visual.Window()stim1 = visual.TextStim(win, text='Stimulus 1')stim2 = visual.TextStim(win, text='Stimulus 2')if random.choice([True, False]):stim1.draw()else:stim2.draw()win.flip()core.w本人t(1)```在这个例子中,根据随机选择的条件,程序要么呈现stim1要么呈现stim2。

这种动态的刺激呈现方式可以帮助研究人员设计更加灵活和个性化的实验。

三、应用案例1. 反应时间实验在心理学研究中,经常需要测量参与者对刺激的反应时间。

使用条件分支功能,可以根据不同的反应时间阈值来调整实验的刺激呈现顺序或类型,从而更好地控制实验的变量并提高数据的准确性。

心理测验软件用户手册

心理测验软件用户手册

心理测验软件用户手册心理测验软件光盘内容:心理测验系统安装(单机版).EXE心理测验软件注意事项心理测验软件用户手册心理测验软件配置:您的电脑必须具备以下的配备才能顺利执行“心理测验软件”·操作系统 Windows 95/98/ME/2000(推荐windows98)·CPU 300MHz以上AMD/Intel处理器(550MHz以上推荐)·内存 64MB(128MB推荐)·硬盘 750MB·光驱 8倍速以上·打印机 Canon系列心理测验软件安装:1.将心理测验安装光盘放入光驱,打开“资源管理器”窗口,单击光盘符号。

2.双击心理测验系统安装(单机版).EXE文件(左图),按操作程序安装心理测验软件(只按下一步)。

3.安装完成后,会在C盘根目录下创建一个名为Psycho的文件(右图),该文件夹内包含心理测验软件。

心理测验软件使用:1.按开始—>程序—>心理测试系统后点击数据引擎(左图)2.当出现右图画面时请等候,数据引擎会自动安装完成。

3.点击桌面上的心理测试系统(左图),出现用户登记画面(右图)。

4.用户名及密码输入“server”,按确定,进入下页画面。

5.当出现左图画面时,可选择相应的入口进入。

⑴.开始测试:点击后,会出现右图画面,此时可开始任一项心理测验。

⑵.测试信息:点击后,出现左图画面。

如想打印某一个被试者的报告,请将鼠标放在该条目上并双击左键。

出现画面后做相应的操作。

⑶.病人信息:点击后,出现右图画面。

如果想检索或修改病人基本信息,请将鼠标放在画面上,点击右键,出现条目选项做相应操作。

⑷.操作员管理:点击后,出现左图画面。

当增加新的操作员时,首先填写帐户、口令和使用人姓名,并在是否管理员这一条目中,请选择是,然后按保存退出。

⑸.系统维护:点击后,出现右图画面,此时可完成基本信息维护、试题维护、特征维护和历史数据删除。

V069-PsychoPy课件-PsychoPy - Psychophysics software

V069-PsychoPy课件-PsychoPy - Psychophysics software

Journal of Neuroscience Methods162 (2007) 8–13PsychoPy—Psychophysics software in PythonJonathan W.Peirce ∗Nottingham Visual Neuroscience,School of Psychology,University of Nottingham,Nottingham NG72RD,United KingdomReceived 14September 2006;received in revised form 13November 2006;accepted 30November 2006AbstractThe vast majority of studies into visual processing are conducted using computer display technology.The current paper describes a new free suite of software tools designed to make this task easier,using the latest advances in hardware and software.PsychoPy is a platform-independent experimental control system written in the Python interpreted language using entirely free libraries.PsychoPy scripts are designed to be extremely easy to read and write,while retaining complete power for the user to customize the stimuli and environment.Tools are provided within the package to allow everything from stimulus presentation and response collection (from a wide range of devices)to simple data analysis such as psychometric function fitting.Most importantly,PsychoPy is highly extensible and the whole system can evolve via user contributions.If a user wants to add support for a particular stimulus,analysis or hardware device they can look at the code for existing examples,modify them and submit the modifications back into the package so that the whole community benefits.© 2006 Elsevier B.V. Keywords:Psychophysics;Software;Stimulus presentation;Psychometric;Vision1.IntroductionSince the 1980s computers and cathode-ray-tube displays (CRTs)have been used extensively,almost ubiquitously,in visual and cognitive neuroscience experiments.Despite the spatial and temporal limitations of the displays (Bach et al.,1997)and assorted other potential problems (Bach,1997;Pelli,1997a,b;Wolf and Deubel,1997)the variety of stimuli that they can generate with relatively little effort has made them the stimulus presentation method of choice for most neuroscience laboratories.This paper describes PsychoPy,a new suite of software tools to make it easier to build simple visual and auditory stimuli for neuroscience experiments.The goal of the project was to produce a package that was entirely free,as easy as possible to use,and based on relatively inexpensive (and preferably vendor-independent)hardware.The result is a set of tools built on top of the Python programming language that makes calls directly to OpenGL graphics libraries.These tools are fully platform-independent (for the major operating systems)and can interface freely and simply with an extremely wide range of additional hardware.∗Tel.:+441158467176.E-mail address:jon@ .2.Methods and materials 2.1.HardwarePsychoPy has been developed predominantly on the Microsoft Windows ®XP platform but has been extensively tested on Mac OS X (10.3and 10.4)and has been used in exper-iments on both platforms.The necessary Python libraries on which it is based are also available on Linux and some users have reported success on that platform although it has received less complete testing as yet.The package is highly portable because it uses a minimal amount of compiled (e.g.C-based)code.One of the minimum requirements for PsychoPy is a graph-ics card that supports OpenGL drivers and multitexturing.This includes almost every graphics card made by nVidia,ATI and Matrox since the late 1990s,although on the Microsoft plat-form the user may need to download additional drivers from the graphics card vendor rather than using the ones installed with Windows ®.For experiments using a few simple stimuli (such as a pair of Gabor patches and a fixation point)basic versions of these cards or motherboards with built-in graph-ics processors are likely to suffice.For experiments that need to draw a large number of stimuli (such as random dot dis-plays or global form patterns)a more powerful graphics card,a fast CPU,and plenty of memory can all result in performance gains.0165-0270© 2006 Elsevier B.V. doi:10.1016/j.jneumeth.2006.11.017Open access under CC BY license.Open access under CC BY license.J.W.Peirce/Journal of Neuroscience Methods 162 (2007) 8–1392.2.PythonMany neuroscience labs around the world are using Matlab®(The MathWorks Inc.,Massachusetts,USA)for the generation of experimental stimuli via Psychtoolbox(Brainard,1997;Pelli, 1997a,b)and for data analysis.This has the advantages of being a relatively platform-independent language with a fairly simple syntax and numerous high-level libraries.Matlab®does have certain downsides however.It is expensive and,as a propri-etary software solution,comes without source code which leaves the science community heavily reliant on its customer support services.This downside has been clearest in the company’s unwillingness at times to support the Apple platform.The goals in using Python are similar to those in using Matlab®.They are both high-level,extensible,interpreted lan-guages,but there are several key differences.Python has a much cleaner syntax,making code easier to read and debug.It is completely open source and continuously developed on all plat-forms,each of which has its own strong user base.When bugs or incompatibilities are found they are generally very quickly fixed and,because the full source code is available,users can actually debug or change Python themselves(if they are suffi-ciently competent programmers).Another major advantage to the developer(rather than necessarily the user)is that Python has a large set of libraries already built,including a complete interface to OpenGL calls.These greatly reduce the need for platform-specific C-code.Indeed,PsychoPy is written almost entirely in native Python code.The main downsides of Python,at least for the casual user, are that installation can require more effort.When a user installs Python for the purposes of neuroscience experiments they typ-ically need to install around10auxiliary libraries to handle the functions such as data handling and plotting,stimulus draw-ing,hardware interfaces,etc.,where many of these might have been included in a single Matlab®installation.There is also,of course,a time investment in learning a new syntax.Speaking for myself,I certainly felt that the advantages of the improved syntax and absence of license fees warranted the investment of that time.2.3.The use of OpenGLHistorically,interpreted languages such as Matlab®and Python have not been fast enough to perform computations and generate stimuli on-the-fly in real time.As a result people have resorted to pre-computing stimulus movies or by manipulating the computer’s color look-up table(CLUT)to create dynamic stimuli such as drifting gratings.Even compiled languages such as C/C++were previously unable to generate moving stimuli such as a drifting Gabor patch(a sinusoidal grating drifting behind a Gaussian-enveloped window)in real-time.The prob-lem is that for a patch with,say,256×256pixels the intensity value must be calculated for over65,000pixels in the stim-ulus on every frame and then the entire array has to be sent from the main computer memory to the frame buffer.Since most computers were too slow to perform the calculations and trans-mit the data to the graphics card within the requisite10ms,movies of these stimuli had to be pre-computed to perform the task.Several advances have meant that this problem is no longer an issue.The central processing unit(CPU)obviously runs much faster than it used to,and the speed with which data is transferred to the graphics card memory is also vastly improved,but an even more important development for generation of these stimuli is that of hardware-accelerated graphics.Most graphics cards on standard personal computers now have independent processors (the graphics processing unit or GPU)which,through libraries such as OpenGL or Microsoft’s DirectX®,are able to perform very fast matrix mathematical functions,without using the CPU or the data bus that connects it to the graphics card.PsychoPy uses this fact and preloads the graphics card with component patterns such as sinusoids and Gaussian envelopes at the start of the experiment.Then,when a stimulus is needed at a particular orientation,phase and position,the GPU is able to do the work of identifying how these components need to be combined(e.g. putting the sinusoid behind the Gaussian window,orienting it and calculating the changes needed in the frame buffer).This can generally be performed for several hundred stimuli in much less time than one computer frame and with very little impact on the CPU.As a result the CPU is left to handle other tasks such as communicating with hardware and waiting for events such as subject responses or MR scanner triggers.The draw-ing processes also require very few commands to be issued, which means that the overhead of using an interpreted language is diminished.The concept can easily be extended to encompass second order stimuli such as contrast-modulated noise stimuli where three component matrices(a carrier,an envelope and a mask) are combined in one operation by the graphics card.Similarly, by using OpenGL’s notion of alpha channels(transparency)we can trivially overlay multiple semi-transparent gratings to create stimuli such as plaids.As a result of these processes being so quick and executed with minimal input from the CPU,a large number of stimuli can be rendered,so that stimuli such as mov-ing random dot displays can be generated in real-time and can even be generated using more complex elements like Gabors or difference-of-Gaussian patches.3.Results3.1.What PsychoPy providesThe primary functions of PsychoPy were designed to handle stimulus display and timing.They allow the user to gener-ate a window(or full-screen presentation)and provide some basic stimuli to use within that window(e.g.random-dot-kinematograms,drifting grating stimuli,text,photographic images).In addition to the stimuli provided(or modifications of them),the user can generate entirely new stimuli by issu-ing OpenGL commands directly to the window,or combine pre-packaged stimuli with their own commands.In addition to the visual presentation,for which it was originally designed, PsychoPy is able to present stereo auditory stimuli using the computer sound card.Responses can easily be gathered via the10J.W.Peirce /Journal of NeuroscienceMethods 162 (2007) 8–13Fig.1.The MoniterCenter application provides the experimenter with a handy tool to provide information about their monitor to perform fully automated calibrations with a PR650,and to store information and notes from previous calibrations.keyboard and mouse,by standard devices such as joysticks,or by more elaborate hardware via the serial or parallel ports.PsychoPy also provides a graphical-user-interface (GUI)application called MonitorCenter to manage calibration of mon-itors and store information from previous calibrations.The user simply inputs the dimensions of the monitor and its distance (using the GUI)allowing PsychoPy to convert units between various coordinate systems such as degrees of visual angle,centimeters or pixels.In addition MonitorCenter also stores gamma-correction parameters for the monitor,which are then applied automatically during experimental scripts.Furthermore,if a Spectrascan PR650is connected to the serial port Moni-torCenter can also perform a fully automated calibration at the touch of a button.This calibration will measure the luminance at a series of intensity levels and fit the optimum gamma-function to each gun.The PR650will also measure the intensity spec-trum for each gun to allow transformations between various color spaces.The result is that experimental scripts can sim-ply request an image,for example,of a 2◦width,with spatial frequency of 3c/◦with an isoluminant red/green chromaticity.PsychoPy will perform all the necessary spatial and chromatic calculations for the user.Although other packages,such as Psy-chToolbox,may provide scripts that help the user with these sorts of manipulations,none has such a simple automated approach allowing the user to refer to their stimuli directly in real-world units (Fig.1).To aid in experimental control a number of functions are also provided to deal with common designs such as staircase procedures or methods of constant stimuli.For example,the user can create a ‘handler’for a staircase procedure with various settings such as the desired step size(s)and start point for the staircase.On each trial the handler will automatically provide the next intensity level for the stimulus in the staircase based on the previous response of the participant (for complete example of such an experiment see Tutorial 1on the project website).These handlers can also help to store information about the experiment,such as stimulus parameters,the pseudo-random order of the stimuli,etc.Finally,a series of functions are provided to aid in data analysis,such as fitting of curves and the use of statistical resampling methods.For example,the following example script (Code Snippet 1)takes a list of intensity values and the mean responses at those intensities.The PsychoPy class FitWeibull then fits a psychometric function to the data.From this we can retrieve the parameters of the fit,request the value of the function at some given intensity values,or the inverse at some given responsevalue(s).3.2.Ease of useThe syntax of the Python language and the PsychoPy library is remarkably easy to understand,especially to anyone with experience in object-oriented languages.As an example,CodeJ.W.Peirce /Journal of Neuroscience Methods 162 (2007) 8–1311Snippet 2generates a window in which it draws a Gabor of 50%contrast whose grating drifts at a rate of 3Hz.As with any language the particular syntax takes time to learn but Python has numerous advantages over Matlab ®.Most notable is the fact that it was built from scratch as an object-oriented language.For the developer this makes it easier to use and reuse code.For the user,the code remains readable and it becomes extremely easy to identify what functions apply to what types of object.In Code Snippet 2a clock object is created,which has the method getTime()associated with it.Under the object-oriented programming model the user can create as many clock objects as they choose each of which can return its own (different)time.Another advantage to Python is the ability to name the arguments given to a function with unused arguments being given some default value.In the code below the Window object has numerous additional arguments not shown here (to control the color of the window,whether it appears full screen,etc.)but these were not needed in this instance.The argument naming feature means that we didn’t need to specify all the arguments in their correct order up to the argument that we did actually wish to use (in this case units =“deg”).There are many additional features to the language,like the ability to concatenate strings directly (“Hell”+“o”=“Hello”)or the wide range of available data types,but these are beyond the scope of the current paper.Many additional demo programs including screenshots are available on the project website ().3.3.Temporal accuracy and speedThe timing precision is one of the most critical issues for a neuroscience experiment.As you might expect from a platform-independent package,the timing precision of PsychoPy is at least partly dependent on the system clock on which it is running.On most computers this is accurate to the order of microseconds and should have sub-millisecond precision on any modern machine for the purpose of measuring user responses.For the purposes of synchronizing to a video display,Psy-choPy uses a double-buffered display method and the buffer swapping is synchronized to the vertical blank period of the screen,provided that the graphics card in question supports thatfunction (most do).This means that all drawing commands are sent to a hidden copy of the screen and then,when given the com-mand to update,the hidden copy swaps with the currently dis-played screen image.When synchronized to the vertical blank,no other commands will be executed until this screen flipping has occurred.Provided that all drawing to the hidden buffer can be completed within the time between vertical blanks (11.7ms at a refresh rate of 85Hz)this method provides an extremely robust timing mechanism.The question of whether or not all drawing commands are completed within the necessary time is depen-dent on the complexity of drawing,the speed of the computer,and its graphics card,but typically the drawing of several hun-dred moderately complex stimuli is possible.For random-dot stimuli,thousands of simple elements can be rendered within a frame (up to 3500could be drawn without dropping any frames on a test system with an AMD Athlon 3000+,512MB RAM,nVidia GeForceFX 5500).Around 80Gabor stimuli can be drawn with an updated position/phase/orientation within a sin-gle frame.Many more can be drawn if their position is constant.Critically,PsychoPy will optionally test for and report dropped frames throughout the experiment.For occasions where even more (or more complex)stimuli are necessary,C/C++extensions can be added to the package to increase the speed of the rendering.For precise synchronization with external hardware,the parallel port and serial port provide very fast methods for sending TTL pulses and characters or other data.3.4.Hardware extensionsPsychoPy has very simple methods to access the parallel and serial ports where available,making interfaces for hardware easy to build.It already provides support for Bits++(Cambridge Research Systems,Cambridge,UK),Spectrascan PR650(Photo Research,California,USA),fORP MRI response box (Current Designs Inc.,Philadelphia,USA)but should be able to interface with almost anything that uses serial or parallel ports or emu-lates a computer device such as mouse,keyboard or joystick.In fact,since Python is extensible in C,it should be capable of interfacing with any piece of hardware for which the user has a driver.12J.W.Peirce /Journal of Neuroscience Methods 162 (2007) 8–13Table 1A summary table of features for several frequently used softwarepackagesFor further details see main text.To provide the experimenter with greater range of stimulus contrasts than are available using standard graphics cards (with 8or 10bit digital–analogue-converters,DACs),PsychoPy inte-grates with the Bits++hardware.The Bits++unit sits between the digital video output of the video card and provides a 14-bit VGA signal out to the monitor.This system provides 14-bit DACS whose outputs are set via lookup-tables that be changed effortlessly every frame (or even within a frame).In its standard mode a lookup table inside the Bits++unit contains 256values (corresponding to the output values from the monitor)which correspond to any choice of 14-bit values to be passed to the monitor.1The system is independent of computer platform or of any particular software library and is relatively inexpensive way to produce stimuli with very precise contrast values.Other devices such as the SpectraScan PR650can be con-trolled by the serial port of the computer (or via a USB adaptor that mimics a serial port,where none are available).This is the means by which,for instance,the MonitorCenter instructs the PR650to make a measurement during automated calibra-tions and the means by which it retrieves the luminance and/or intensity spectrum after that measurement.The serial port is also one means by which PsychoPy scripts can receive input from the fORP MRI response box allowing the recording of triggers from magnetic resonance imaging (MRI)hardware and responses from MR-compatible button-boxes.The fORP system can simply emulate keyboard presses via the USB port if a serial port is unavailable.3.5.Mechanisms for supportSupport for the software is primarily maintained through the website at .The site is wiki-based,1Bits++has additional modes which can present more than 256concur-rent RGB values,but which sacrifice colour information (Mono++)or screen resolution (Colour++).allowing users themselves to directly edit the pages and con-tribute to or correct documentation.There is also a mailing list through which the users can get support from the original author and also provide support for peers.PsychoPy’s code itself is sim-ple,transparent and included with the software so that it too can be modified and improved by the users themselves.4.DiscussionThe ideal software package for visual neuroscience should be based on free libraries,open-source (so that the scientist can determine exactly what is happening behind the scenes),simple to use,capable of generating stimuli on-the-fly (rather than from pre-computed movies),and be platform independent (at least for Windows ®,Macintosh,and Linux environments).The package should also be readily extensible,to handle new technologies and hardware as they are available.Although a number of stimulus presentation packages are already available to neuroscientists (for example,see the list compiled by Strasburger,2005),none fulfilled all of the above criteria at the time of writing.Table 1shows a comparison of the features of three such packages in current use and development.Presentation ®(Neurobehavioural Systems Inc, )is a commercial package that is avail-able strictly on Windows ®,is not free and comes without source code.It is also not designed to construct stimuli itself but to render movies and images that have been pre-made in some other package.Of the free software,Psychtoolbox (Brainard,1997;Pelli,1997a,b )is the most mature,being used by a very large number of labs worldwide.While Psychtoolbox has been an invaluable tool to many vision scientists (and cognitive neuroscientists)it is built on top of Matlab ®,which is expensive and comes without source code.One package with a similar ethos and underlying mechan-ics to PsychoPy is The Vision Egg ( )by Andrew Straw.This library,designed originally to study theJ.W.Peirce/Journal of Neuroscience Methods 162 (2007) 8–1313visual system of thefly is a very powerful package built on top of Python and OpenGL.For a good programmer,Vision Egg achieves its goals very well,providing a powerful and highly optimized system for visual stimulus presentation and interac-tions with hardware(including the ability to run experiments remotely across a network).Straw does,however,adhere very strongly to an object-oriented model of programming which can be harder for relatively inexperienced programmers,like most scientists,to understand.For instance,the temporal control of experiments in Vision Egg is predominantly though the use of presentation loops,whereby the user sets an object to run for a given length of time,attaches stimuli to it,attaches it to a screen and then tells it to‘go’.In contrast PsychoPy uses object-oriented programming only where objects make intuitive sense outside the realms of a programming language.For instance,the notion that stimuli or windows are types of object is quite intu-itive.For controlling the way in which stimuli appear during a trial,on the other hand,PsychoPy allows the user to create a sim-ple sequence of events(e.g.drawfixation point,wait for200ms, draw stimulus,wait for key press,etc.),which is hopefully more intuitive than a presentation object to which events are attached.PsychoPy aims to provide scientists with an easy and intuitive way to generate experimental control programs,combining the power and freedom of Python/OpenGL with the ease of use found in PsychToolbox.It already contains a wide variety of tools allowing everything from the generation of stimuli and presentation protocols to the logging and analysis of data.With a growing community and continued active development it will only get better.AcknowledgementsMany thanks to Ben Webb for help with destructive testing and to the Python community for writing the various libraries and code on which PsychoPy is built.The development of PsychoPy has partly been funded by a BBSRC project grant (BB/C50289X/1)held by JWP.Windows®and DirectX®are registered trademarks of Microsoft Corporation.Matlab®is a registered trademark of The MathWorks,Inc.Presentation®is a registered trademark of Neurobehavioural Systems,Inc.ReferencesBach M.A note on luminance calibration of raster-scan cathode-ray tubes: temporal resolution,ripple,and accuracy.Spat Vis1997;10:485–9.Bach M,Meigen T,Strasburger H.Raster-scan cathode-ray tubes for vision research—limits of resolution in space,time and intensity,and some solu-tions.Spat Vis1997;10:403–14.Brainard DH.The psychophysics toolbox.Spat Vis1997;10:433–6.Pelli DG.Pixel independence:measuring spatial interactions on a crt display.Spat Vis1997a;10:443–6.Pelli DG.The videotoolbox software for visual psychophysics:transforming numbers into movies.Spat Vis1997b;10:437–42.Strasburger,H.Software for visual psychophysics,2005,http://www.hans.strasburger.de/psy soft.html.Wolf W,Deubel H.P31phosphor persistence at photopic mean luminance level.Spat Vis1997;10:323–33.。

psychopy指导语

psychopy指导语

psychopy指导语Psychopy:构建心理实验的强大工具[Psychopy指导语]是一种开源的心理学实验软件,它为心理学研究者提供了快速且灵活的心理实验设计和数据收集工具。

本文将以"Psychopy"为主题,为大家介绍Psychopy的基本概念、功能和使用方法。

第一部分:Psychopy的基本概念Psychopy是一个基于Python编写的软件,可以在多个操作系统上运行,拥有简单易用的界面和丰富的功能。

下面是Psychopy的基本概念:1. 实验设计:Psychopy允许研究者灵活地设计和编辑心理实验的各个组成部分,包括刺激呈现、反应收集和数据记录等。

2. 刺激呈现:Psychopy提供了丰富的刺激呈现方式,包括文字、图像、音频和视频等。

研究者可以根据实验需求灵活选择和组合不同的刺激方式。

3. 反应收集:Psychopy支持多种反应收集方式,包括键盘输入、鼠标点击和眼动追踪等。

研究者可以根据实验需要设置不同的反应收集方法。

4. 数据分析:Psychopy提供了丰富的数据分析功能,包括数据清洗、统计分析和可视化等。

研究者可以通过Psychopy对实验数据进行深入的分析和解读。

第二部分:Psychopy的功能和使用方法Psychopy具有多项强大的功能,下面将逐一介绍和解释。

1. 实验设计功能:Psychopy提供了直观且易于使用的界面,研究者可以通过拖拽和编辑来设计和设置实验的各个参数。

同时,Psychopy还支持自定义编程,使得研究者可以更加灵活地控制实验细节。

2. 刺激呈现功能:Psychopy提供了多种刺激呈现方式,包括文字、图像、音频和视频等。

研究者可以根据实验需求选择合适的刺激类型,并设置刺激的持续时间、呈现顺序和随机化等。

3. 反应收集功能:Psychopy支持多种反应收集方式,包括键盘输入、鼠标点击和眼动追踪等。

研究者可以根据实验需要设置不同的反应收集方法,并对数据进行实时记录和保存。

心理学实验的操作步骤

心理学实验的操作步骤

心理学实验的操作步骤心理学实验是一种科学的研究方法,可以帮助研究者了解人类心理过程和行为模式。

合理的操作步骤是进行心理学实验的关键,它们确保实验的可靠性和有效性。

本文将介绍心理学实验的操作步骤,以帮助读者更好地理解和设计心理学实验。

第一步:确定研究问题心理学实验的第一步是确定研究问题。

研究问题应该明确、具体,可以是关于人类心理过程的一般性问题,也可以是关于特定行为、认知、情绪等方面的具体问题。

研究问题的确定需要考虑实验可行性、研究的重要性以及对实验结果的期望。

第二步:制定假设制定假设是心理学实验的关键一步。

假设是对研究问题的猜测或推测,需要明确概括研究目的和预测研究结果。

假设可以是有方向性的(即预测研究结果的方向),也可以是无方向性的(即不预测研究结果的方向)。

制定假设需要结合对现有研究的综述和理论研究。

第三步:确定实验设计实验设计是心理学实验的核心。

实验设计决定了研究的可控性和内外部效度。

常见的实验设计包括随机对照组设计、重复测量设计、因果关系设计等。

在确定实验设计时,需要考虑被试的选择、实验材料和测量工具的使用、实验条件的控制等因素。

实验设计应该能够最大限度地排除干扰因素,使得结果的解释更为准确。

第四步:确定变量在实验设计中,需要明确研究中涉及的变量。

变量可以分为自变量和因变量。

自变量是研究者操作或操纵的变量,而因变量是研究者观察或测量的变量。

在确定变量时,需要考虑变量的操作性、可测性和重要性。

第五步:制定实验流程制定实验流程是心理学实验的重要一步。

实验流程包括实验的具体步骤和顺序,以及实施实验所需要的材料和设备。

制定实验流程时,需要考虑实验的安排、实验的时间长度、实验中各个阶段的顺序等因素。

实验流程的制定应尽可能简洁明了,确保实验的进行顺利。

第六步:招募被试和实施实验招募被试和实施实验是心理学实验的关键环节。

被试的选择需要符合实验的目的和要求,同时需要确保样本的多样性和代表性。

在实施实验时,需要按照实验流程进行操作,严格控制实验条件,记录实验数据。

心理学软件EPRIME教程详解

心理学软件EPRIME教程详解
❖ 编译:把在E-Studio中设计调试好的实验 ,进行编译,生成同名的脚 本文件 。
❖ 脚本文件:脚本文件中的英文材料替换成中文后,把脚本文件拷入到需 要实验的计算机上(该机器必须装有E-Prime环境(E-Run)),或 单机或共享使用,即可运行实验。
❖ 共享的问题:选一台或多台计算机为主机,新建文件夹copy上你的脚 本文件,按右键共享该文件夹。其余计算机(不再需要copy脚本文件) 在网上邻居查找到主机,打开脚本文件运行即可,做完实验后各台计算 机上的数据会自动传送到主机上(注意各台计算机上的被试编号不要重 复,否则会导致文件覆盖)。
E-Prime
E-Prime实验设计: ▪ 用E-Prime进行实验设计
实验示例:词汇判断实验
判断屏幕出现的一串字符是否为单词(Word),若为单词(Word)请 按“J”键,若不是单词(NonWord),请按“j”键.
条件
刺激
答案
word
cat
j
nonword
Jop
f
word
Job
j
第一步:画出实验流程图
指导语

Stim (DR/KB&SD/RT&CR)
feedb 结语
在中文环境下如何用E-Prime进行实验设计
方法如下:
❖ 在设计阶段,不能出现任何中文(图片除外)。
中文实验材料先用英文字母或单词代替,调试无误后,进行编 译,生成脚本文件,在脚本文件中把英文材料替换成中文材料即 可实验。 在脚本文件中可以出现汉字。 制作:把excel中的中文材料直接粘贴取代脚本中得英文材料。
串连模式 (图3) (循环模式)
分支模式 (图4) (平衡模式)
相嵌模式 (图5)

心理学实验软件PsychoPy方法

心理学实验软件PsychoPy方法

心理学实验软件-P s y c h o P y 作者:花一个下午加晚上重新鼓捣了下PsychoPy这款心理学实验软件,之前刚接触Python的时候也试着学过,只是当时还年轻,看了半天没弄懂就弃之不用了。

如今要毕设了,总不能一个简单的行为实验都要一行一行代码往上砌,于是就想找一个像VB那样可以拖拖拽拽的傻瓜软件来用用,“业界”流传的心理学实验软件大概也就Presentation、E-Prime,当然牛逼点用C/C++/C++++、Matlab、Java甚至汇编、二进制码来写也可以,不过为了写个小实验程序还要去学一门语言隐隐会让人有点DT的感觉。

用PsychoPy当然不只是因为“Life is short, use Python”,既然是用Python写的软件,open-source、跨平台就足够吸引人,从看版本到,似乎维护得不错,挺值得推广。

言归正传,大概啃了一下Documentation,稍加总结,想用的人就没必要再去啃一遍了。

1.安装windows下面应该是.exe一路回车;mac也是.dmg直接拖进应用文件夹;甚至linux(大便系)都可以 apt-get install psychopy.2. Builder模式PsychoPy编写实验程序有Builder View跟Coder View两种,Builder就是“拖拖拽拽”,手痒了想写代码可以用Coder模式,当然有更高级的API可以为这个开源项目做出自己的贡献,这个另议。

最简单的Builder模式界面如下:界面下方是实验的流程图;界面主要部分由三个标签页组成,标签页代表实验的几个阶段(如指导语、trials、感谢语等)分别与流程图对应;右侧为程序的components,如图片、文字、对应的按键、影片、声音以及鼠标等。

上图是软件中自带的stroop效应的demo,也就是一个完整的实验,只要点击工具栏上绿色的小人儿就可以运行实验,可以说比照这个demo,然后用鼠标点点试试,很快就可以完成一个一般模式的行为实验程序了。

psytech等 实验心理学最全最详细实验 流程【写实验报告不用发愁】

psytech等 实验心理学最全最详细实验 流程【写实验报告不用发愁】

第一部分反应时反应时(Reaction Time,简称 RT)是指从机体接受刺激到作出反应所经历的时间,即刺激-反应的时间间隔,又叫潜伏期。

从神经生理学角度讲,一个完整的刺激-反应过程通常由如下五部分组成:(1)感受器将物理或化学刺激转化为神经冲动的时间;(2)神经冲动由感受器上行到大脑皮质的时间;(3)大脑皮质对信息进行加工的时间;(4)神经冲动由大脑皮质下行至效应器的时间;(5)效应器作出反应时间。

反应时测量技术是心理学实验研究中普遍应用的一种方法。

作为一个重要的心理指标在认知加工过程和个体差异研究中得到了广泛的应用。

反应时实验中要求被试的反应要符合“速度-准确性权衡”的原则,即要求被试在保证正确的前提下,反应越快越好。

因此,被试在实验前必须清楚刺激的呈现形式和反应原则,以保证实验结果的准确性和可靠性,更真实地反映出被试内在的心理加工过程。

荷兰心理学家唐德斯( F.C.Donders 1818--1889 )将反应时分为三类,即A、B、C三种反应。

三种反应时关系如下:简单反应时 A 基线时间选择反应时 B 基线时间辨别时间选择时间辨别反应时 C 基线时间辨别时间Donders根据减数法则分析A、B、C三种反应,C减A得到辨别时间,B减C得到选择时间。

从而得出B类反应时间最长,C类次之,A 类最短。

唐德斯的减数法在实验心理学中占有很高的地位。

他的三成分说广泛应用于许多领域。

今天,认知心理学正是用减法反应时实验提供的数据来推论其现象背后的信息加工过程。

视觉简单反应时简单反应时(Simple Reaction Time)又称A 反应时。

是指呈现单一刺激,要求被试立即做出固定反应的时间。

由于这种反应时间是感知到刺激就立即做出反应,中间没有其它的认知加工过程,因此也称为基线时间(Baseline Time)。

任何复杂刺激的反应时间都是由简单反应时和其它认知加工过程所需时间合成的。

本实验通过计算机呈现的视觉材料,测定视觉简单反应时。

psychopy 编写的心理学重量阈值测试实验的代码示例

psychopy 编写的心理学重量阈值测试实验的代码示例

psychopy 编写的心理学重量阈值测试实验的代码示例以下是使用 Psychopy 编写的心理学重量阈值测试实验的代码示例:```pythonfrom psychopy import visual, core, eventimport random创建窗口win = (size=[800, 600], color=[1, 1, 1])创建文本提示prompt = (win, text="请按下任意键开始实验")()()等待用户按下任意键()随机生成重量阈值threshold = (, )创建砝码weights = [, , , , , , , , , 1]循环进行实验for weight in weights:创建砝码刺激stim = (win, text=f"{weight:.2f}")()()等待用户按下按键keys = ()if 'left' in keys: 如果按下左键,则认为重量较轻weight -= threshold 2elif 'right' in keys: 如果按下右键,则认为重量较重 weight += threshold 2else: 如果按下空格键,则认为重量正好weight = threshold 2更新砝码刺激的文本(f"{weight:.2f}")()()等待一段时间,模拟实验操作的时间延迟(1)结束实验,显示结果文本result = (win, text="实验结束,感谢您的参与!") ()()()```。

psychopy听觉感知实验

psychopy听觉感知实验

psychopypsychopy听觉感知实验一、psychopy听觉的物理刺激和音感(一)声波及其特征psychopypsychopy听觉(audition)是个体对声波物理特征的反映。

频率为16赫~20000赫的机械波为声波。

psychopy听觉的适宜刺激是声波。

纯音和复合音区分的根据是声波的线性特征,即是否可以进行波形的分解;而复合音中的乐音和噪音区分的根据是声波是否有周期性即规律性振动,当然,人的主观舒适感也是一个十分重要的指标。

psychopy 听觉刺激声波和视觉刺激电磁波均有三个主要特征,即频率、振幅和形。

与此相应,psychopy听觉有音高、响度和音色的区别。

(二)频率和音高音高(或音调)(pitch)是人对声波频率的主观属性,它首先和声波频率有关。

频率(frequence)是物理量,指每秒振动的次数,单位为赫(或赫兹)(Hz)。

声波的振动频率高,我们听到的声音就高;相反,振动频率低,听起来就低,但它们之间并非线性关系。

当声波振动数大约在16~20000赫时,是人所能感受到的音域。

心理上的主观音高主要与声音刺激的频率大小有关,但并不是完全由刺激频率决定的,它也取决于声音刺激的强度。

实验研究表明,对于同一声音刺激的音高感知,不同的人之间有着巨大的个体差异,这充分表现了音高这个心理量的主观性在心理学中,我们根据实验研究,规定音高的单位为(me1),确定1000的音高为1000赫(声压级为40分贝)的声音刺激的主观感觉。

(三)振幅和响度响度(或音强)(loudness)是声波振幅的一种主观属性,它是由声波的振幅所引起,振幅越大则响度越大。

声波造成的压力变化用分贝(decibel,简称dB)量来测量。

分贝量表是一种对数量表,它将人所能感受的巨大范围的振幅变化值压缩在较小的范围内。

响度是振幅的一种主观属性,它主要与声波的振幅有关,但同样亦受频率的影响。

测量声音响度的国际标准单位是(sone),一个为40分贝时所听到的1000赫的音调的响度。

实验心理学知识点

实验心理学知识点

实验心理学知识点实验心理学是研究人类行为和思维的一门学科,通过实验方法来验证和解释心理现象。

本文将介绍一些实验心理学的重要知识点,包括实验的设计、工具和技术等。

一、实验设计实验设计是实验心理学的基础,它决定了实验的有效性和可靠性。

以下是一些常用的实验设计方法:1. 双盲实验:研究人员和实验参与者都不知道他们处于哪个实验组,以减少主观因素的干扰。

2. 随机分组设计:将实验参与者随机分成实验组和对照组,以保证两组的比较具有代表性和可靠性。

3. 因素设计:研究多个因素对实验结果的影响,并分析不同因素之间的相互作用关系。

二、数据收集和分析数据收集是实验心理学中不可或缺的步骤,下面介绍几种常用的数据收集和分析方法:1. 自陈式问卷:参与者根据自己的主观感受回答问题,适用于调查研究和个体差异研究。

2. 实验测量:通过测量行为和生理指标,获取客观的数据,如实验参与者的反应时间、心率等。

3. 统计分析:使用统计学方法对实验数据进行分析,常用的方法包括t检验、方差分析和回归分析等。

三、实验工具和技术实验心理学借助于各种工具和技术来收集和分析数据,下面介绍几种常见的实验工具和技术:1. EEG(脑电图):通过放置电极在头皮上记录脑电活动,以研究认知和情绪的神经基础。

2. fMRI(功能性磁共振成像):通过测量血氧水平的变化来揭示不同区域在不同任务下的功能活动。

3. 视觉刺激材料:如图片、视频和文字等,用于实验参与者的视觉刺激和任务。

4. 实验软件:如E-Prime和PsychoPy等,用于设计和实施实验,并收集和分析数据。

四、实验伦理在进行实验心理学研究时,研究人员需要遵守伦理原则,保护实验参与者的权益。

以下是一些常见的实验伦理原则:1. 许可和知情同意:在进行实验之前,研究人员需要向实验参与者解释实验的目的、过程和可能的风险,并获得他们的同意。

2. 保密性:研究人员需要保护实验参与者的个人信息,并确保实验数据的匿名性。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

心理学实验软件—PsychoPy
作者:孙雨生
花一个下午加晚上重新鼓捣了下PsychoPy这款心理学实验软件,之前刚接触Python的时候也试着学过,只是当时还年轻,看了半天没弄懂就弃之不用了。

如今要毕设了,总不能一个简单的行为实验都要一行一行代码往上砌,于是就想找一个像VB那样可以拖拖拽拽的傻瓜软件来用用,“业界”流传的心理学实验软件大概也就Presentation、E-Prime,当然牛逼点用C/C++/C++++、Matlab、Java甚至汇编、二进制码来写也可以,不过为了写个小实验程序还要去学一门语言隐隐会让人有点DT的感觉。

用PsychoPy当然不只是因为“Life is short,use Python”,既然是用Python写的软件,open-source、跨平台就足够吸引人,从官网看版本到v1.7,似乎维护得不错,挺值得推广.
言归正传,大概啃了一下Documentation,稍加总结,想用的人就没必要再去啃一遍了。

1。

安装
windows下面应该是。

exe一路回车;
mac也是。

dmg直接拖进应用文件夹;
甚至linux(大便系)都可以apt-get install psychopy.
2. Builder模式
PsychoPy编写实验程序有Builder View跟Coder View两种,Builder就是“拖拖拽拽”,手痒了想写代码可以用Coder模式,当然有更高级的API可以为这个开源项目做出自己的贡献,这个另议。

最简单的Builder模式界面如下:
界面下方是实验的流程图;界面主要部分由三个标签页组成,标签页代表实验的几个阶段(如指导语、trials、感谢语等)分别与流程图对应;右侧为程序的components,如图片、文字、对应的按键、影片、声音以及鼠标等。

上图是软件中自带的stroop效应的demo,也就是一个完整的实验,只要点击工具栏上绿色的小人儿就可以运行实验,可以说比照这个demo,然后用鼠标点点试试,很快就可以完成一个一般模式的行为实验程序了。

这个简单的stroop效应实验的主体在于一个循环体trails上:
通过设定trails循环中的conditionFile来绑定实验条件,这里的conditionFile可以是.xlsx(Excel2007)文件也可以是纯文本的.csv文件,至于如何设定,看一下demo里面的例子就很清楚了。

3. 实验环境设定
为了让PsychoPy看起来更简单所以把这一步放到最后。

PsychoPy会检测显示器设备然后自动完成下面的Monitor Center,一般也不需要更改;
在每一个单独的实验中也需要一些环境变量的设定,如输出数据文件的格式、记录被试信息的Experiment info等:
4. Coder View
有兴趣的话也可以玩一下PsychoPy的coder模式,也就是Python。

当然这已经是coding的事情了,欢迎翻墙至Blogger继续关注。

相关文档
最新文档