Skip to content

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

@Lylist

Description

@Lylist

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions