Open timsainb opened 1 year ago
Hi Tim,
you are back! This is a good news.
run_kilosort3()
should be replace by run_sorter('kilosort3', ...)
This is weird! I huess you working wit the latest rouse. Can you tell us how you compute recording_cmr ?
Hey Sam! Yes I'm back doing ephys again after working in just behavior for a while.
Here is how I computte recording _cmr
recording = se.read_openephys(folder_path=sort_path, block_index=0)
recording = recording.set_probe(probe, group_mode='by_shank')
# bandpass filter
recording_f = spre.bandpass_filter(
recording_clean, freq_min=freq_min, freq_max=freq_max
)
# common average reference
recording_cmr = spre.common_reference(
recording_f, reference="global", operator="median", groups=channel_shanks
)
And if set groups to None in common_reference, I get rid of the error.
I am unable to reproduce this error:
from spikeinterface.core import generate_ground_truth_recording
import spikeinterface.preprocessing as spre
from spikeinterface.sorters import run_sorter
recording, sorting_orignal = generate_ground_truth_recording(num_channels=384, durations=[10.0])
channel_ids = [str(channel_id) for channel_id in recording.get_channel_ids()]
recording = recording.rename_channels(new_channel_ids=channel_ids)
# bandpass filter
recording_f = spre.bandpass_filter(
recording,
)
groups = [channel_ids[:-10], channel_ids[-10:]]
recording_cmr = spre.common_reference(
recording_f, reference="global", operator="median", groups=groups
)
sorting = run_sorter(sorter_name="kilosort3", remove_existing_folder=True, recording=recording_cmr, folder="test_kilosort3", verbose=True, docker_image=True)
I think it might have been solved by some changes we did to crm.
Could you test it again @timsainb ? If there is no reponse we should close this in a month or so.
I get the following error:
What's happening is that _main_ids is
['CH5', 'CH6', 'CH7', 'CH8', 'CH10', 'CH12', 'CH13', 'CH14', 'CH15', 'CH16', 'CH17', 'CH18', 'CH19', 'CH20', 'CH22', 'CH24', 'CH25', 'CH26', 'CH27', 'CH28', 'CH29', 'CH30', 'CH31', 'CH32', 'CH33', 'CH34', 'CH35', 'CH36', 'CH37', 'CH38', 'CH39', 'CH40', 'CH41', 'CH42', 'CH43', 'CH44', 'CH45', 'CH46', 'CH47', 'CH48', 'CH49', 'CH50', 'CH51', 'CH52', 'CH53', 'CH54', 'CH55', 'CH56', 'CH57', 'CH58', 'CH59', 'CH60', 'CH61', 'CH62', 'CH63', 'CH64']
while ids is:
[5, 6, 7, 8, 9, 20, 22, 23, 38, 39, 50, 51, 52, 53, 54, 55]
So, 5 is not in _main_ids, because earlier on ids has already been converted to indices.
The groups are already saved as indices in
spikeinterface_recording.json