Skip to content

NeuroExplorer/nex-Python-package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nex-Python-package

Python package for running NeuroExplorer Python scripts an any Python development environment (VS Code, Spyder, etc.)

Description

Provides a simple way to run Python scripts that control NeuroExplorer (open data file, get file data, run analysis, save results, etc.) in any Python IDE.

See NeuroExplorer Python Scripting Documentation for detailed information about Python scripting in NeuroExplorer.

To install the package, open Windows Command Prompt, type pip install -U nex and press Enter.

If you are using Anaconda:

  • Type Anaconda Prompt in the Windows Search Bar, select Anaconda version and then click on it
  • Type pip install -U nex in Anaconda Prompt window and press Enter

After the package is installed, you can run NeuroExplorer Python scripts in any Python development environment.

For example, to run PSTH analysis saved in the template PerieventHistograms.ntp, run this Python code:

import nex
doc = nex.GetActiveDocument()
# run PSTH analysis saved in the template PerieventHistograms
nex.ApplyTemplate(doc, "PerieventHistograms")

The package also provides classes to read and write .nex and .nex5 data files.

import nex.nexfile
reader = nex.nexfile.Reader()
fileData = reader.ReadNexFile(r"C:\path\to\file.nex5")

About

Python package for running NeuroExplorer scripting an any IDE

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages