Skip to content

Commit

Permalink
Merge pull request #2714 from brendanjohnharris/namespace-fix
Browse files Browse the repository at this point in the history
Fix for namespaces issue
  • Loading branch information
morriscb authored Sep 8, 2023
2 parents 420d6e2 + b8e4882 commit e0aa7e3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
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

0 comments on commit e0aa7e3

Please sign in to comment.