Question: (Use Python) Find a way to make a period 2 spike (instead of individual spikes). See original code below- from brian2 import * # Parameters

(Use Python) Find a way to make a period 2 spike (instead of individual spikes).

See original code below-

from brian2 import *

# Parameters C = 281 * pF gL = 30 * nS taum = C / gL EL = -70.6 * mV VT = -50.4 * mV DeltaT = 2 * mV Vcut = VT + 5 * DeltaT

# Pick an electrophysiological behaviour tauw, a, b, Vr = 144*ms, 20*nS, 0.0805*nA, -70.6*mV # Regular spiking (as in the paper) #tauw,a,b,Vr=20*ms,4*nS,0.5*nA,VT+5*mV # Bursting #tauw,a,b,Vr=144*ms,2*C/(144*ms),0*nA,-70.6*mV # Fast spiking

eqs = """ dvm/dt = (gL*(EL - vm) + gL*DeltaT*exp((vm - VT)/DeltaT) + I - w)/C : volt dw/dt = (a*(vm - EL) - w)/tauw : amp I : amp """

neuron = NeuronGroup(1, model=eqs, threshold='vm>Vcut', reset="vm=Vr; w+=b", method='euler') neuron.vm = EL trace = StateMonitor(neuron, 'vm', record=0) spikes = SpikeMonitor(neuron)

run(20 * ms) neuron.I = 1*nA run(100 * ms) neuron.I = 0*nA run(20 * ms)

# We draw nicer spikes vm = trace[0].vm[:] for t in spikes.t: i = int(t / defaultclock.dt) vm[i] = 20*mV

fig, ax = plt.subplots() # Using set_dashes() to modify dashing of an existing line line1, = ax.plot(trace.t / ms, vm / mV, label='Basic Spike') #line1.set_dashes([2, 2, 10, 2]) # 2pt line, 2pt break, 10pt line, 2pt break ax.legend() plt.show()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!