The Neurophysiological Biomarker Toolbox (NBT)

# Importing data into NBT format

## Introduction: The NBT file format

In order to use the scripts from NBT in the most efficient way, you need to convert your data into the NBT file format. This file format insures that information about your recording can easily be read by the NBT functions.

The NBT signal file format consists of two files; the Signal and Info file. These files are named after the NBT file name definition:

<ProjectID>.<SubjectID>.<Date of recording>.<Condition>

e.g.,

NBT.S0099.20090212.EOR2.

If this information is not available, you will still have to add dummy information, e.g., YYYYMMDD instead of the actual date. E.g., NBT.S0099.YYYYMMDD.EOR2.

The signal data is stored in a NBT Signal file (.mat format), that contains a Signal matrix called Signal, in which each column represents a signal from one channel.

Information about the signal is stored in the NBT Info file (.mat format) that contains an NBT Info object. The NBT Info file has the same name as the NBT Signal file, extended with _info, for example NBT.S0099.20090212.EOR2_info. This file contains an NBT Info object called SignalInfo (see nbt_Info.m for definition). The original name of your file is stored in this object, in the field Info.interface.original_file_name.

The reason for this separate Info file is to be able to quickly access and add information. If the Info file would be in the same file as the signal data, then every time you would like to add new information, you would have to resave the complete data file, which may take a long time if the signals are long (this is an unfortunate property of Matlab).

## Conversion

Conversion is done by the function nbt_import_files. Put all the files you want to convert in a folder where no other files are present, the source folder. In the NBT GUI, select File|Import files into NBT format, or type in the Matlab command window:

nbt_import_files('path to source folder','path to destination folder' )

for example

nbt_import_files('D:\work\data','D:\work\data\NBT')

If the paths are not given as input, Matlab will let you search the source and destination folders with a pop up window. The converted data will be saved in the destination folder. During the conversion, you will have to provide information about the data, which will be used in the file names and stored in the NBT Info file. After the conversion the destination folder contains one Info file and one Signal file for each converted file. Now you are ready to visualize and analyse your data with NBT using our Tutorials.

NBT supports conversion from several file formats. You can also give NBT a load handle , i.e., a function that loads your file format into Matlab (see help of nbt_import_files).

You can rename your files easily to the NBT filename format using the function nbt_Rename see here