fNIRS analysis toolbox series – OxySoft

 

Introduction

Here we present OxySoft: our proprietary, and dedicated, NIRS software used to collect, store, view, and analyze all necessary data. It provides a robust and parallel, recording of multiple devices, which allows for synchronized, single-file, recordings of any imaginable combination of OxyMon, Brite, and other Artinis NIRS devices; all within a single piece of software. OxySoft has a user-friendly graphical interface, is highly customizable to suit the needs of any researcher of any field, and offers both real-time and offline data visualization and analysis.

Data from OxySoft can be analyzed in several ways. You can analyze data from within OxySoft itself. OxySoft offers a variety of standard analysis techniques, such as filtering, averaging, and statistical analysis. Additionally, data can also be exported to standard data formats, such as txt, xls,or edf file formats. Furthermore, we provide the MATLAB function oxysoft2matlab, which lets you import your OxySoft data directly into several MATLAB toolboxes, such as Homer3, NIRStorm, NIRS-SPM, and FieldTrip. Oxysoft2matlab also allows importing raw data, so that you are free to do any preferred analysis from within MATLAB.

Here, we present the basic principle of data analysis within OxySoft itself and show a simple example of how to read in data, preprocess the data (filtering only), average over trials and over subjects and plot the final result in a graph. Finally we will show how to get the data into a format suited for statistical analysis [note: some toolboxes have stats functions, then we just say so, otherwise there must be some export function somewhere]. Suggestions for further reading and tutorials can be found below.

This blog post is part 1 of the fNIRS analysis toolbox series.


About OxySoft

OxySoft is the software used by all Artinis device users to collect, store, view, and analyze data. It is developed by the talented software engineers of the Artinis team.

OxySoft has a user-friendly graphical interface, is highly customizable to suit the needs of any researcher of any field, and offers both real-time and offline data visualization and analysis. It comes with an extensive manual in PDF. OxySoft is used all around the world by our large customer community and the Artinis customer support team is always ready to help with any questions you may have about OxySoft. 

OxySoft is cited as: OxySoft, Artinis Medical Systems, Elst, The Netherlands.

Installing OxySoft

  • Prerequisites: PC with Windows 7, 8 or 10

  • How to install: Get your first Artinis device, or if you already have one; you can find the installation file on the yellow USB stick that was shipped with your device.

  • Link to manual: The user manual is on the yellow USB stick that was shipped with your device.

Using OxySoft

 
OxySoft does not require you to perform any preprocessing steps. OxySoft does not yet support preprocessing over multiple measurements.

OxySoft does not require you to perform any preprocessing steps. OxySoft does not yet support preprocessing over multiple measurements.

 

Implementing the processing pipeline in OxySoft

Figure 1 shows an overview of the different elements of the OxySoft user interface referred to throughout this blog post. The menu&toolbar (green) is used to access most of the functionality in the software, the project view (red) shows an overview of all measurements and their constituent graphs and traces. The workspace (blue) is where the data is displayed in the form of graphs containing traces corresponding to O2Hb and HHb.

Figure 1. Overview of the OxySoft graphical user interface in offline mode

Figure 1. Overview of the OxySoft graphical user interface in offline mode

Creating a project and loading data

Data can be loaded in OxySoft either through a project file, or by creating a measurement from a data file. In Figure 1 a project name blog containing the S01_Brite_Fingertapping_20200512 measurement is loaded. In the tree view under the measurement are the graphs, and data traces. Each project can contain multiple measurements, and each measurement can contain multiple representations of the same data, e.g. both filtered and unfiltered. A measurement is only a description of the data contained in a data file, which means the underlying data is always preserved no matter the changes to the measurement done during analysis.

Manual rejection of trials

To find artefacts it is necessary to zoom in, either by using the buttons on the toolbar, through keyboard shortcuts, or by drag-n-zoom in the graphs. Synchronized scrolling across graphs is the default setting in OxySoft, and the best option for the purpose of trial rejection as all channels can be inspected simultaneously. The vertical green bars in the graphs are the events to mark onset of fingertapping (F) and rest (R), rejecting a trial containing an artefact is done by right-clicking the event corresponding to the affected trial and selecting Toggle ignore event. In this dataset, we do not ignore any events. Figure 2 shows a segment of data with a large artefact, the greyed-out F event means it has been ignored and will be excluded from operations performed over trials (cyclic operations).

Figure 2. A zoomed in view of the data displaying a large movement artefact and an ignored event marker (F, grey vertical line)

Figure 2. A zoomed in view of the data displaying a large movement artefact and an ignored event marker (F, grey vertical line)

MBLL - Conversion from OD to hemoglobin concentration changes

OxySoft stores the data as optical densities. These are automatically converted to concentration changes of O2Hb and HHb for graph visualisation. OxySoft allows for calculating and setting the DPF parameter, after which the graphs are automatically updated. Further, OxySoft allows switching the default Cope extinction coefficient table to one of the other tables that ships with OxySoft, or to your own preferred table. It is also possible to apply wavelength correction to the DPF. All in all a lot of customization and flexibility is possible in the OD to concentration changes conversion.

Low-pass filtering

In OxySoft, any processing of the data, such as filtering, can be applied on the level of individual traces or graphs. This flexibility is great as it allows for easy comparison of what different processing steps do to the data. 

OxySoft offers both moving average and high/low/band-pass filtering, here we apply a 0.1Hz low-pass filter to all of the graphs. This is done in Common graph properties, easily reached via the menu bar or through a graph. Figure x shows the Transformation tab of Common graph properties, with the filter options enclosed by the red box. OxySoft uses a so-called Finite Impulse Response (FIR) filter by default, this is in contrast to toolboxes like Homer and NIRSTORM which use Infinite Impulse Response (IIR) filters. We at Artinis consider FIR a better option, for more information see this paper on the topic. The type of filter, in this case low-pass is selected from the Filter drop-down, and the low-pass cutoff is put into the Lo Freq box.

 
Figure 3. Transformation processing options, filter (red), cyclic operations (blue)

Figure 3. Transformation processing options, filter (red), cyclic operations (blue)

 

Figure x shows a comparison of unfiltered and filtered O2Hb and HHb data for a single channel. The thin lines are the unfiltered data and the thick lines the low-pass filtered data, the most striking difference is the lack of the heartbeat in the filtered signal.

 

Figure 4. View of the data pre (thin lines) and post-filtering (thick lines) for a single trial of the experiment.

 

Averaging and plotting of trials

After the data is filtered it can be split into trials and an average response to fingertapping across all trials can be calculated. All of this is done directly through Common graph properties, and the graphs are automatically updated as soon as the settings are applied. Cyclic operators in the Transformation tab (blue box, Figure x) can be used to calculate and display: 1) individual trial responses, 2) average response over trials, 3) average response + a measure of dispersion over trials (SD). To show a change from baseline, a baseline period of 5 seconds is defined by the Detrend front period option. The Cyclic field specifies the time period of each trial we want to display, in this case 5 seconds before (baseline) fingertapping onset to 20 seconds after (trial duration).

As OxySoft allows full flexibility in adding traces to graphs you can add multiple traces of the same channel to a graph, then apply different cyclic operators to show e.g. both individual and average responses in the same graph. The result of doing this is shown in Figure x, where the thick lines represent the average response over trials, and the thin lines the individual trial responses for channel Rx7-Rx10. From the individual trials it is hard to discern a pattern, but the average clearly shows an increase in O2Hb and a concomitant decrease in HHb after the onset of fingertapping (leftmost vertical green line).

FIgure 5. Average fingertapping response (thick lines) and individual fingertapping trials (thin lines) for channel Rx7-Tx10

FIgure 5. Average fingertapping response (thick lines) and individual fingertapping trials (thin lines) for channel Rx7-Tx10

Since it’s possible to show multiple traces in the same graph all channels can be plotted in an overlapping manner in the same graph, a so-called butterfly plot. This is a useful way to see if the response is consistent over channels. Another type overview of the response over channels can be achieved by using one graph for each channel and arranging the graphs according to the optode template layout that was used. This allows for an easy mapping from the graphed data to the individual optode locations, exemplified by Figure x.

Figure 6. The average response to fingertapping per channel in a layout corresponding to the optode template layout that was used in the measurement.

Figure 6. The average response to fingertapping per channel in a layout corresponding to the optode template layout that was used in the measurement.

To show the average fingertapping response over trials along with the trial variability the option of displaying the average response + standard deviation is a good option, Figure x shows the resulting graph from this cyclic operation.

Figure 7. Channel Rx7-Tx10 average fingertapping response with standard deviation (shaded area)

Figure 7. Channel Rx7-Tx10 average fingertapping response with standard deviation (shaded area)

Calculating a grand average response over subjects, or as in the case here, over sessions, is unfortunately not possible in OxySoft at this stage, but this is something that we want to have in the future! Currently, the best alternative is to use the oxysoft2matlab conversion script or OxySoft export features to get your data into a format for processing it e.g. in SPSS, R, Excel or in one of the toolboxes described in our upcoming blog posts.

Conclusion

In this blog post, we showed you how to implement a basic processing pipeline in OxySoft. It shows how easy, quick, and versatile it is to reshape data in OxySoft. Setting events and applying filters and cyclic operators belong to the highlights of data analysis in OxySoft. For even more efficiency, once a processing pipeline is implemented for one measurement this can be copied to all of the other measurements, minimizing the time spent on analysis and reducing the risk of mistakes. Compare data analysis in OxySoft to other toolboxes by reading the next blogposts. We also recommend subscribing to our YouTube channel for more OxySoft updates and tutorials!


Suggested further reading

OxySoft webpage: https://www.artinis.com/oxysoft

OxySoft Tutorial Videos: https://www.youtube.com/playlist?list=PLOaHM4SlyLXCGFtWl_iI8_AOecl4ZqgCe

 

Previous
Previous

fNIRS analysis toolbox series – NIRSTORM

Next
Next

fNIRS analysis toolbox series – Introduction