You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking into the curation module and didn't quite get how to use the split function. Let's say I want to split my unit into 3. To do so I just have to properly define my indices_list and then I could just do as so: cs.split(unit_id, indices_list)
The class SplitUnitSorting is able to handle this, thanks to tot_splits = max([v.max() for v in indices_list]) + 1.
But then we are asserting assert len(new_unit_ids) <= tot_splits, and new_unit_ids is defined in the CurationSorting class :
Therefore even if do properly my list, there will always be only 2 new_unit_ids.
Would solve it doing new_unit_ids = self._get_unused_id(max(np.unique(indices_list))) but I am not sure weither this should be changed or if I am not doing it the proper way.
Thanks !
The text was updated successfully, but these errors were encountered:
OlivierPeron
changed the title
Split function use
Split function and new_unit_ids definition
Apr 10, 2024
Ok !
I don't think using the len of indices_list is the way to go as its len is the number of segments in the recording, and for each segment we have an array as big as the unit's spike train.
In the SplitUnitSorting class, the proper calculation is done I think: tot_splits = max([v.max() for v in indices_list]) + 1
Then we would just have to do : new_unit_ids = self._get_unused_id(tot_splits)
and this way we could get rid of the assertion line 52 of the SplitUnitSorting class: assert len(new_unit_ids) <= tot_splits, "indices_list has more id indices than the length of new_unit_ids"
as this way we would have len(new_unit_ids) == tot_splits.
Hi !
I was looking into the curation module and didn't quite get how to use the split function. Let's say I want to split my unit into 3. To do so I just have to properly define my
indices_list
and then I could just do as so:cs.split(unit_id, indices_list)
The class
SplitUnitSorting
is able to handle this, thanks totot_splits = max([v.max() for v in indices_list]) + 1
.But then we are asserting
assert len(new_unit_ids) <= tot_splits
, andnew_unit_ids
is defined in theCurationSorting
class :Therefore even if do properly my list, there will always be only 2
new_unit_ids
.Would solve it doing
new_unit_ids = self._get_unused_id(max(np.unique(indices_list)))
but I am not sure weither this should be changed or if I am not doing it the proper way.Thanks !
The text was updated successfully, but these errors were encountered: