Coder Social home page Coder Social logo

Comments (4)

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

Hi Chrisan,

Bombcell uses pc_feature_ind to define the uniqueIDs and currentID. (see line 39: uniqueIDs = unique(pc_feature_ind(:, 1));). pc_feature_ind stores the kilosort output file pc_feature_ind.npy, and is in the format [nTemplates × nPCFeatures].
I think you might have gotten confused with pc_feature that stores the kilosort output file pc_feature.npy and is in the format [nSpikes × nFeaturesPerChannel × nPCFeatures].

from bombcell.

chrisan97 avatar chrisan97 commented on July 17, 2024

Hi Julie,

Thanks for the response. I think my confusion is coming from the description of these .npy files on the phy website.

It says here: pc_features.npy - [nSpikes, nFeaturesPerChannel, nPCFeatures] single matrix giving the PC values for each spike. The channels that those features came from are specified in pc_features_ind.npy. E.g. the value at pc_features[123, 1, 5] is the projection of the 123rd spike onto the 1st PC on the channel given by pc_feature_ind[5].

Since pc_feature.npy is [nSpikes x nFeaturesPerChannel x nPCFeatures] (in my case this is nSpikes x 3 x 32) and pc_feature_ind.npy is [nTemplates x nPCFeatures] (in my case this is nTemplates x 32), I thought each row of pc_feature_ind corresponds to each cluster in phy in which the columns represents the channel locations where the nPCFeatures in pc_feature.npy is from. Is this interpretation correct?

If the above is true, I thought you would want to skip over the matching channels by doing this, but then in which currentID is the unit cluster # In my understanding uniqueIDs is equivalent to the peak channel of the unit and so here we would be checking the unit cluster # with the channel position... which didn't make sense to me.

currentID = uniqueIDs(iID);

    % Skip if current ID matches the unit of interest
    if currentID == thisUnit
        continue;
    end

I think here you want to take out any rows from pc_feature_ind that holds the channel positions for thisUnit right?

Please let me know if my explanation doesn't make sense, I can try to provide some specific examples as to why I think this way. Thanks!!

Chris

from bombcell.

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

Oh yes, sorry! You're absolutely right, I got confused there myself. Indeed, that part of the code was wrong (!!) - it probably never got spotted because it isn't used or encouraged. It should be fixed now. Thank you very much for bringing it up.

btw - if you set param.plotDetails to 1 (do this only for one or a couple units a time in the for loop, otherwise you will get way too many plots for matlab to handle) you can take a look at plots of the metrics for each unit, including the distance metrics.

from bombcell.

chrisan97 avatar chrisan97 commented on July 17, 2024

Cool :) glad the issue is fixed now. Thanks for the tip about the plotting!

Chris

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.