Repository navigation
Conversation
|
Review these changes at https://app.gitnotebooks.com/siplab-gt/cleo/pull/70 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes two issues in Cleo’s electrophysiology signals: (1) spiking signals now behave correctly when a probe records zero neurons, and (2) RWSLFPSignalFromPSCs can correctly receive (or enforce) a sampling period, including via injection kwargs.
Changes:
- Initialize spiking signal internal state so
get_state()works even when no neurons meet recording criteria. - Plumb
sample_period(and other injection kwargs) through toRWSLFPSignalFromPSCsbuffer-length computation and raise a more specific error when missing. - Add/extend tests covering the “no neurons recorded” spiking case and the missing/explicit sampling period behavior for PSC-based RWSLFP.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/ephys/test_spiking.py | Adds a regression test ensuring spiking signals stay empty/consistent when no neurons are recordable. |
| tests/ephys/test_lfp.py | Updates test helper to pass injection kwargs and adds coverage for missing sample_period error path. |
| cleo/ephys/spiking.py | Ensures spiking signals initialize required internal fields even when zero neurons are recorded; handles None return in SortedSpiking. |
| cleo/ephys/lfp.py | Passes injection kwargs into buffer-length computation and raises RuntimeError when sampling period cannot be determined. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
369
to
373
| Iampa_var_names=["Iampa1"], | ||
| Igaba_var_names=["Igaba1"], | ||
| name=None, | ||
| inject_kwargs={}, | ||
| ): |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.