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 plt nest.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:
<!--#yiv5004039376 filtered {}#yiv5004039376 filtered {}#yiv5004039376 filtered {}#yiv5004039376 filtered {}#yiv5004039376 filtered {}#yiv5004039376 p.yiv5004039376MsoNormal, #yiv5004039376 li.yiv5004039376MsoNormal, #yiv5004039376 div.yiv5004039376MsoNormal {margin:0cm;font-size:10.0pt;font-family:"Calibri", sans-serif;}#yiv5004039376 a:link, #yiv5004039376 span.yiv5004039376MsoHyperlink {color:blue;text-decoration:underline;}#yiv5004039376 span.yiv5004039376EmailStyle18 {font-family:"Calibri", sans-serif;color:windowtext;}#yiv5004039376 .yiv5004039376MsoChpDefault {font-size:10.0pt;}#yiv5004039376 filtered {}#yiv5004039376 div.yiv5004039376WordSection1 {}-->
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
From: atiye nejadebrahim atiye.nejadebrahim@yahoo.com Date: Tuesday, 22 August 2023 at 14:12 To: NEST User Mailing List users@nest-simulator.org Subject: [NEST Users] asynchronicity between spikes and firing pattern
| | Some people who received this message don't often get email from atiye.nejadebrahim@yahoo.com.Learn why this is important | |
Dear All,
I made a HH neuron model and I can get an action potential from it. but it seems there is a problem in spikes. Action potential shape show one spike, but spike recorder shows several spikes and there is not any synchronicity between them. can you help me why?
my second question is about spike generation, when I use I_e current for injecting current to the neuron, I can record spikes, but when I use step current generators, no spike shows. can you help me why?
Thank you for your consideration.
Best,
Atiyeh
Dear All,
I made a HH neuron model and I can get an action potential from it. but it seems there is a problem in spikes. Action potential shape show one spike, but spike recorder shows several spikes and there is not any synchronicity between them. can you help me why?
my second question is about spike generation, when I use I_e current for injecting current to the neuron, I can record spikes, but when I use step current generators, no spike shows. can you help me why?
Thank you for your consideration.
Best,
Atiyeh
_______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org