SpikeInterface / SpikeInterface/spikeinterface
channel locations missing from zarr saved files
Open
Nobody has claimed this yet.
core
- Dominant language
- Python
- Stars
- 847
- Forks
- 280
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 29
Description
Hi am saving the .rhs files in zarr format as:
recording = se.read_intan(file_path, stream_name='RHS2000 amplifier channel', use_names_as_ids=True)
recording_bp = spre.bandpass_filter(recording, freq_min=300, freq_max=9000)
rec_cmr = spre.common_reference(recording_bp, operator="median", reference="global") # Rereferencing the data
probe = generate_multi_columns_probe(num_columns=3,
num_contact_per_column=[1, 2, 1],
xpitch=75, ypitch=150, y_shift_per_column=[0, -60, 0],
contact_shapes='square', contact_shape_params={'width' : 20 , 'height' :20 })
channel_indices = np.arange(4)
probe.set_device_channel_indices(channel_indices)
rec_cmr.set_probe(probe, in_place = True)
rec_cmr.get_channel_locations()
bad_channel_ids, channel_labels = spre.detect_bad_channels(rec_cmr, method='coherence+psd')
print('bad_channel_ids', bad_channel_ids)
print('channel_labels', channel_labels)
recording_good_channels_f = rec_cmr.remove_channels(bad_channel_ids)
recording_good_channels = spre.common_reference(recording_good_channels_f, reference='global', operator='median')
base_name = Path(file_name).stem
zarr_path = zarr_folder / f"{base_name}.zarr"
compressor = numcodecs.Blosc(cname="zstd", clevel=9, shuffle=numcodecs.Blosc.BITSHUFFLE)
recording_good_channels.save(format="zarr", folder=zarr_path, compressor=compressor, **job_kwargs)
and when i read the zarr file using:
se.read_zarr, the channel locations are missing!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the zarr serialization used by recording_good_channels.save(format="zarr") and the corresponding se.read_zarr path, using the provided probe and channel-location calls as the reproduction. Check whether channel locations survive saving and reloading, and verify that the reloaded recording returns the same locations from get_channel_locations().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100