Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for namespaces issue #2714

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions allensdk/brain_observatory/nwb/nwb_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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):
Expand Down
Loading