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.


Custom Post-processing and Custom Graphics

I often get requests from NeuroExplorer users asking to add something to numerical results (for example, add location of the second peak in the spectrum to summary of numerical results). Another long-standing request is to be able to add custom graphics commands NeuroExplorer graphs.

Let’s consider a spectrum example. Here is a result of Power Spectral Densities analysis:


It would be nice to be able to find the peaks in the spectra, draw ‘x’ marks at peak locations and add text labels showing peak frequencies:



All this can now be done using new post-processing options in NeuroExplorer. Double-click in the graph to invoke Analysis Properties dialog, then go to Post-processing tab and click ‘Post-Processing Script Options’ button:


Specify your script in the Post-Processing Script Options dialog:

post-processing-script-options file contains script that was used to find peaks and add custom graphics commands shown above. Download file and extract the scripts to

C:\Users\<your_user_name>\Documents\NeuroExplorer 5\Scripts folder.

See also Analysis Functions/Set Property topic in NeuroExplorer help:


Showing Analog Signals in Spectrograms

sleep1_edf Spectrograms 001

NeuroExplorer 5.023 (released on December 16, 2015) adds a new option in Spectrogram Analysis – ability to draw analog signal above each spectrogram. The signal is drawn for the time values specified in the spectrogram X axis. It is recommended that the Spectrogram analysis option ‘X Axis corresponds to the Center of Sliding Window’ is used.

HDF5 Files in NeuroExplorer

Several open source projects (KlustaSuite, Neo, NIX, LBNL Brain, Orca, Neurodata Without Borders) utilize open source Hierarchical Data Format (HDF5) to store neurophysiological data. NeuroExplorer 5.023 (released on December 16, 2015) can import KlustaSuite .kwik files with data stored in HDF5 format.

If you are using any other HDF5-based file format and would like to import this file format directly in NeuroExplorer, send an e-mail to [email protected] With all the basic code to read data from HDF5 files in place, I can add import of another HDF5 file format to NeuroExplorer in a few days.

Python Scripting in NeuroExplorer

For many years, NeuroExplorer has had the capability to automate repetitive tasks:

  • Repeat analysis on all the data files in a folder,
  • Edit data or post-process analysis results without sending data or results to an external program

To support scripting, a custom NexScript language was developed. NexScript supports simple variables and has basic flow control capabilities. However, there are many limitations of NexScript that make writing scripts difficult. Adding new capabilities to NexScript (for example, adding support for arrays) would require a considerable effort. An alternative approach is to integrate existing programming language into NeuroExplorer.

We are pleased to announce that starting with version 5.022, NeuroExplorer scripts can also be written in Python.

NexScript - RepeatAnalysis2

Here are some of the benefits of using Python:

  • Python is very well documented
  • Shorter scripts
    • Access to NeuroExplorer data via Python lists eliminate many loops
    • User-defined functions replace repetitive code
  • Scripts can use thousands of Python functions

Old NexScript scripts can be automatically converted to Python using Tools | Convert to Python menu command in NexScript editor.

NeuroExplorer uses Python 2.7.10. There is no need to install Python. All the Python files needed for scripting are installed by NeuroExplorer setup program.