Advice for reducing false positives from LUPIN?

Đang mở
#4,824 4 bình luận 0 reaction 2 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@yger đang làm issue này rồi.

Từ ngày 6/10/2026.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
data

Hướng nghiên cứu

Start by reproducing the false positives with the stricter detection, SNR, and jitter settings described in the issue, comparing sorter output with Phy and bombcell. Then inspect the OMP matching logic in src/spikeinterface/sortingcomponents/matching/circus.py around line 415, including the cond_1 and amplitude bounds. Done means identifying a supported cause or producing a justified parameter or algorithm change.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

question sorters

Hi all — I'm doing some recordings from a very quiet part of the midbrain, and testing out LUPIN vs. KS4. They seem to detect similar "good" units (as assessed by bombcell -> scmp.compare_two_sorters) which feels good. However, they differ quite a bit in MUA. KS4 seems to be over-merging spikes into large multi-unit clusters with unreasonably high firing rates (> 100 Hz, when the "good" units nearby are more like 5-20 Hz). Lupin seems to be doing better at identifying "multi-unit" clusters that are, in fact, almost single units, but which, due to some combination of low firing rates + moderate noise from chronic recordings in freely moving animals (~30-40 uV ptp), are still somewhat contaminated.

Here's an example of Lupin's output with the default settings:
Image

I exported some of my data to Phy to look more closely at what's going on with all these multi-units. (I pre-processed the exported traces the same as the ones I used for sorting, excluding whitening.) I noticed that a lot of the "spikes" in the multi-unit clusters didn't really look like spikes at all, and were in fact just noise. So I tried using slightly more stringent parameters for initial spike detection and cleaning:

"detect_threshold": 6.0,  # default is 5
"template_min_snr_ptp": 5.0,  # default is 4 
"template_max_jitter_ms": 0.1,  # default is 0.2

This did help a bit, both to reduce the number of MUA units and it made the traces look a bit more realistic on Phy.

Image

However, some of the "spikes" in the data are still very unconvincing. Here are two screen recordings from two random units I picked to look at in Phy from this second, more stringent round of sorting:

https://github.com/user-attachments/assets/b99359b1-6a0a-46a4-954c-9ffee9dcc296

https://github.com/user-attachments/assets/8a7f7ce9-e215-454b-9556-76f05d0adaf1

Sometimes it seems like there are noise fluctuations that could conceivably be mistaken for spikes, but in other instances, I really can't see what the sorter was seeing (maybe looking at the whitened traces would be informative..?).

I'm going to additionally try making template_radius_um and template_sparsify_threshold a bit more stringent, so that there's fewer low-SNR channels in each template, but I don't expect that to fully solve the problem.

I was also thinking of looking at the following in the OMP template matching step, since that's the step where the output spike times are actually calculated:

Let me know if you all have other ideas or thoughts about a different way to proceed. Thanks!

Ngôn ngữ chính
Python
Star
883
Fork
291
Merge trung bình
3 ngày 17 giờ
Pull request đã merge (30 ngày)
40

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SpikeInterface/spikeinterface

Tất cả issue của SpikeInterface/spikeinterface

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.