Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] time_histogram handles single neo.SpikeTrain #650

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Moritz-Alexander-Kern
Copy link
Member

This pull request addresses issue #648 by updating the statistics.time_histogram function to accept a single neo.SpikeTrain object as input.

Previously, the function was limited to handling lists of spike trains, which led to incorrect results when a single spike train was provided. This enhancement ensures that the function now correctly computes the time histogram for both single and multiple spike trains.

Changes

  • Modified the time_histogram function to handle a single neo.SpikeTrain input.
  • The documentation has been updated to reflect this new capability. It now clearly states that the function can accept both a list of spike trains and a single spike train.
  • Added a regression test to ensure that the functionality works as intended for both single and multiple spike trains.
  • Added type hints to time_histogram
  • Removed copy parameter when creating pq.Quantity object

@Moritz-Alexander-Kern Moritz-Alexander-Kern added the enhancement Editing an existing module, improving something label Nov 19, 2024
@coveralls
Copy link
Collaborator

coveralls commented Nov 19, 2024

Coverage Status

coverage: 88.257% (-0.1%) from 88.401%
when pulling 9c06d0d on INM-6:fix/time_histogram_648
into 123ca04 on NeuralEnsemble:master.

@Moritz-Alexander-Kern Moritz-Alexander-Kern added this to the v1.2.0 milestone Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Editing an existing module, improving something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Incorrect Output in time_histogram for Single Unit Spike Train with output='rate'
2 participants