Created
September 15, 2017 22:14
-
-
Save nicain/ae3d5280d86843971db8bd6dd0137948 to your computer and use it in GitHub Desktop.
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 datetime import datetime | |
| from pynwb import NWBFile | |
| from form.backends.hdf5 import HDF5IO | |
| from pynwb import get_build_manager | |
| from pynwb.base import TimeSeries | |
| import numpy as np | |
| f = NWBFile('tmp.nwb', 'my first synthetic recording', 'EXAMPLE_ID', identifier='hi', | |
| experimenter='Dr. Bilbo Baggins', | |
| lab='Bag End Labatory', | |
| institution='University of Middle Earth at the Shire', | |
| experiment_description='I went on an adventure with thirteen dwarves to reclaim vast treasures.', | |
| session_id='LONELYMTN', | |
| session_start_time='10') | |
| f.add_raw_timeseries(ts=TimeSeries(name='example', | |
| source='No source', | |
| data=np.random.random(10), | |
| unit='Hz', | |
| timestamps=np.arange(5))) | |
| # manager = get_build_manager() | |
| io = HDF5IO('tmp.nwb', mode='w') | |
| io.write(f) | |
| io.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment