cortex-lab / cortex-lab/phylib
Single template
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 16
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I used spyking-circus to "sort" a single unit which gave me a single template.
I was having trouble to load this dataset into phy and I tracked down the problem to this line
https://github.com/cortex-lab/phylib/blob/3e4dfb9be8caead2d82b38c842b3fddbc84cf59a/phylib/io/model.py#L476
The problem arise because read_array returns an array of shape (1,91,4) and then the squeeze method changes it to just (91,4).
And then this line gives the error
https://github.com/cortex-lab/phylib/blob/3e4dfb9be8caead2d82b38c842b3fddbc84cf59a/phylib/io/model.py#L710
just after 'Loading templates' and 'Templates are sparse'
I tried exportingfrom spyking-circus to phy without sparse matrices and now it fails in this line
https://github.com/cortex-lab/phylib/blob/3e4dfb9be8caead2d82b38c842b3fddbc84cf59a/phylib/io/model.py#L434
after 'Loading the inverse of the whitening matrix.'
If I remove the 'squeze' I can load this dataset of only one template, and also I didn't have problems with any other dataset sorted with spyking-circus, but I can not load anymore datasets sorted with kilosort2.5.
With kilosort output it fails in this line, just after 'Start capturing exceptions'
https://github.com/cortex-lab/phylib/blob/3e4dfb9be8caead2d82b38c842b3fddbc84cf59a/phylib/io/model.py#L647
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the single-template and kilosort loading failures in phylib/io/model.py at the referenced lines 434, 476, 647, and 710. Compare the array shapes and loading paths for sparse and non-sparse exports; done means the reported datasets load successfully without breaking the existing template-loading cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100