From a3dc6b21b476fb9f265a9c9ef7ad9d1a811c6b25 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Thu, 28 Mar 2024 10:11:08 +0100 Subject: [PATCH] Fix compressor propagation with zarr --- src/spikeinterface/core/zarrextractors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spikeinterface/core/zarrextractors.py b/src/spikeinterface/core/zarrextractors.py index 3f7962f214..3be3055bed 100644 --- a/src/spikeinterface/core/zarrextractors.py +++ b/src/spikeinterface/core/zarrextractors.py @@ -381,7 +381,7 @@ def add_recording_to_zarr_group(recording: BaseRecording, zarr_group: zarr.hiera dataset_paths = [f"traces_seg{i}" for i in range(recording.get_num_segments())] zarr_kwargs["dtype"] = kwargs.get("dtype", None) or recording.get_dtype() - if "compressor" not in zarr_group: + if "compressor" not in zarr_kwargs: zarr_kwargs["compressor"] = get_default_zarr_compressor() add_traces_to_zarr( @@ -392,7 +392,7 @@ def add_recording_to_zarr_group(recording: BaseRecording, zarr_group: zarr.hiera **job_kwargs, ) - # # save probe + # save probe if recording.get_property("contact_vector") is not None: probegroup = recording.get_probegroup() zarr_group.attrs["probe"] = check_json(probegroup.to_dict(array_as_list=True))