-
A user wanted to update the spiketimes of an existing NWB file. The new spiketimes are the same size, just re-referenced to a different time base, so they're updating the zarr_root["units"]["spike_times"] field using Zarr in append mode. This seems to work, but when they moved the zarr folder to a different location, opened the file with
Upon further investigation, the spiketimes array was replaced in Zarr using something like: z = zarr.open(file_path, "a")
z["units"]["spike_times"] = new_array Apparently, this also resets the attributes ( The correct approach for replacing the values of the spiketimes array that preserves z = zarr.open(file_path, "a")
z["units"]["spike_times"][:] = new_array Setting with Note that replacing the values using PyNWB currently raises an error: Based on troubleshooting with @alejoe91 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
See the solution at the end of the question! |
Beta Was this translation helpful? Give feedback.
See the solution at the end of the question!