MyNixOS website logo
Description

Read 'Blackrock-Microsystems' Files ('NEV', 'NSx').

Loads 'Blackrock' <https://blackrockneurotech.com> neural signal data files into the memory, provides utility tools to extract the data into common formats such as plain-text 'tsv' and 'HDF5'.

readNSx

license CRAN status R-check

The goal of readNSx is to read in Blackrock-Microsystem files (.nev, .nsx) and save the information to common formats that are well-supported by R, Python, Matlab.

Installation

The package is on CRAN soon. Install it via

install.packages("readNSx")

You can install the nightly development version of readNSx from r-universe

# Enable repository from dipterix
options(repos = c(
  dipterix = 'https://dipterix.r-universe.dev',
  CRAN = 'https://cloud.r-project.org'))
  
# Download and install readNSx in R
install.packages('readNSx')

How to use readNSx

Click here to read "not that detailed" manual including usage, anatomy of readNSx.

Import into RAVE

To import the data into RAVE (R Analysis and Visualization of iEEG), use the following code as an example.

readNSx::import_nsp(
  path = "~/EMU_RAW/EMU-008_sub-YAB_task-congruency_run-01_NSP-1.nev", 
  prefix = "~/rave_data/raw/YAB/block008", 
  exclude_events = "spike", partition_prefix = "_part"
)

The raw data is stored as EMU-008_sub-YAB_task-congruency_run-01_NSP-1.nev along with ns3 and ns5. The data will be written to RAVE raw-data path under ~/rave_data/raw/, as YAB/block008_part1, YAB/block008_part2, ... (one block of data may contain multiple segments of continuous recordings). The above example also avoids reading default spike-waveforms. Simply set exclude_events=NULL will enable default spike clusters. If you just want to import certain NSx files (for example, only ns3), then check exclude_nsx parameter.

Import to BIDS-like format

Blackrock-Microsystem data is incompatible with BIDS. It lacks several critical information and require manually edits. However, you may use import_nsp to import into BIDS-like format.

readNSx::import_nsp(
  path = "~/EMU_RAW/EMU-008_sub-YAB_task-congruency_run-01_NSP-1.nev", 
  prefix = file.path(
    "~/BIDSRoot/MyDataSet/sub-YAB/ses-008/ieeg/",
    "sub-YAB_ses-008_task-congruency_acq-NSP1_run-01"
  ), 
  exclude_events = "spike", partition_prefix = "/part"
)

License

(This is not legal notice. Please seek for professional advice)

The source code of readNSx is freely available for educational use. Some components might subject to Blackrock copyright. Please contact Blackrock for permissions if your software is not free.

readNSx is released under MPL-2.0 license with copyright information. To link readNSx in your project (e.g. via R library(readNSx) function), you do NOT need to change your license (even for proprietary projects, this makes me prefer MPL-2.0 to other strong copyleft licenses as GPL) other than including the copyright information when redistributing (see LICENSE file).

In some rare cases, if you redistribute source code, either modified or as-is outside of your organization, you must release the code under MPL-2.0 license. The license file explicitly states that the source code is incompatible with any other license (including GPL, see Exhibit B - “Incompatible With Secondary Licenses” Notice in the license file).

Metadata

Version

0.0.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows