Repository navigation
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@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.
spike_triggered_phaseaccepts a SpikeTrain and ignores spikes outside the Hilbert signal interval. If the train is empty or has no overlapping spikes, result conversion readsentry[0].unitson an empty list and raisesIndexError.Take amplitude units from the owning Hilbert signal and time units from the owning SpikeTrain instead. Empty outputs then retain their correct units. Phase, interpolation and index-selection math are unchanged.
Two new regression methods cover six cases: empty and out-of-interval trains with interpolation on/off, plus shared/paired signals with mixed populated and empty trials and different units. Original runtime raises
IndexErrorin all six cases. On a fresh isolated snapshot at86add3b5eb10a74bcedd7c298691db433f33e0dc, this patch passes 21 selected offline methods acrossSpikeTriggeredPhaseTestCase,MeanVectorTestCase,PhaseDifferenceTestCase, andPhaseLockingValueTestCase. All 189 unchanged files were Git-blob verified. The third changed file adds my name to the author list.WeightedPhaseLagIndexTestCasewas not run because its class setup downloads three unrelated external fixtures. A pre-existing E127 style finding outside the changed lines remains. Full-project CI, other platforms, independent QA and real-neural-data validation are not claimed.Linux CPython 3.10.12, NumPy 2.2.6, SciPy 1.15.3, Neo 0.14.6, Quantities 0.16.4. Prepared and tested with AI assistance. Independent of the spectral normalization, SNR, zscore and wavelet candidates.