Improvements in NeuroExplorer in 2018-2019

Here is the list of new features and improvements in NeuroExplorer that were implemented in 2018-2019:

Version 5.128
Operations on Data Variables dialog generates Python script.

Version 5.127
Added code to import annotations from EDF+ files.

Version 5.126
Variables incompatible with current analysis are automatically deselected.
Added Select Variables page to all Analysis Properties dialogs.

Version 5.125
Added Band Energy versus Time analysis.
Added ability to save and restore custom Y axis minimums and maximums in 1D data viewer.

Version 5.120
Added option not to concatenate selected data points in Power Spectral Densities for Continuous analysis.

Version 5.119
Added calculation of minimum, maximum, mean and standard deviation of the visible values of a continuous or waveform variable in Raster analysis. The values of minimum etc. are shown in the Summary page of Numerical Results.

Version 5.117
Added Firing Rates analysis.

Version 5.116
MakeIntervals function allows overlapping intervals. After the initial pass, the overlapping intervals are merged.
When creating interval filter on the fly, added option to merge overlapping intervals.
Added ActivateWindow and CloseWindow scripting functions.

Version 5.115
Enabled import of unsorted spikes when running in Plexon Online mode.
Added functions returning lists of variables and lists of variable names.

Version 5.114
Added import of 3Brain data files.
Added options to specify how variable names are generated.

Version 5.110
Added CV2 analysis.
Added option to subtract reference channel to Detect Spikes analysis.
Added option to specify custom root folder for local files.
Added color scale to 1D Data Viewer.
Added menu command to edit variable metadata.

Calculating Average of Continuous Channels

One of the frequently asked questions is how to calculate the average of multiple continuous channels in NeuroExplorer. Prior to NeuroExplorer version 5.104, we had to use a rather cumbersome function LinearCombinationOfContVars. For example, to calculate the average of channels FP01 and FP02 we would execute this script line:

nex.LinearCombinationOfContVars(doc, "average of FP01 and FP02", doc["FP01"], 0.5, doc["FP02"], 0.5)

Fortunately, Python is a very flexible language. After an update of NeuroExplorer internal Python code (that uses new functions  ContAdd, ContMult and ContAddCont), it is now possible to use arithmetic expressions using continuous channels:

import nex
doc = nex.GetActiveDocument()

# average of two channels
doc["average of FP01 and FP02"] = (doc["FP01"]+doc["FP02"])/2.0

# subtract constant baseline
baseline = 100
doc["FP01 with baseline subtracted"] = doc["FP01"]-baseline

# subtract reference channel
referenceChannelName = 'FP16'
doc["FP01 with ref. channel subtracted"] = doc["FP01"]-doc[referenceChannelName]

# average of all continuous channels containing FP in channel name
count = 0
for i in range(nex.GetVarCount(doc, 'continuous')):
 name = nex.GetVarName(doc, i+1, 'continuous')
 if 'FP' in name:
   if count == 0:
     doc['FP average'] = doc[name]
     doc['FP average'] += doc[name]
   count += 1
if count > 0:
 doc['FP average'] = doc['FP average']/float(count)

Matlab 2017 and NeuroExplorer Version 4

Several NeuroExplorer version 4 users reported that they were unable to get data from Matlab when using Matlab 2017a and later. The following error messages are displayed by NeuroExplorer:

"Matlab variable n_1 does not exist of variable is not a matrix"


"Matlab workspace contains no matrices. Please load or generate some data in Matlab and try again."

The problem is in the breaking change in Matlab. To determine the type of Matlab object x, NeuroExplorer executes the following Matlab command:


In the previous versions of Matlab, the following was returned by Matlab (after removing line breaks and spaces):


In Matlab version 2017a and later, the result is:


NeuroExplorer version 4 checks for the result double without quotes. Unfortunately, Matlab made a breaking change and the result is ‘double’ (with quotes), so NeuroExplorer version 4 determines that x is not a double matrix.

NeuroExplorer version 5 does not have this problem.

If you are using NeuroExplorer version 4, you have the following options:

1) Uninstall Matlab 2017a or later and install an earlier version of Matlab
2) Upgrade your NeuroExplorer license to version 5 (please contact [email protected] for an upgrade quote)
3) Save your data in Matlab to .nex file and open .nex file in NeuroExplorer (use the scripts from to save Matlab data in .nex file)
4) Use the following scripts:
– use GetMatlab2ColumnMatrixAsContVarWithTs.nsc to import a 2-column matrix with timestamps and continuous values as a continuous variable
– use GetMatlabVectorAsContVar.nsc to import a 1-column matrix with continuous values as a continuous variable
– use GetMatabTimestampVector.nsc to import a 1-column matrix with timestamps as an event variable

Download the scripts to C:\ProgramData\Nex Technologies\NeuroExplorer\Scripts folder and open a script using Script | Open Script menu command.


NeuroExplorer Adds Support for 64-bit Timestamps

The timestamps in NeuroExplorer are stored as signed integers. These integers are usually the timestamps recorded by the data acquisition system and they represent time in the so-called time ticks. For example, the typical time tick for the Plexon system is 25 microseconds, so an event recorded at 1.5 sec will be stored internally as 60000.

Prior to version 5.100, NeuroExplorer used 32-bit integers to store timestamps. Maximum 32-bit signed value is 2,147,483,647. If the data acquisition sampling rate is 40,000 Hz (the time tick is 25 microseconds), the maximum 32-bit integer value corresponds to the timestamp equal to 53687.09118 seconds or 14.913 hours. This means that if we are using 32-bit timestamps, we cannot analyze recording sessions that are longer than 14 hours 54 minutes (when recording at 40 KHz).

Starting with version 5.100, NeuroExplorer stores timestamps internally as 64-bit integers. This means that NeuroExplorer can now analyze very long recording sessions and can work with data recorded with high sampling rates. NeuroExplorer can also now store and read 64-bit timestamps in .nex5 files (.nex files do not support 64-bit timestamps).

When saving data in .nex or .nex5 files, the following rules are used:

  • If maximum timestamp is less than 2,147,483,647, timestamps are saved as 32-bit integers (both in .nex and in .nex5 files)
  • If maximum timestamp exceeds 2,147,483,647, NeuroExplorer will save data only in .nex5 files and the timestamps will be saved as 64-bit integers

We updated all ‘How to read/write .nex/.nex5 files…’ documents and code samples (see downloads page). The new code samples can store and read 64-bit timestamps when using .nex5 files.


Import of Intan Technologies Files

NeuroExplorer 5.103 released on June 27, 2017, can import Intan Technologies .rhd files. If you saved the data in one file per signal type format or saved the data in one file per channel format, open info.rhd file in the corresponding directory and NeuroExplorer will import data from all the .dat files in this directory.