Archive for the ‘nirs’ Category

How to track new NIRS publications and grants?

October 27th, 2017

Near infrared spectroscopy (NIRS) is an increasingly popular technology in brain imaging research. Compared to fMRI, NIRS can be used for more naturalistic experiments, including face to face communication, natural body movements, sports, infants, and is well suited for real-time applications.

If we count the number of NIRS publications using keyword (NIRS OR fNIRS) AND brain, we find the number increases steadily over the past 10 years:

With this trend, it’s expected that we will reach a speed of 1 new paper every day in the year of 2018 or 2019. This is a fast field, and it’s nearly impossible for us to search (NIRS OR fNIRS) AND brain every day or even every week. For a student who does not follow literature proactively, he might know of a paper a year after its publication.

The easiest way to solve this problem is to use an app to notify us of the new publications. The one I use is called Stork . All I need to do is to enter a few keywords I am interested in, e.g.:


But what if I want to follow more specific fields, such as hyperscanning, or comparison with fMRI etc? We can enter the following keywords:
(NIRS OR fNIRS) AND brain AND hyperscanning
(NIRS OR fNIRS) AND brain AND "deep learning"
(NIRS OR fNIRS) AND brain AND social

What if I want to follow some scientists in the field? We may enter their names, such as:
David Boas
Allan Reiss (NIRS or fNIRS)

After we setup the keywords, Stork, like a diligent assistant, will search for us every day. If she finds something, she will send an email to us, listing the new publications. A recent example is shown below:

fmri nirs

The Temporal Muscle of the Head Can Cause Artifacts in Optical Imaging Studies with Functional Near-Infrared Spectroscopy. by Martin Schecklmann, Alexander Mann, …, Florian B Haeussinger (2017) Front Hum Neurosci (impact factor: 3.6) Free full text

nirs brain

Enhancing Performance of a Hybrid EEG-fNIRS System Using Channel Selection and Early Temporal Features. by Rihui Li, Thomas Potter, Weitian Huang, Yingchun Zhang (2017) Front Hum Neurosci (impact factor: 3.6)Free full text

Not only does Stork search scientific publications for you, she also searches NIH grant database (this is an advanced feature). That means whenever some researchers receive a grant on NIRS, you will know it. You will know what is his research direction in the next few years, how much money he received etc. This feature is mostly useful for professors and senior graduate students and postdocs.

The link of Stork is: and it’s very easy to use.



Author: Xu Cui Categories: nirs, stork Tags:

3 ways to check NIRS data quality

August 31st, 2017

Before performing any data analysis, we should check the data quality first. Below are 3 ways to do so.

1. Visual check of the time series

The best pattern detector is our eyes and brains! In many cases, if we visually see the data, we know what is wrong. You may use the method and program in this post to plot the time courses of all channels (not just one).

Visual data quality check of NIRS time courses

Visual data quality check of NIRS time courses

In the plot above, all 48 channels are plotted together (the y-axis). We can clearly see two types of noise:

  1. The spikes which occur in most channels after time point 7000. These spikes are caused by head motion.
  2. The high noise level in the “red” channels (channels 39, 34, 31). This is more evident if we plot the variance of each channel (figure below). As we can easily see, the variance of channels 39, 34 and 31 is much higher than other channels.

    Variance vs Channel

    Variance vs Channel

2. Existence of the “heart-beat” band

If the NIRS signal was acquired well, then the heart beating signal should be captured, leaving a bright brand in the frequency ~1Hz in the wavelet transform plot, just like the left plot in the figure below (the band close to period 8). If there is no such band, it does not necessarily mean the signal is trash, but you need to be cautious. To use the wavelet transform toolbox, please download here:

NIRS wavelet

NIRS wavelet


3. Correlation between hbo and hbr

The third way is to check the correlation between hbo and hbr. They are supposed to have negative correlation, at least in young healthy subjects. If not, or if they have perfect negative correlation (-1), then they might contain too much noise. We have a separate article on this method. Please check out

Correlation between oxy and deoxy-Hb

Correlation between oxy and deoxy-Hb

Below is the scripts used for the 3 methods.




for ii=1:52; wt(hbo(:,ii)); pause; end

[badchannels] = checkDataQuality(hbo,hbr);

Do you have other ways to check data quality? Please let me know!

Author: Xu Cui Categories: brain, nirs Tags:

[培训信息] 第一届近红外脑功能数据处理培训班 NIRS training course in China

August 23rd, 2017

重庆思影科技有限公司将于2017年10月16日– 2017年10月18日(周一至周三)举办第一届近红外脑功能数据处理培训班(详见课表安排)。欢迎大家前来咨询。



功能性近红外光谱技术(functionalnear-infrared spectroscopy, fNIRS)技术是一项利用近红外光穿过皮层组织时的衰减程度定量化地测量大脑局部氧合血红蛋白和脱氧血红蛋白浓度变化的技术。该技术相对fMRI和PET等技术具有更高的时间分辨率(最高可达数十Hz)、便捷性高等优点;相对EEG/ERP技术具有相对更高的空间分辨率。该技术自问世以来,在基础研究、工程与临床实践中有广泛的应用,而且其普及性仍在增长。使用该技术的专业领域涉及心理学、医学、神经科学、脑机接口、运动科学和教育学等。




培训内容主要包括:fNIRS基本原理及实验设计,SPM 操作及批处理流程,多人脑间功能连接数据分析原理,Homer软件数据处理基础,Homer软件数据处理进阶。

注:如方便,请于会议开始前一天到达会场(9:00 - 20:00)熟悉场地及安装软件、拷贝资料等事宜。















SPM 操作及批处理流程


-数据转换(data conversion)













































请各位培训学员自带笔记本电脑(windows 64位系统、i3、4G内存等基本配置);学员自己有数据的可以带3-5例进行现场处理;并在10月1日前进行缴费及将回执表发给彭小姐,便于培训安排。










□转帐  □支付宝 (请选择在□打√)











胡志善,澳门大学博士研究生。在心理科学进展及JECP各发文一篇。专注于使用fNIRS进行认知神经方面的研究,有近5年fNIRS的实验设计、执行及数据分析经验。能够熟练运用Python进行fNIRS的实验编程,使用NIRSport 及 CW6 等设备进行认知方面的研究,已完成决策、说谎、执行功能、数字计算、语言、运动等认知功能等多项实验;能够熟练运用NIRS SPM 及 Homer2 进行数据分析,并能够熟练运用MATLAB进行数据的批处理,代码风格良好。



Author: Xu Cui Categories: nirs Tags:

A few recent NIH grants awarded related to NIRS (2017-07-05)

July 5th, 2017
The following email was sent from Stork to me. Stork is an easy-to-use app to alert me of new scientific publications and NIH grants based on my own keywords. Below are a few grants awarded in the NIRS field.
David Boas
Awarded Grants
widespread use of high resolution imaging of oxygen in the brain
David A Boas (2017) NIH Grants Awarded (Amount: $288,619) Duration: 2017-07-01 to

fmri nirs

Awarded Grants
of Interpersonal Social Communication: Dual-Brain fNIRS Investigation

by Joy Hirsch (2017) NIH Grants Awarded (Amount: $416,250) Duration: 2017-06-01 to

Neuroimaging of Cigarette Smoking
by Yunjie Tong (2017) NIH Grants
Awarded (Amount:
Duration: 2017-06-19 to 2017-11-30

nirs brain

Awarded Grants
Mechanisms for Social Interactions and Eye Contact in ASD
by Joy
Hirsch (2017) NIH Grants Awarded (Amount: $640,560) Duration: 2017-07-01 to 2018-06-30

Surfer Development, Maintenance, and Hardening
by Bruce Fischl (2017)
NIH Grants Awarded (Amount: $523,203) Duration: 2017-07-01 to 2018-06-30

hemodynamics spectroscopy for cerebral autoregulation and blood flow
Sergio Fantini (2017) NIH Grants Awarded (Amount: $517,756) Duration: 2017-05-01 to

in Drug Abuse and Brain Imaging
by Scott E Lukas (2017) NIH
Grants Awarded (Amount:
Duration: 2017-07-01 to 2018-06-30

Author: Xu Cui Categories: brain, nirs Tags:

Hyperscanning experiment file (matlab)

June 8th, 2017

Below is the experiment script (in MatLab) for our hyperscanning project (”NIRS-based hyperscanning reveals increased interpersonal coherence in superior frontal cortex during cooperation.”). For detailed information please refer to

Psychtoolbox-3 is required.


Author: Xu Cui Categories: brain, matlab, nirs, programming, psychToolbox Tags:

Does Facebook’s “mind reading” project use NIRS?

May 12th, 2017

Facebook just announced that they are experimenting with mind-reading technology using optical neuro-imaging systems. This technology will allow people to type words by thoughts at 100 words per minute. Check out the news here.

Wow! This is unbelievable! The “optical neuro-imaging” technology is probably NIRS (Near Infrared Spectroscopy). As a NIRS researcher myself, I have done some mind-reading experiments and found NIRS signal (blood flow) is too slow for rapid mind-reading. With machine learning technology such as SVM, we can decode a signal at most ~2s after a behavior event (see our paper). This is still too far from a real life application.

But some researchers have suggested that there might be some subtle “fast signal” embedded in NIRS signal. In a 2004 (!) paper, Morren et al published a paper tilted “Detection of fast neuronal signals in the motor cortex from functional near infrared spectroscopy measurements using independent component analysis“. In this paper, they claimed that fast signal, in the range of milliseconds rather than seconds, can be detected.

Maybe this is what Facebook is using?

Author: Xu Cui Categories: brain, nirs Tags:

A few recent NIH grants awarded related to NIRS

April 25th, 2017

The following email was sent from Stork to me. Stork is an easy-to-use app to alert me of new scientific publications and NIH grants based on my own keywords. Below are a few grants awarded in the NIRS field.

Dear Xu,

Stork has brought you 15 new publications.

David Boas

Awarded Grants
Multifunctional, GBM-activatable nanocarriers for image-guided photochemotherapy by Huang-chiao Huang (2017) NIH Grants Awarded (Amount: $179,035) Duration: 2017-04-01 to 2018-03-31

fmri nirs

Awarded Grants
Quantifying the Fluctuations of Intrinsic Brain Activity in Healthy and Patient Populations by Manish Saggar (2017) NIH Grants Awarded (Amount: $249,000) Duration: 2017-03-20 to 2018-02-28

fmri resting state parent child

Awarded Grants
NEUROIMAGING IN EARLY ONSET DEPRESSION: LONGITUDINAL ASSESSMENT OF BRAIN CHANGES by Deanna M Barch (2017) NIH Grants Awarded (Amount: $768,901) Duration: 2017-04-01 to 2018-03-31


Awarded Grants
Brain-to-brain dynamical Coupling: A New framework for the communication of social knowledge by Uri Hasson (2017) NIH Grants Awarded (Amount: $524,425) Duration: 2017-04-01 to 2018-03-31

nirs brain

Awarded Grants
The Neurodevelopmental MRI Database by John E Richards (2017) NIH Grants Awarded (Amount: $61,625) Duration: 2017-04-01 to 2018-03-31

nirs breast

Awarded Grants
Longitudinal Assessment of Tumor Hypoxia in vivo Using Near-Infrared Spectroscopy by Bing Yu (2017) NIH Grants Awarded (Amount: $399,062) Duration: 2017-01-01 to 2019-01-31

Russell Poldrack, stanford

Awarded Grants
Elucidate the Mechanisms Underlying Inhibition Induced Devaluation by Patrick Graham Bissett (2017) NIH Grants Awarded (Amount: $59,466) Duration: 2017-04-01 to 2018-03-31

Author: Xu Cui Categories: nirs Tags:

Updated loadHitachiText.m

March 16th, 2017

Some labs have been using our script readHitachiData.m to load NIRS data from Hitachi ETG machines. We recently found that some output MES data contains abnormal timestamp. For example, the timestamp should be like


But for some rows (although rarely), the time is like (note the ending character)


This will cause our script to choke. We just fixed this issue, and you need to replace loadHitachiText.m. The new version can be found here.

Author: Xu Cui Categories: brain, nirs Tags:

Chin rest (head holder) device for NIRS

January 30th, 2017

When we set up our NIRS lab back in 2008, we needed a device to prevent participants’ head movement during the experiment and during the digitizer measurement. Even though NIRS is tolerant to head motion, we still want to minimize it. During the digitizer measurement phase, the probe will poke the participants’ heads, resulting inaccurate probe position. We definitely need something to minimize it.

In addition, we feared that metal might interfere the magnetic positioning system (digitizer), so we wanted the device to be all-plastic.

We contacted Ben Krasnow , who has been very helpful in creating MRI compatible devices (e.g. keyboard) for Lucas Center @ Stanford in the past. He suggested us use University of Houston’s “headspot”.


Ben then replaced the metal part with plastics.

we have been using it for almost 10 years! It works great, as expected. The height is also adjustable. I recently checked the price and it is $500, which is slightly higher than in 2008 ($415), but not much different. Ben charged $325 to replace the metal. The total (with tax) was $774.

headspot webpage

headspot webpage

Author: Xu Cui Categories: brain, nirs Tags:

We contributed to MatLab (wavelet toolbox)

January 25th, 2017

We use MatLab a lot! It’s the major program for brain imaging data analysis in our lab. However, I never thought we could actually contribute to MatLab’s development.

In MatLab 2016, there is a toolbox called Wavelet Toolbox. If you read the document on wavelet coherence (link below), you will find that they used our NIRS data as an example:

Back in 2015/4/9, Wayne King from MathWorks contacted us, saying that they are developing the wavelet toolbox and asking if we can share some data as an example. We did. I’m glad that it’s part of the package now.

The following section are from the page above:

Find Coherent Oscillations in Brain Activity

In the previous examples, it was natural to view one time series as influencing the other. In these cases, examining the lead-lag relationship between the data is informative. In other cases, it is more natural to examine the coherence alone.

For an example, consider near-infrared spectroscopy (NIRS) data obtained in two human subjects. NIRS measures brain activity by exploiting the different absorption characteristics of oxygenated and deoxygenated hemoglobin. The data is taken from Cui, Bryant, & Reiss (2012) and was kindly provided by the authors for this example. The recording site was the superior frontal cortex for both subjects. The data is sampled at 10 Hz. In the experiment, the subjects alternatively cooperated and competed on a task. The period of the task was approximately 7.5 seconds.

load NIRSData;
hold on
legend('Subject 1','Subject 2','Location','NorthWest')
title('NIRS Data')
grid on;
hold off;

Obtain the wavelet coherence as a function of time and frequency. You can use wcoherence to output the wavelet coherence, cross-spectrum, scale-to-frequency, or scale-to-period conversions, as well as the cone of influence. In this example, the helper function helperPlotCoherence packages some useful commands for plotting the outputs of wcoherence.

[wcoh,~,F,coi] = wcoherence(NIRSData(:,1),NIRSData(:,2),10,'numscales',16);

In the plot, you see a region of strong coherence throughout the data collection period around 1 Hz. This results from the cardiac rhythms of the two subjects. Additionally, you see regions of strong coherence around 0.13 Hz. This represents coherent oscillations in the subjects’ brains induced by the task. If it is more natural to view the wavelet coherence in terms of periods rather than frequencies, you can use the ‘dt’ option and input the sampling interval. With the ‘dt’ option, wcoherence provides scale-to-period conversions.

[wcoh,~,P,coi] = wcoherence(NIRSData(:,1),NIRSData(:,2),seconds(0.1),...
    'Time (secs)','Periods (Seconds)');

Again, note the coherent oscillations corresponding to the subjects’ cardiac activity occurring throughout the recordings with a period of approximately one second. The task-related activity is also apparent with a period of approximately 8 seconds. Consult Cui, Bryant, & Reiss (2012) for a more detailed wavelet analysis of this data.


In this example you learned how to use wavelet coherence to look for time-localized coherent oscillatory behavior in two time series. For nonstationary signals, it is often more informative if you have a measure of coherence that provides simultaneous time and frequency (period) information. The relative phase information obtained from the wavelet cross-spectrum can be informative when one time series directly affects oscillations in the other.


Cui, X., Bryant, D.M., and Reiss. A.L. “NIRS-Based hyperscanning reveals increased interpersonal coherence in superior frontal cortex during cooperation”, Neuroimage, 59(3), pp. 2430-2437, 2012.

Grinsted, A., Moore, J.C., and Jevrejeva, S. “Application of the cross wavelet transform and wavelet coherence to geophysical time series”, Nonlin. Processes Geophys., 11, pp. 561-566, 2004.

Maraun, D., Kurths, J. and Holschneider, M. “Nonstationary Gaussian processes in wavelet domain: Synthesis, estimation and significance testing”, Phys. Rev. E 75, pp. 016707(1)-016707(14), 2007.

Torrence, C. and Webster, P. “Interdecadal changes in the ESNO-Monsoon System,” J.Clim., 12, pp. 2679-2690, 1999.

Author: Xu Cui Categories: brain, matlab, nirs, programming Tags: