NIRS hyperscanning data analysis (1)

1 min read

NIRS hyperscanning data analysis (1)
NIRS hyperscanning data analysis (2)
NIRS hyperscanning data analysis (3)
NIRS hyperscanning data analysis (4)

In this series I will introduce how we analyzed NIRS hyperscanning data. NIRS hyperscanning is a technology where you can measure two (or more) people’s brains at the same time. This is useful in studying the brain basis of social behavior.

We will cover:

  1. Experiment design
  2. Data collection
  3. Data quality check
  4. Wavelet coherence analysis
  5. Group level statistics

Experiment design

•11 pairs of participants (total 22)
•Each pair run 4 experiments: cooperation, competition, single 1, and single 2
–Cooperation (our main task): In each trial, a gray circle appears on the screen. After 0.6-1.5s, the gray circle is filled with green (‘go’ signal). The participants were instructed to press their corresponding keys after the ‘go’ signal. If the difference between of two timing of pressing is smaller than a threshold, then they both gain a point; otherwise they both lose a point. They were instructed to maximize the points.
–Competition: Similar to the cooperation experiment, except that the participant who press the key earlier will win a point (and the other will lose a point).
–Single 1: participant 1 press button while participant 2 observes.
–Single 2: participant 2 press button while participant 1 observes.
•In each experiment, participants performed the task in two blocks, separated by a 30s rest period.
Cooperation game in a NIRS hyperscanning experiment
Cooperation game in a NIRS hyperscanning experiment

I myself played this game for quite some times and it’s not a very easy game. The two players have to press the buttons at the same time to win.

You can find the source MatLab code for the experiment below. These scripts are adopted from a previous experiment when I was in Baylor College of Medicine. You will see that the scripts are in no way well commented and it’s probably difficult to read. But in any case it might be helpful. Also note that the scripts require PsychToolbox.

Please fill the form and download the scripts:











写作助手,把中式英语变成专业英文


AI writing papers with real references


Want to receive new post notification? 有新文章通知我

第七十七期fNIRS Journal Club通知2026/12/12, 10am 郝宁课题组

生成式人工智能正逐步参与团体创造活动,但团体与AI协作能否提升创造表现、AI观点越发散是否越有利于创新,以及这些作用的认知神经机制,仍有待深入探讨。华东师范大学郝宁课题组的周志豪将介绍他们结合行为实验
Wanling Zhu
10 sec read

第七十六期fNIRS Journal Club视频 周思远博士

Youtube: https://youtu.be/-P7cgrsUzhM 优酷:https://v.youku.com/v_show/id_XNjU5MDg4MTA2NA==.html 文化经验会影
Wanling Zhu
14 sec read

第七十六期fNIRS Journal Club通知2026/11/14, 10am 周思远博士

文化经验会影响个体如何理解和解释世界,但短暂跨文化交流能否改变思维?这种变化又体现在哪些认知加工层面?来自四川师范大学的周思远博士将分享一项结合fNIRS超扫描、眼动追踪与自然语言处理的研究,其通过比
Wanling Zhu
10 sec read

Leave a Reply

Your email address will not be published. Required fields are marked *