-
Notifications
You must be signed in to change notification settings - Fork 92
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
[Fix] spike time tiling coefficient for unsorted spiketrains, added validation test #564
Conversation
This reverts commit c812f1c.
Hello @Moritz-Alexander-Kern! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2023-10-30 17:08:20 UTC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After pair programming review, the following was identified:
- new implementation was checked against pen and paper solution, based on the spike trains generated in the test setup. The validation test against the c implementation should check against this example as well.
- Adding a third spike train to the validation unit test would be good. For the existing validation unit test based on the regression test, it should be noted that this test has no overlaps between spikes -- therefore it tests for PA=PB=0.
- Additional comments for the new improved implementation and for the validation code calling the original c code would be nice.
Added this example to
Generated two spiketrains with: # Generate two spiketrains with different firing rates
np.random.seed(0)
spiketrain_5_hz = StationaryPoissonProcess(rate=5*pq.Hz, t_start=0*pq.ms, t_stop=5000*pq.ms, refractory_period=3*pq.ms).generate_spiketrain()
spiketrain_30_hz = StationaryPoissonProcess(rate=30*pq.Hz, t_start=0*pq.ms, t_stop=5000*pq.ms, refractory_period=3*pq.ms).generate_spiketrain() The STTC for this example using
Added comments for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build wheels
8bac14c
into
NeuralEnsemble:master
This is related to Issue #563 .
The example from the Issue now returns:
Previously, this function encountered a bug when using unsorted spiketrains as input, leading to the generation of values exceeding the desired range of -1 to 1.
This fix involves several improvements:
Example Code:
todo:
A description of the sttc algorithm can be found here: https://doi.org/10.1523/jneurosci.2767-14.2014 .