Coder Social home page Coder Social logo

Comments (8)

lukebun avatar lukebun commented on July 17, 2024 1

from bombcell.

Julie-Fabre avatar Julie-Fabre commented on July 17, 2024

Hi Luke,

Thanks for your message!
I've never seen that before. Which version of kilosort are you using? It doesn't make much sense to me that unit could have spikes times and no template waveform. Just to be sure of what's going on:

  • Do you get the error in the bc_waveformShape function?
  • What is the unit in question's maximum channel (qMetric.maxChannels(thisUnit)) ?

If a unit has no template waveform, it should be discarded. A try / catch statement will correctly handle this case, but I prefer to handle the specific issue (ie not computing the quality metrics if there is no waveform) because try/catch statements can mask some bugs and make it harder to troubleshoot.
I can add a check to only select units with waveforms before running bombcell's main loop, and then I suggest you pull that code or implement a similar change rather than having a try / catch statement.

Thanks again! Cheers,
Julie

from bombcell.

lukebun avatar lukebun commented on July 17, 2024

Hi Julie,

I am using Kilosort 2.5. This unit does inexplicably have spikes assigned to it. I am also befuddled. I also reran Kilosort but it made the same NaN template.

  • Yes, the error is in bc_waveformShape. Specifically, line 103 "if max_waveform_value(end) > 0." Because max_waveform_value is a 1x0 empty array, it can't index into it.
  • The maximum channel of the unit is 1.

Thank you,
Luke

from bombcell.

Julie-Fabre avatar Julie-Fabre commented on July 17, 2024

How odd! I will modify bombcell to handle this special case. If you can, it might be useful to raise a github issue for Kilosort 2.5. This doesn't sound like normal behavior.

from bombcell.

Julie-Fabre avatar Julie-Fabre commented on July 17, 2024

Hi Luke,
I've created a branch to deal with waveforms that contain NaNs. By default, any of these units will not be classified (since it does not make any sense for waveforms to be NaNs). Here is the branch: https://github.com/Julie-Fabre/bombcell/tree/waveform_nans
Let me know if you run into any issues.
Have you had any luck figuring out what's going on in kilosort to create waveforms that are all NaNs?

from bombcell.

lukebun avatar lukebun commented on July 17, 2024

Hi Julie,

Thank you so much!

As for the Kilosort side, I found another user who get all NaN templates in the Kilosort Issues. Unfortunately, the source of their problems seems entirely different than mine. I had intended to ask Nick Steinmetz about possible causes in person, but I didn't have the time during the meeting. So I've just raised an issue on the Kilosort page.

from bombcell.

Julie-Fabre avatar Julie-Fabre commented on July 17, 2024

That sounds good! Let me know if you figure it out, I am curious as to what is going on.

from bombcell.

Julie-Fabre avatar Julie-Fabre commented on July 17, 2024

Hi Luke,
Someone else has run into the same issues as you (github issue #60) and I have integrated changes in the main branch to deal with these abnormal waveforms. You should be able to change back to this branch and be able to get any recent updates and feature upgrades.
I'm still confused about why kilosort is outputing these waveforms, but at least bombcell now handles it by default!

from bombcell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.