Hello Hans,This is the scripts with step_current_generator that can't generate spikes:import numpy as npimport nestimport shelveimport matplotlib.pyplot as pltnest.Install('hh_motor_neuron_module')neuron=nest.Create('hh_motor_neuron_nestml',1) #{'I_e':1000})scg1 = nest.Create("step_current_generator", 1, params={"amplitude_times": [1000],"amplitude_values": [2000],})mm1 = nest.Create("multimeter", 1, params={"interval": .1,"start": 0,"stop": 1000,"record_from": ["I"],})multimeter = nest.Create("multimeter", params={'record_from':['V_m'],'interval': .1})spikerecorder = nest.Create("spike_recorder")spike_times = nest.GetStatus(spikerecorder, keys='events')[0]['times']nest.Connect(multimeter, neuron)nest.Connect(neuron, spikerecorder)nest.Connect(scg1, neuron)nest.Connect(mm1, scg1)sim_time = 1000.0 # Simulation time in millisecondsdt = 0.1 # Simulation time step in millisecondsnest.Simulate(sim_time)fig, ax = plt.subplots(nrows=2)ax[0].plot(multimeter.get("events")["times"], multimeter.get("events")["V_m"])ax[1].plot(mm1.get("events")["times"], mm1.get("events")["I"])ax[0].scatter(spike_times, np.zeros_like(spike_times), marker="d", c="orange", alpha=.8, zorder=99)ax[0].set_ylabel("v [mV]")ax[1].set_ylabel("I")ax[-1].set_xlabel("Time [ms]")fig.show()plt.show(block=True)this is the code with injecting I_e that generates asysnchronous outputs between spikes and AP:import numpy as npimport nestimport shelveimport matplotlib.pyplot as pltnest.Install('hh_motor_neuron_module')neuron=nest.Create('hh_motor_neuron_nestml',1, {'I_e':2000})multimeter = nest.Create("multimeter", params={'record_from':['V_m'],'interval': .1})spikerecorder = nest.Create("spike_recorder")spike_times = nest.GetStatus(spikerecorder, keys='events')[0]['times']nest.Connect(multimeter, neuron)nest.Connect(neuron, spikerecorder)sim_time = 1000.0 # Simulation time in millisecondsdt = 0.1 # Simulation time step in millisecondsnest.Simulate(sim_time)dmm = multimeter.get()Vms = dmm["events"]["V_m"]ts = dmm["events"]["times"]plt.figure(1)plt.plot(ts, Vms)events = spikerecorder.get("events")the .nestml neuron model is attached. however it is clear in 'hh_psc_alpha' model, too.On Tuesday, August 22, 2023 at 03:33:35 PM GMT+2, Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no> wrote:
Hello Atiye,
Please post a script that reproduces the behavior you describe. Without it, it is impossible to provide good advice.
Best,
Hans Ekkehard
--
Prof. Dr. Hans Ekkehard Plesser
Department of Data Science
Faculty of Science and Technology
Norwegian University of Life Sciences
PO Box 5003, 1432 Aas, Norway
Phone +47 6723 1560
Email hans.ekkehard.plesser@nmbu.no
Home http://arken.nmbu.no/~plesser
_______________________________________________NEST Users mailing list -- users@nest-simulator.orgTo unsubscribe send an email to users-leave@nest-simulator.org_______________________________________________NEST Users mailing list -- users@nest-simulator.orgTo unsubscribe send an email to users-leave@nest-simulator.orgAttachments:
- hh_motor_neuron.nestml