-
Notifications
You must be signed in to change notification settings - Fork 230
Description
Dear Spikeinterface community
I was hoping to correct drift/motion and run spike sorting shank by shank for our 4-shank probe. I followed this tutorial and was able to run those analysis. However, when I called the function to aggregate those object together, I bumped into this error.
Traceback (most recent call last):
File "", line 1, in
File "c:\Users\einat\anaconda3\envs\spike_interface\lib\site-packages\spikeinterface\core\channelsaggregationrecording.py", line 217, in aggregate_channels
return ChannelsAggregationRecording(recording_list, renamed_channel_ids)
File "c:\Users\einat\anaconda3\envs\spike_interface\lib\site-packages\spikeinterface\core\channelsaggregationrecording.py", line 20, in init
self._perform_consistency_checks()
File "c:\Users\einat\anaconda3\envs\spike_interface\lib\site-packages\spikeinterface\core\channelsaggregationrecording.py", line 104, in _perform_consistency_checks
sampling_frequencies = [rec.get_sampling_frequency() for rec in self.recordings]
File "c:\Users\einat\anaconda3\envs\spike_interface\lib\site-packages\spikeinterface\core\channelsaggregationrecording.py", line 104, in
sampling_frequencies = [rec.get_sampling_frequency() for rec in self.recordings]
AttributeError: 'numpy.int64' object has no attribute 'get_sampling_frequency'
I have tried to change the class type into float32 but still received the same error. Does anyone know how to fix this?
Below is the code I used:
raw_rec = se.read_openephys(oe_folder, load_sync_timestamps=True)
fs = raw_rec.get_sampling_frequency()
stacked_probes = pi.read_probeinterface("H10_stacked_probes.json")
probe = stacked_probes.probes[0]
raw_rec = raw_rec.set_probe(probe,group_mode='by_shank')
probe_rec = raw_rec.get_probe()
probe_rec.to_dataframe(complete=True).loc[
raw_rec = spre.astype(raw_rec, "float32")
raw_rec_dict = raw_rec.split_by(property='group', outputs='dict')
recording_corrected = si.aggregate_channels(raw_rec_dict)
And here is what I have in the raw_rec_dict
{0: ChannelSliceRecording: 32 channels - 30.0kHz - 1 segments - 25,237,540 samples
...(14.02 minutes) - float32 dtype - 3.01 GiB, 1: ChannelSliceRecording: 32 channels - 30.0kHz - 1 segments - 25,237,540 samples
...(14.02 minutes) - float32 dtype - 3.01 GiB, 2: ChannelSliceRecording: 32 channels - 30.0kHz - 1 segments - 25,237,540 samples
...(14.02 minutes) - float32 dtype - 3.01 GiB, 3: ChannelSliceRecording: 32 channels - 30.0kHz - 1 segments - 25,237,540 samples
...(14.02 minutes) - float32 dtype - 3.01 GiB}
Operation System: Windows 11, spikeinterface 0.102.1 and 0.101.2 under python 3.10
In case it is my probe being too complicated. I have attached the probe info here