Assessing NIRS signal quality – Implementation of the Signal Quality Index (SQI)
- Naser Hakimi -
Imagine you are going to make a salad for your meal - what would be the most important prerequisite? Indeed, it is having good quality ingredients, e.g., lettuce, spinach, tomatoes, etg. Otherwise, there might even be the potential of getting sick, although the aim was to have a healthy meal.
In Near-Infrared Spectroscopy (NIRS), it is crucial to receive good data quality ingredients (i.e. signals) to get a “healthy” measurement that would not make your analyses “sick”. Poor signal quality may lead to wrong interpretations of the collected data. But, how can NIRS signal quality be assessed? Follow this blog post to learn about an easy way to visually assess the signal quality of a NIRS measurement and get an introduction to three implemented ways of determining the NIRS signal quality.
How to assess NIRS signal quality
Let’s first have a look at a sample of a good-quality NIRS measurement. In figure 1, one can find a 10-second segment of a functional NIRS channel in a measurement done with the Brite at a high sampling rate of 50 Hz. A NIRS signal consists of multiple components and incorporates next to the hemodynamic signal also physiological signals, such as heart and respiratory rate. Therefore, a periodic pulsation in the signals which indicates the heartbeat can be seen. It is more visible in the red signal (O2Hb) than the blue one (HHb), as HHb signals generally have a smaller scale and a higher level of noise than O2Hb signals.
According to literature [1-3] a good NIRS signal quality is achieved in case of proper optode-scalp coupling, unambiguously meaning the proper placement of the optodes on the head. Some components of the NIRS signal, such as cardiac (heartbeat) and respiratory signals, are captured stronger when having a greater optode-scalp coupling. Thus, taking advantage of the heartbeats’ noise, we can assess the signal quality by determining the heartbeats’ strength in the signals. The clearer the heartbeats in the signals, the better the signal quality.
Signal Quality Index (SQI)
Luckily, this does not have to be done by researchers themselves - again we have made it easy for you! We have developed an algorithm named SQI (Signal Quality Index) [3]. which rates NIRS signal quality on a continuous numeric scale from 1 (representing very low signal quality) to 5 (representing very high signal quality). The algorithm calculates the SQI index for each measurement channels for segmented time windows. As an example, in figure 2 two 10-second signal segments are illustrated wherein the SQI algorithm was used to determine the signal quality. The signal segment shown in the first panel has got an SQI rating of approximately 1, meaning very low signal quality, whereas the signal segment shown in the second panel has got an SQI rating of approximately 5, meaning very high signal quality.
SQI Implementation
There are currently three implemented ways to employ the SQI algorithm for determining NIRS signal quality:
Implementation in Oxysoft
Our acquisition software, Oxysoft, currently offers an implemented version of SQI that can be accessed in the DAQ Values toolbar. The option can be enabled by selecting the “SQI(Experimental)” in the dropdown list as shown in the figure below in the first panel. Then, SQI qualitative scores are displayed in three levels: “Bad”, “Medium”, and “Good”. SQI algorithm in OxySoft uses 5 second time windows to compute SQI. After computing, SQI, which also uses an algorithm scale from 1 to 5, is transferred to the three levels as followed: 1 and 2 are shown as "Bad", 3 as "Medium" and 4 and 5 as "Good”.
Figure 3 shows an example measurement in the second panel which was done with the PortaLite MKII. The SQI qualitative score is determined in real-time for each channel and shown in the DAQ Values toolbar. In this example, the SQI score for two channels of the system used in the example measurement is determined as “Good”. In three channels the SQI score was determined as “Medium”. In one channel, i.e., Rx2-Tx1, the SQI score was computed as “Bad”. Looking back at the beginning of this blog post, channels with a more visible heartbeat in O2Hb also provide a better signal quality level. This implementation of the SQI could be used either during initialization (i.e., placing the cap on the head) or during the experiment to determine the signal quality of each (f)NIRS channel in three levels.
2. Matlab and Python function (publicly available)
We have written a function for both Matlab and Python computing the SQI rating for a 10-second NIRS signal segment. It is publicly available in an Artinis GitHub repository (SQI.m). The function has five arguments, OD1, OD2, oxy, dxy, and Fs. OD1 and OD2 stand for optical density values of the higher and lower wavelengths, respectively. Oxy and dxy stand for the O2Hb and HHb signals, and Fs is the sampling rate. The function returns the SQI rating on a continuous scale between 1 to 5.
3. Fieldtrip function (publicly available)
For FieldTrip users, a modified MATLAB function is publicly available in a FieldTrip GitHub repository (ft_nirs_signalqualityindex.m). This function is a binary implementation of the SQI algorithm, i.e., it categorizes the signal quality in two levels – good and bad. Signal quality is considered good if the SQI rating is either above or equal to a predefined threshold, otherwise, it is categorized as bad. The function has two arguments, cfg and datain. The cfg is a structure array that should have two fields: cfg.threshold and cfg.windowlength. The former is the mentioned predefined threshold which has been set as default to 3.5. The latter is the window length in segmentation which has been set as default to 10 (seconds). The function’s second argument (i.e., datain) is the raw NIRS data that is structured according to the output of the ft_preprocessing function, the FieldTrip function used for importing and pre-processing the data. The function returns a copy of the original data replaced with NaN (stands for Not a Number) in the signal segments with signal quality below the predefined SQI threshold (i.e., bad quality).
Conclusion
In this blog post, we demonstrated how to visually assess NIRS signal quality and introduced three implemented ways to use the SQI algorithm for determining NIRS signal quality.
If you would like to read more details about the SQI algorithm, you can find the published paper here. In addition, if you have any questions about either the SQI algorithm or the implemented ways, feel free to ask via askforinfo@artinis.com. We will be glad to help you!
Literature
[1] L. Pollonini, C. Olds, H. Abaya, H. et al. Auditory cortex activation to natural speech and simulated cochlear implant speech measured with functional near-infrared spectroscopy. Hear Res, vol. 309, pp. 84–93, Mar. 2014,
[2] L. Pollonini, H. Bortfeld, and J. S. Oghalai. PHOEBE: a method for real time mapping of optodes-scalp coupling in functional near-infrared spectroscopy. Biomedical Optics Express, Vol. 7, Issue 12, pp. 5104-5119, vol. 7, no. 12, pp. 5104–5119, Dec. 2016
[3] M. S. Sappia, N. Hakimi, W.N.J.M Colier et al. Signal quality index: an algorithm for quantitative assessment of functional near infrared spectroscopy signal quality. Biomedical Optics Express, Vol. 11, Issue 11, pp. 6732-6754, vol. 11, no. 11, pp. 6732–6754, Nov. 2020
Functional Near-Infrared Spectroscopy is a neuroimaging modality measuring brain activity, that offers various advantages, such as easy usability and non-invasiveness. Thus, it can perfectly be applied to sensitive subjects, such as infants, toddlers, and the elderly. Read in this blog post, what makes fNIRS a suitable technology to measure neural activity in sensitive subjects, and how it is currently used in this population.