Skip to content

Instantly share code, notes, and snippets.

@nicain
Last active November 22, 2017 12:48
Show Gist options
  • Save nicain/87bd7dae76097e042297315250ba6a44 to your computer and use it in GitHub Desktop.
Save nicain/87bd7dae76097e042297315250ba6a44 to your computer and use it in GitHub Desktop.
NWB Hello World
import warnings
from allensdk.core.brain_observatory_cache import BrainObservatoryCache
import allensdk.brain_observatory.stimulus_info as si
import pynwb
ophys_experiment_id = 570014520
boc = BrainObservatoryCache(manifest_file=brain_observatory_cache_manifest_file)
exp = boc.get_ophys_experiment_data(ophys_experiment_id)
legacy_map = pynwb.legacy.get_type_map()
io2 = pynwb.NWBHDF5IO(exp.nwb_file, extensions=legacy_map, mode='r')
with warnings.catch_warnings(record=True) as w:
nwb_data = io2.read()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment