extractNWB: Extract data from nwb file : This function is utilized by the...

View source: R/extractNWB.R

extractNWBR Documentation

Extract data from nwb file

This function is utilized by the stimSets.R data wrangler script to extract the names of protocols used across the datasets being investigated.

Utilizes the rhdf5 package to load nwb object into environment and follows sequence of directive to extract data.

Description

Extract data from nwb file

This function is utilized by the stimSets.R data wrangler script to extract the names of protocols used across the datasets being investigated.

Utilizes the rhdf5 package to load nwb object into environment and follows sequence of directive to extract data.

Usage

extractNWB(
  x,
  acquisition = FALSE,
  stimulus = FALSE,
  sweeps = NULL,
  stimulus_sweeps = NULL,
  epochs = TRUE,
  slim = FALSE
)

Arguments

x

path to nwb

data

return timeseries in NWB

sampling_rate

Examples

## Not run: 
### V1
x = "data-raw/NWBv1/NWBv1.nwb"
version = 1

### V2
x = "data-raw/NWBv2/NWBv2.nwb"
version = 2

nwb = rhdf5::H5Fopen(x)

acquisition = FALSE
stimulus = TRUE
sweeps = c(1,2,5,8)
acquisition_names = TRUE
stimulus_description = TRUE
sampling_rate = TRUE
sweeps = NULL
comments = TRUE
epochs = TRUE



## End(Not run)


NRSC/nphys documentation built on Nov. 13, 2024, 2:12 a.m.