Skip to content
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

BUG: Hard-coded value for filter length? #857

Open
nikhilchandra opened this issue Jan 23, 2025 · 2 comments
Open

BUG: Hard-coded value for filter length? #857

nikhilchandra opened this issue Jan 23, 2025 · 2 comments

Comments

@nikhilchandra
Copy link

Describe the issue:

The function kilosort.preprocessing.get_highpass_filter includes the following lines:

def get_highpass_filter(fs=30000, cutoff=300, device=torch.device('cuda')):
"""Filter to use for high-pass filtering."""
NT = 30122

What is the origin of the value 30122? This looks like 30000 + 61 * 2 to me, which would be the Neuropixels sampling rate + 2*(default spike width of 61 samples).. But what if I am using a different sampling rate and spike width? For example, Plexon equipment records data at 40 kHz. Forgive me if I am mistaken, but would this be a problem here?

Reproduce the bug:

Error message:

Version information:

N/A -- just looking through the code

@jacobpennington
Copy link
Collaborator

That is where the value comes from, but it's not a problem to use the same filter length for different sampling rates and spike widths for that step in the pipeline.

@nikhilchandra
Copy link
Author

Okay, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants