Class definition for 'PyNWB' container; use read_nwb
for construction function.
Methods
Method open()
Open the connections, must be used together with $close
method.
For high-level method, see $with
Method close()
Close the connections (low-level method, see 'with' method below)
Method close_linked_files()
Close all opened, linked-to files. 'MacOS'
and 'Linux'
automatically release the linked-to file after the linking file is
closed, but 'Windows'
does not, which prevents the linked-to
file from being deleted or truncated. Use this method to close all
opened, linked-to files.
Method with()
Safe wrapper for reading and handling 'NWB'
file. See class examples.
Usage
NWBHDF5IO$with(expr, quoted = FALSE, envir = parent.frame())
Examples
if (FALSE) { # \dontrun{
# Running this example requires a .nwb file
library(rnwb)
container <- NWBHDF5IO$new(path = file)
container$with({
data <- container$read()
electrode_table <- data$electrodes[convert = TRUE]
})
print(electrode_table)
} # }
## ------------------------------------------------
## Method `NWBHDF5IO$open`
## ------------------------------------------------
if (FALSE) { # \dontrun{
# low-level method to open NWB file, for safer methods, see
# `container$with()` below
container$open()
data <- container$read()
# process data...
# Make sure the container is closed!
container$close()
} # }
## ------------------------------------------------
## Method `NWBHDF5IO$with`
## ------------------------------------------------
if (FALSE) { # \dontrun{
container$with({
data <- container$read()
# process data
})
} # }