from datetime import datetime
from pynwb import NWBFile, NWBHDF5IO, TimeSeries
if __name__ == '__main__':
nwb = NWBFile(source='', session_description='', identifier='', session_start_time=datetime.now())
ts1 = TimeSeries(name='timeseries1', source='source1', data=[4,5,6],
unit='na1', rate=1.0, starting_time=0.0)
nwb.add_acquisition(ts1)
with NWBHDF5IO('test_append.nwb', mode='w') as io:
io.write(nwb)
f = NWBHDF5IO('test_append.nwb')
nwb = f.read()
ts2 = TimeSeries(name='timeseries2', source='source2', data=[4,5,6],
unit='na1', rate=1.0, starting_time=0.0)
nwb.add_acquisition(ts2)
with NWBHDF5IO('test_append2.nwb', mode='a') as io:
io.write(nwb)
Please describe your environment according to the following bullet points.
1) Bug
Loading an NWBFile from one file, then saving it to another causes
ValueError: Can't change container_source once setto be thrownSteps to Reproduce
Environment
Please describe your environment according to the following bullet points.
Checklist