From 057b955fd59fabbdf25f629b5fa5d9b353a277e9 Mon Sep 17 00:00:00 2001 From: isaak-willett Date: Wed, 11 Mar 2020 16:48:34 -0600 Subject: [PATCH] Added cache_spec==True keyword to lfp_writer.write call NWB advises to include this keyword in the NWB file write. This keyword caches the extension in the NWB file so it's easier for others to read data. No need to import ecephys.nwb. --- allensdk/brain_observatory/ecephys/write_nwb/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/allensdk/brain_observatory/ecephys/write_nwb/__main__.py b/allensdk/brain_observatory/ecephys/write_nwb/__main__.py index ba9b21b47..0950c0d47 100644 --- a/allensdk/brain_observatory/ecephys/write_nwb/__main__.py +++ b/allensdk/brain_observatory/ecephys/write_nwb/__main__.py @@ -625,7 +625,7 @@ def write_probe_lfp_file(session_start_time, log_level, probe): with pynwb.NWBHDF5IO(probe['lfp']['output_path'], 'w') as lfp_writer: logging.info(f"writing probe lfp file to {probe['lfp']['output_path']}") - lfp_writer.write(nwbfile) + lfp_writer.write(nwbfile, cache_spec=True) return {"id": probe["id"], "nwb_path": probe["lfp"]["output_path"]}