LorenFrankLab / spyglass

Neuroscience data analysis framework for reproducible research built by Loren Frank Lab at UCSF
https://lorenfranklab.github.io/spyglass/
MIT License
94 stars 42 forks source link

Import spikeinterface.sortingcomponents fxns one by one #222

Closed acomrie closed 2 years ago

acomrie commented 2 years ago

Looks like spikeinterface has removed imports from sortingcomponents __init__.py. In our own spyglass spikesorting_sorting.py we import spikeinterface.sortingcomponents as scp to be able to access scp.detect_peaks, but we will now need to import detect_peaks specifically, as it won't be available from our current import.

I think this change on the spikeinterface end occurred between 0.94.0.dev0 and the 0.94.0 tagged release - see this commit for more https://github.com/SpikeInterface/spikeinterface/commit/2a96058f0206f88686973174b02fab4195b84356.

khl02007 commented 2 years ago

@acomrie thanks for reporting this. would you like to try to fix it? seems like we can just replace the import line with from spikeinterface.sortingcomponents.peak_detection import detect_peaks and then remove scp from scp.detect_peaks

acomrie commented 2 years ago

I already made the fix and submitted the PR earlier this morning when submitting the issue - it is just waiting for review. Feel free to review it @khl02007 ; I had only requested Eric as reviewer because peak detection is used in the clusterless part of the code.

khl02007 commented 2 years ago

thanks, merged