Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

channel locations missing from zarr saved files #3688

Open
kshtjkumar opened this issue Feb 12, 2025 · 2 comments
Open

channel locations missing from zarr saved files #3688

kshtjkumar opened this issue Feb 12, 2025 · 2 comments
Labels
core Changes to core module

Comments

@kshtjkumar
Copy link

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!

@alejoe91
Copy link
Member

@kshtjkumar can you make sure you're using the latest spikeinterface version?

@alejoe91 alejoe91 added the core Changes to core module label Feb 13, 2025
@kshtjkumar
Copy link
Author

well I just upgraded! but i was wondering do i have to reconvert those to zarr files again ? or the new version's load analyser function will take care of the error ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Changes to core module
Projects
None yet
Development

No branches or pull requests

2 participants