def __init__(self, K): self.K = K self.f = (1.5 / K) * np.ones(self.K) self.g = (1.5 / K) * np.ones(self.K) self.connectivity = np.outer(self.f, self.g) self.myneuron = morrislecar() self.thestim = lambda x: 0.
def __init__(self,K): self.K=K self.f=(1.5/K)*np.ones(self.K) self.g=(1.5/K)*np.ones(self.K) self.connectivity=np.outer(self.f,self.g) self.myneuron=morrislecar() self.thestim=lambda x: 0.
power spectra is calculated and extracted the maximum. This is repeated in the loop to create a complete power spectra''' #stimulation function def mysin(x): if x > tstart: return amp * np.sin(2 * np.pi * freq * (x - tstart)**2 / (2 * period)) + I0 else: return I0 #intializing the model #morris lecar myneuron = morrislecar() myneuron.thestim(mysin) x0 = np.array([-1., myneuron.ninf(-1.)]) #initializing the simulation parameters dt = 1e-2 fs = 1 / dt amp = 0.005 #ampplitude of stimulation tstart = 100. #begining of stimulation nstart = tstart / dt I0 = 0. #dc period = 3000 freq = 0.4 delta_freq = 0.01 N = nstart + period / dt
after stimulate for a certain number of cycles of a single mode the power spectra is calculated and extracted the maximum. This is repeated in the loop to create a complete power spectra''' #stimulation function def mysin(x): if x>tstart: return amp*np.sin(2*np.pi*freq*(x-tstart)**2/(2*period))+I0 else: return I0 #intializing the model #morris lecar myneuron=morrislecar() myneuron.thestim(mysin) x0=np.array([-1.,myneuron.ninf(-1.)]) #initializing the simulation parameters dt=1e-2 fs=1/dt amp=0.005 #ampplitude of stimulation tstart=100. #begining of stimulation nstart=tstart/dt I0=0. #dc period=3000 freq=0.4 delta_freq=0.01