Skip to content

Conversation

@sharon-chiang
Copy link

…ne raises exception if electrode 0 is set to reference)

Description

Please include a summary of the changes and the related issue. Please also
include relevant motivation and context. Please list issues fixed or closed by
This PR.

`/home/sc4712/src/spyglass/src/spyglass/spikesorting/utils.py': Currently li 79 of function get_group_by_shank reads 'if not sort_ref_id', which results in raising an exception if trying to set reference electrode to the 0th electrode.

Alter notes:
if references:
sort_ref_id = references.get(e_group, None)
if sort_ref_id is None: ##### this line was changed to not result in raising an exception if sort_ref_id is set to 0 (the 0th electrode)
raise Exception(
f"electrode group {e_group} not a key in "
+ "references, so cannot set reference"
)

Checklist:

  • If this PR should be accompanied by a release, I have updated the CITATION.cff
  • If this PR edits table definitions, I have included an alter snippet for release notes.
  • If this PR makes changes to position, I ran the relevant tests locally.
  • If this PR makes user-facing changes, I have added/edited docs/notebooks to reflect the changes
  • I have updated the CHANGELOG.md with PR number and description.

…ne raises exception if electrode 0 is set to reference)
@sharon-chiang sharon-chiang marked this pull request as draft November 11, 2025 09:17
@sharon-chiang sharon-chiang marked this pull request as ready for review November 11, 2025 09:18
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

Successfully merging this pull request may close these issues.

1 participant