Learn to Work with Next Gen. Neurotech Data ‘fNIRS’ with this Easy Tutorial

John David Chibuk
Published in
5 min readNov 26, 2019


This post explains how to get started with fNIRS sensing data specifically oxygenated hemoglobin “HbO2/HbO” data for analyzing a data stream from a sensor, in this case Blueberry.

The goal here is to help with understanding how to take the sensor data signal and get to a point where clear increases and decreases in thinking intensity are shown during a period of use. In this tutorial we will use a sample dataset to start with.

In this post we explore two core concepts with fNIRS data:

  1. Experiments to determine a clean ‘brain activity’ signal
  2. Comparing ‘brain activity’ with a secondary source of data, typing speed

The image below shows the ideal change in HbO2 blood oxygenation for an intensity of thought increase.

If you want to learn more about fNIRS you can read about it here.

Thanks to python and scikit learn this can be done quite fast! This tutorial walks you through an open source Jupyter notebook and a few methods to get started. Find the Github public repo here.

7 Steps to Get to an Estimated Brain Activity Signal

Steps 1–6 Filtration and initial brain activity signal estimation

Step 1 Install the required libraries for scikit learn and pandas (tools for managing the data + performing some of the initial analysis) — this notebook was built using Python 3 Kernel

Step 2 Explore initial types of analysis to run on fNIRS data, most statistical analysis will try out 4 in this tutorial:

  • Standard Deviation
  • Mean/Average
  • Rolling Average
  • Volatility and Change in Rolling Average
Measuring Mental Workload with EEG+fNIRS

In each case a window of time is selected to get a snapshot of what the data looks like.

Hemodynamic responses in fNIRS data typically occur over a 5 to 25 second window of time.



John David Chibuk

founder, building teams and products to shape the future.