Closed qian-chu closed 6 months ago
Hi Qian Chu, I think it's doable with the condition you just listed. Maybe a class method that does something like this
tsgroup = nap.TsGroup.join_group_set([tsgroup1, tsgroup2, tsgroup3])
Maybe this class method can be called by a simple method of TsGroup like this as well.
tsgroup = tsgroup1.join(tsgroup2)
In general I like to provide multiple ways of doing the same thing in pynapple. I noticed people have different intuition about how the package should behave.
Happy to review a PR.
Solved in #275
In quite a few scenarios one may want to merge some TsGroup (e.g. adding new neurons, merging PETH from different runs, etc.) but currently TsGroup is non-mutable: https://github.com/pynapple-org/pynapple/blob/ea603577767e2117c7afdaac4edf800fae4bf6ce/pynapple/core/ts_group.py#L149-L151 Maybe we can add a method that takes two TsGroups and returns a new TsGroup when the following conditions are met:
Happy to initiate a pull request if people see a need for this.