diff --git a/allensdk/brain_observatory/ecephys/ecephys_session_api/ecephys_nwb_session_api.py b/allensdk/brain_observatory/ecephys/ecephys_session_api/ecephys_nwb_session_api.py index 2b8788c862..de79a9bcce 100644 --- a/allensdk/brain_observatory/ecephys/ecephys_session_api/ecephys_nwb_session_api.py +++ b/allensdk/brain_observatory/ecephys/ecephys_session_api/ecephys_nwb_session_api.py @@ -9,9 +9,6 @@ from .ecephys_session_api import EcephysSessionApi from allensdk.brain_observatory.nwb.nwb_api import NwbApi -import \ - allensdk.brain_observatory.ecephys.nwb # noqa Necessary to import pyNWB -# namespaces from allensdk.brain_observatory.ecephys import get_unit_filter_value from allensdk.brain_observatory.nwb import check_nwbfile_version from .._channels import Channels diff --git a/allensdk/brain_observatory/nwb/nwb_api.py b/allensdk/brain_observatory/nwb/nwb_api.py index bfa1d7d0bc..f2d66330f1 100644 --- a/allensdk/brain_observatory/nwb/nwb_api.py +++ b/allensdk/brain_observatory/nwb/nwb_api.py @@ -10,10 +10,6 @@ from allensdk.brain_observatory.running_speed import RunningSpeed from allensdk.brain_observatory.behavior.image_api import ImageApi -namespace_path = Path(__file__).parent / \ - 'ndx-aibs-behavior-ophys.namespace.yaml' -pynwb.load_namespaces(str(namespace_path)) - class NwbApi: @@ -24,7 +20,7 @@ def nwbfile(self): if hasattr(self, '_nwbfile'): return self._nwbfile - io = pynwb.NWBHDF5IO(self.path, 'r') + io = pynwb.NWBHDF5IO(self.path, 'r', load_namespaces=True) return io.read() def __init__(self, path, **kwargs):