-
Notifications
You must be signed in to change notification settings - Fork 213
calling aggregate_channels returned AttributeError #3806
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
Comments
Hi @chiyu1203 I think I know what's going on. We're currently updating how processing stuff by group is done. So we've just updated the The docs you're reading are for the dev verison of spikeinterface but your spikeinterface version is the "stable" version so you should read those docs (https://spikeinterface.readthedocs.io/en/stable/how_to/process_by_channel_group.html, NOT https://spikeinterface.readthedocs.io/en/latest/how_to/process_by_channel_group.html). So you can either download the latest spikeinterface version (which will allow you to pass a dictionary of recordings to aggregate channels) or read the docs from the the stable spikeinterface version and pass a list of recordings to aggregate channels. Hope that makes sense - let me know if it works. Sorry that you've got caught up in a dev-versus-stable conflict - they are very annoying, and this problem will vanish once do another release (hopefully very soon!). |
@chrishalcrow Thank you so much for the reply! I am really happy about this new feature. I have installed the dev verison of spikeinterface and can confirm that this fixed my problem.
I also bumped into a similar error when using
In this case, would you recommend that I use Manual splitting (loop over all preprocessed recordings) to run |
Haha @chiyu1203 you're finding all the edge cases I'm currently trying to fix!!! There are two preprocessing steps which aren't implemented like the others: motion correction and bad channel removal. We're in the middle of turning these into classes (for bad channel removal: #3685) and then you'll be able to pass dictionaries of recordings to them! We also need to add a For now, you need to do a manual splitting to correct motion, then aggregate at the end. I'll ping you once the new features are added! I'm tagging @alejoe91 @samuelgarcia so they see that there's high demand (well, some demand) for these features! |
Thanks, then I will let you close this issue! Yes, on one hand, I was hoping to do spike sorting for multi-shank probes just based on the position of channels on the probe map, without splitting channels shank by shank. On the other hand, thinking about that the physical distance between channels, across shanks is not as accurate as within shanks, it is a good idea to analyze the data shank by shank. These new features will certainly make things much easier and encourage researchers to take this approach! |
…t take dict as input. For more info: SpikeInterface/spikeinterface#3806
@chrishalcrow Your might have been working on this already, but just in case. I use Manual splitting (loop over all preprocessed recordings) to run correct motion, apply whitening and spike-sorting
Is this related to the sorter or the function (Actually, I tried the
|
Hi @chiyu1203 , that error looks like you're trying to apply aggregate_channels (which aggregates recordings) to a sorting object. You need to apply |
Hi @chrishalcrow, thank you for the quick response! I called that function but it returned this error.
I guessed that is because the function does not accept dict?! Then I played around the code inside But below is my code. Feel free to let me know if you have any thought (Spikeinterface version 0.102.2 built from source)
|
Sorry for keeping posting my problems again. But after I ran the abovementioned code to aggregate units, I tried to create an sorting_analyzer with units and channels being aggregated by their respective functions (
I bumped into this error
Is there any way to circumvent this issue? (spikeinterface-0.102.3, built from source) |
Hi @chiyu1203 , we merged a bug fix last night (#3829) so hopefully a new install from source should be bug free (or just |
Hi @chrishalcrow, thanks for quick response and the amazing merge! It worked! Also it seems that the new merge also fixed some kind of issues with |
That's great! Hoping to add dicts to save/sort very soon! Will let you know :) |
Thanks! Take your time! Actually I just realised that using |
just another quick note: it seems that |
Thanks very much - I've made a note :) This is one a bit trickier because it's a method (i.e. do you For now: I recommend doing a rec = si.load(...)
sliced_rec = rec.frame_slice(...)
dict_of_recs = sliced_rec.split_by('group')
# now do preprocessing steps |
That's exactly what happened! I built up the analysis pipeline based on the spiketutorial jupyter notebook last year, where frames are only sliced after filter+detect_bad_channels+common_reference (before saving preprocessed data).
|
Dear Spikeinterface community
I was hoping to correct drift/motion and run spike sorting shank by shank for our 4-shank probe. I followed this tutorial and was able to run those analysis. However, when I called the function to aggregate those object together, I bumped into this error.
I have tried to change the class type into float32 but still received the same error. Does anyone know how to fix this?
Below is the code I used:
And here is what I have in the raw_rec_dict
Operation System: Windows 11, spikeinterface 0.102.1 and 0.101.2 under python 3.10
In case it is my probe being too complicated. I have attached the probe info here
H10_stacked_probes.json
The text was updated successfully, but these errors were encountered: