Skip to content

Slay: discard duplicates with censor_period_ms in computing RP violations#4530

Draft
alejoe91 wants to merge 29 commits intoSpikeInterface:mainfrom
alejoe91:slay-discard-duplicates
Draft

Slay: discard duplicates with censor_period_ms in computing RP violations#4530
alejoe91 wants to merge 29 commits intoSpikeInterface:mainfrom
alejoe91:slay-discard-duplicates

Conversation

@alejoe91
Copy link
Copy Markdown
Member

fixes #4498

TODO:

  • Add tests

@alejoe91 alejoe91 added the curation Related to curation module label Apr 17, 2026
Comment on lines +1693 to +1698
merged_acg = (
ccgs[unit_index_1, unit_index_1, :]
+ ccgs[unit_index_2, unit_index_2, :]
+ ccgs[unit_index_1, unit_index_2, :]
+ ccgs[unit_index_2, unit_index_1, :]
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is right. merged_acg later passed to _sliding_RP_viol_pair, a port of the SLAy function _sliding_RP_viol, used here:

https://github.com/saikoukunt/SLAy/blob/c3ab445f264049d4da06ca7d0835018634888cce/src/slay/stages.py#L395

In SLAy, x_correlogram computes the cross-correlogram of two units.

This changes the input to be the auto-correlogram of the putative merge.

},
"quality_score": {"firing_contamination_balance": 1.5, "refractory_period_ms": 1.0, "censored_period_ms": 0.3},
"slay_score": {"k1": 0.25, "k2": 1, "slay_threshold": 0.5},
"slay_score": {"k1": 0.25, "k2": 1, "slay_threshold": 0.5, "censored_period_ms": 0.2},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm against changing the default behavior without consulting the SLAy team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

curation Related to curation module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate spikes should be removed before SLAy refractory period penalty calculated

2 participants