-
Notifications
You must be signed in to change notification settings - Fork 216
basesorting.py get_spike_trains
method
#3946
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
base: main
Are you sure you want to change the base?
Conversation
convienient function to get spike trains of all units as dict
for more information, see https://pre-commit.ci
Hey @pas-calc , I think this is a great idea! I suspect there will be some debate about how to implement this. Just to note: there's another way to do this as follows: spike_trains_samples = si.spike_vector_to_spike_trains(sorting.to_spike_vector(concatenated=False), unit_ids=sort.unit_ids)
# go from sample index to seconds
spike_trains = {segment_id : {unit_id: spike_train/sorting.sampling_frequency for unit_id, spike_train in spike_trains_s\
egment.items()} for segment_id, spike_trains_segment in spike_trains_samples.items()}
I would also vote to call it |
The spikeinterface/src/spikeinterface/core/basesorting.py Lines 131 to 174 in 2914abd
|
convienient function to get spike trains of all units as dict
an alternative method could be