Skip to content

Commit

Permalink
Merge pull request #1358 from ben-dichter-consulting/fix/ecephys_ndx
Browse files Browse the repository at this point in the history
version and cache spec
  • Loading branch information
kschelonka authored Feb 29, 2020
2 parents 4b85163 + 391459e commit 12f52d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespaces:
- doc: ""
version: 0.2.0
name: AIBS_ecephys
schema:
- namespace: core
Expand Down
7 changes: 3 additions & 4 deletions allensdk/brain_observatory/ecephys/write_nwb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,10 +851,9 @@ def write_ecephys_nwb(
eye_gaze_data=eye_gaze_data)

Manifest.safe_make_parent_dirs(output_path)
io = pynwb.NWBHDF5IO(output_path, mode='w')
logging.info(f"writing session nwb file to {output_path}")
io.write(nwbfile)
io.close()
with pynwb.NWBHDF5IO(output_path, mode='w') as io:
logging.info(f"writing session nwb file to {output_path}")
io.write(nwbfile, cache_spec=True)

probes_with_lfp = [p for p in probes if p["lfp"] is not None]
probe_outputs = write_probewise_lfp_files(probes_with_lfp, session_start_time, pool_size=pool_size)
Expand Down

0 comments on commit 12f52d7

Please sign in to comment.