-
Notifications
You must be signed in to change notification settings - Fork 242
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
Kilosort used to raise one of these errors every run: Err2: ValueError: Found array with 0 sample(s) (shape=(0, 61)) while a minimum of 1 is required by TruncatedSVD. #776
Comments
Which version of Kilosort4 are you using? Can you please upload |
The same error for different data exists in this Log file |
I don't know which one but I think I am using the last version v4.0.15 because I installed it before a week |
@NadaRayann You're probably getting errors because your probe layout is not in the expected format. Values for 'xc' and 'yc' should be specified in microns. You probably need to swap 'xc' and 'yc' as well, currently it's a group of individual channels all at the same depth rather than multiple channels on a single shank. If that's how your probe is actually laid out, you should still swap so that 'xc' values are constant while 'yc' is changing for better processing. You can space 'yc' ~100 microns apart in that case so make sure the channels are still treated separately. |
If you still run into problems after changing the probe layout, please upload a screenshot of what the KS4 GUI looks like after loading your data. |
According to our electrode that we used in our experiment as I mentioned above we use a part of the data in Kilosort. The data is attached as a text file with its visualization. |
@jacobpennington Hi, we tried adjusting the ycoords and xcoords parameters, but we are still receiving the same error. |
@Sana-Alshboul Kilosort does not support 3D coordinates. However, with contacts spaced that far apart the geometry won't matter anyway. You can just list the contacts as if they were on a single shank, like:
|
@danafarah Please upload a screenshot of what the KS4 GUI looks like after loading the data, and the new |
@jacobpennington Thanks for answering. but still I got this error: File ~\AppData\Local\anaconda3\envs\kilosort\Lib\site-packages\sklearn\utils\validation.py:1087 in check_array ValueError: Found array with 0 sample(s) (shape=(0, 61)) while a minimum of 1 is required by TruncatedSVD.This is the log file: |
Can you please upload a screenshot of what the KS4 GUI looks like after loading your data? |
The KS4 GUI is empty after loading the data because I got this message in the message log box: Traceback (most recent call last): File "C:\Users\l.lahham\AppData\Local\anaconda3\envs\kilosort\Lib\site-packages\kilosort\gui\sorter.py", line 47, in run if not results_dir.exists(): ^ AttributeError |
The first thing you should try is clicking "Reset GUI" to set all parameters to their defaults, then only change the things that you have to for your data (like number of channels and sampling frequency). For example, Th (universal) is set to 100, which will almost certainly result in no spikes ever being detected. |
The following image shows the heatmap of the data. I know it is not correct because the power spectrum shows as diagonal line because number of channels doesn't match the data. But i am sure that the entered number of channels is correct because they are 5 and i visualized the binary file for 5 channels as shown in the previous comments. |
I don't see anything indicating that the number of channels is incorrect. Clicking on "whitened" at the bottom-right of the heatmap will give you a better view of the data, though, since that will show the filtered and whitened version. I would recommend trying the sorting again with |
@jacobpennington I doute in generating the binary file, can you please check if the binary file that i use obeys the Kilosort rules. |
@jacobpennington Please take a look on the previous comment as soon as possible |
@Sana-Alshboul @NadaRayann @danafarah if you work for alpha-omega, I hope you are aware of Kilosort's licensing terms. |
@marius10p Thank you in advance. |
@jacobpennington Could you please check the last answer? |
The Kilosort4 paper includes contact information. The github repository contains the license. |
Describe the issue:
I used to get one of these errors when running Kilosort4 using the following code:
Err1- ValueError: n_samples=4 should be >= n_clusters=6.
Err2: ValueError: Found array with 0 sample(s) (shape=(0, 61)) while a minimum of 1 is required by TruncatedSVD.
#The attached image shows the channel map
#The attached text file contains the data that is converted to binary to be used in the algorithm
The realDataMap4.bin file contains data of size (9X 6609993)
Map4NewStruct.txt
Reproduce the bug:
Error message:
Version information:
versions of:
Kilosort 4
Python 3.12.4
Windows10
Cuda toolKit 12.6
The text was updated successfully, but these errors were encountered: