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

How can I make the spike_generator to generate spikes in loop simulation? #114

Open
Lylist opened this issue Mar 14, 2024 · 0 comments
Open

Comments

@Lylist
Copy link

Lylist commented Mar 14, 2024

I would like to run the simulation automatically with a loop to test STDP. It looks like this :

sg = nestgpu.Create("spike_generator")
spike_times = [[50.0], [150.0], [250.0]]
ngpu.ActivateRecSpikeTimes(sg, 100)
for i in range(3):
    nestgpu.SetStatus(sg, {"spike_times": spike_times[i]})
    nest.Simulate(100.0)
    print(nestgpu.GetRecSpikeTimes(sg))

I found that when executing code similar to the above, the spike generator only fires once. What can i do? Thank you.

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

No branches or pull requests

1 participant