Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import h5py | |
import argparse | |
from typing import Union | |
def replace_namespace(_: str, h5obj: Union[h5py.Dataset, h5py.Group]): | |
# change the attribute "namespace" from value "hdmf-experimental" to "hdmf-common" | |
# for all DynamicTableRegion and VectorData neurodata types from ndx-photometry. | |
if h5obj.attrs.get("namespace") == "hdmf-experimental": |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import h5py | |
import numpy as np | |
import argparse | |
import pynwb | |
STR_DTYPE = h5py.special_dtype(vlen=str) | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pynwb import NWBHDF5IO, NWBFile | |
def get_neurodata_type_objs_io(io: NWBHDF5IO, neurodata_type: str, namespace: str): | |
"""Return all PyNWB objects in the file that have a neurodata type from a namespace. | |
This works regardless of whether the extension was imported earlier in the python execution. | |
All objects that are instances of the class associated with the given neurodata_type in the | |
given namespace will be returned. This includes objects that are instances of a subclass. |