import_nsp {readNSx} | R Documentation |
Import signal data from 'Blackrock-Microsystems' data files
Description
Please use import_nsp
to import 'NEV' and 'NSx' files.
Usage
import_nsp(
path,
prefix = NULL,
exclude_events = "spike",
exclude_nsx = NULL,
verbose = TRUE,
partition_prefix = "/part"
)
Arguments
path |
path to 'NEV' or 'NSx' files |
prefix |
path prefix to save data files into |
exclude_events |
exclude one or more 'NEV' data events, choices are
|
exclude_nsx |
excluded 'NSx' types, integer vectors from 1 to 9; for
example, |
verbose |
logical or a progress object: when logical, |
partition_prefix |
additional prefix to the data partition; default is
|
Value
A list of configurations, see get_specification
for
what's contained.
Examples
# Please get your own sample data first. This package does not
# provide sample data for privacy and license concerns :)
if(interactive() && file.exists("sampledata.nev")) {
library(readNSx)
# ---- Import for the first time --------------------------------
import_nsp(
path = "sampledata.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"
)
# ---- Load header information --------------------------------
prefix <- "sub-YAB_ses-008_task-congruency_acq-NSP1_run-01"
nev <- get_nev(prefix)
ns3 <- get_nsx(prefix, which = 3)
# get nev from nsx, or nsx from nev
get_nev(ns3)
get_nsx(nev, which = 5)
# ---- Load channel data
result <- get_channel(prefix, channel_id = 10)
channel_signal <- result$channel_detail$part1$data
channel_signal[]
}