-
Notifications
You must be signed in to change notification settings - Fork 256
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
Output filtered .dat for phy #223
Comments
You understand correctly, the filtered binary file is not meant to contain a continuous range of time samples. It is instead a concatenation of batches, each of which has it's own buffers on the ends. |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
I apologize if this has been asked before (I could not find it searching the Issues).
I'm trying to output the pre-processed (band-pass and CAR filtered) recordings out of the preprocessDataSub.m code so that they can be viewed in phy during single unit curation.
I've narrowed the problem down to the offset buffers before filtering (Screenshot 1 below; red marking). Below I show cases of a single run of Kilosort and post-hoc filtered data extractions. Meaning, for debugging purposes, I ran Kilosort on these data only once (with the offset buffer code), and created a separate code to output the filtered data. To read it in phy, I simply changed params.py to read the new files.
![image](https://user-images.githubusercontent.com/7768262/90523856-5d213980-e13b-11ea-994d-d34f512cfbdf.png)
Screenshot 1:
When I comment out the buffer code (red markings) before filtering, I can output a filtered file (with filtering artifacts, obviously) that aligns perfectly with the timestamps resulting from the original Kilosort run (screenshot 2 below). The waveforms are the same as when reading the unfiltered data on phy.
![image](https://user-images.githubusercontent.com/7768262/90522380-a3759900-e139-11ea-801b-124989765271.png)
Screenshot 2:
Simply re-adding the offset buffer code back before the filtering will completely wipe out the spikes picked out by the previous run of Kilosort (screenshot 3 below). The raw recording as evidenced by the TraceView also seems to be off as if the offset buffers were not removed correctly before writing to file.
![image](https://user-images.githubusercontent.com/7768262/90525876-bd18df80-e13d-11ea-9a54-db8f8fd4b791.png)
Screenshot 3:
Let me know if you need any more info. Any input on how to solve this would be greatly appreciated.
PS: Kilosort is fantastic and I very much appreciate all your work.
Thank you!
Matheus Macedo-Lima
The text was updated successfully, but these errors were encountered: