MouseLand / Kilosort

Fast spike sorting with drift correction
https://kilosort.readthedocs.io/en/latest/
GNU General Public License v3.0
478 stars 248 forks source link

features view cannot load it phy. #317

Closed WeissShahaf closed 8 months ago

WeissShahaf commented 3 years ago

features view cannot load it Phy. it did for KS 2.5

aarac commented 3 years ago

Yes, I had the same issue. Is it a "save for phy" issue where pc_features.npy file is not saved?

rajatsaxena commented 3 years ago

In the final_clustering routine in the main_kilosort script, I noticed that

rez1.cProj = [];
rez1.iNeigh = [];
rez1.cProjPC = [];
rez1.iNeighPC = [];

rez1then gets returned as rez.

rezToPhy2 (used to store output to Phy format) skips storing feature related npy cause it is empty.

marius10p commented 3 years ago

I know, it's because the clustering is done very differently now. The feature view is going to come back in an upgrade, soon ish.

lshaheen commented 3 years ago

Without this view, how do you verify that the spike sorting algorithm worked well? One of the main criteria we use is to look at a histogram of cProj or a scatter plot vs time. If these views look cut off it means there are some low-amplitude spikes that got missed, so it's not a single unit. Also useful for seeing if two clusters are too similar.

Thanks for all your work on this by the way, an awesome tool!

metmic commented 3 years ago

Hi Marius, great work overall. However, is there any timeline when the feature view is coming back for kilosort 3 anytime soon? I am very much relying on this during curation in phy. For now I still have to use KS 2, because KS 2.5 always gives me an assertion error. My NPIX recordings contain lots of internal high frequency noise, so I preprocess the data prior to loading it into KS (band pass filtering, setting those channels that don't show spiking activity to NaN). Thanks

WeissShahaf commented 3 years ago

any news on when we can expect to see PC features for phy again?

i'm getting 4-5 good units, and 100 mua's that i cannot split because i have no PCA space to do it in.

thanks, shahaf

pabloslash commented 2 years ago

Any updates on this feature? Very much needed. Thanks!

nataliekoh commented 2 years ago

Bump! Any updates on this?

WeissShahaf commented 2 years ago

Kilosort no longer uses the features. But u could compute them yourself from the raw data, given the timestamps of the spikes. Then format it so phy can read it.

I'd be happy to know if anyone already has a script for that.

Shahaf Weiss, PhD

Max Planck Institute for Brain Research

NSK - Laurent department Max-von-Laue-Str. 4 60438 Frankfurt am Main, Germany www.brain.mpg.de

@.***

@.***

Tel:+49 17657814689

On Fri, Oct 21, 2022, 21:33 Natalie Koh @.***> wrote:

Bump! Any updates on this?

— Reply to this email directly, view it on GitHub https://github.com/MouseLand/Kilosort/issues/317#issuecomment-1287360743, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK4J42GMWJ6EQV3JWRZQWY3WELVZNANCNFSM4W6MEN5A . You are receiving this because you authored the thread.Message ID: @.***>

tianw6 commented 1 year ago

Before you run phy template-gui params.py to open the gui, run phy extract-waveforms params.py. Then phy can open feature view. (It worked on my Kilosort3)

moscraciunxxx commented 1 year ago

@tianw6 - that was a nice suggestion!