123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- import itertools
- # number of neurons
- N = 1000
- # fraction of excitatory cells
- f = 0.8
- # exc. strength (postsynaptic amplitude in mV)
- mu = 0.1
- # connection probability
- epsilon = 0.1
- # external rate relative to threshold rate
- eta = 0.9
- # type of distribution for synaptic weights
- syndist = 'lognormal' # 'truncated-normal' 'lognormal' 'normal'
- # variance of weight sample distributions
- sigma_ex = 0.12
- sigma_in = 0.1
- # simulation time
- simtime = 61000 #ms
- ###### rewiring parameters ######
- shuffle_source = ['E', 'I']
- shuffle_target = ['E', 'I']
- shuffle_frac = 1.0
- add_source = 'E'
- add_target = 'E'
- add_source_frac = [0.2, 10000]
- # add_target_frac > p/(1-p) * add_source_frac
- add_target_frac = [0.02, 0.05, 0.1, 0.2, 0.4, 0.6, 0.8, 1.0]
- cluster_pop = 'E'
- cluster_number = 3
- cluster_size = [0.02, 0.04, 0.06, 0.08]
- cluster_epsilon = [0.2, 0.3, 0.4, 0.5, 0.6]
- hub_pop = 'E'
- hub_size = [0.04, 0.06, 0.08, 0.10]
- hub_strength = [0.2, 0.3, 0.4, 0.5]
- hub_epsilon = 0.5
- chain_pop = 'E'
- chain_size = [0.05, 0.10, 0.15, 0.20]
- chain_strength = [0.3, 0.4, 0.5, 0.6]
- chain_epsilon = 0.6
- chain_length = 3
- connectors = [0, 30]
- ###### derived & fixed network parameters ######
- J_ex = mu
- # enforce global balance state
- J_in = -f * J_ex / (1-f)
- dt = 0.1 # the resolution in ms
- delay = [.5, 3] #1.5 # min/max synaptic delays in ms (uniform)
- NE = int(f * N) # number of excitatory neurons
- NI = N - NE # number of inhibitory neurons
- in_connection_rule = 'pairwise_bernoulli'
- ex_connection_rule = 'pairwise_bernoulli'
- synapse_model = 'static_synapse'
- neuron_model = 'iaf_psc_delta'
- tauMem = 20.0 # time constant of membrane potential in ms
- theta = 20.0 # membrane threshold potential in mV
- neuron_params = {"C_m": 1.0,
- "tau_m": tauMem,
- "t_ref": 2.0,
- "E_L": 0.0,
- "V_reset": 0.0,
- "V_m": 0.0,
- "V_th": theta}
- # Driving stiumulus parameters
- stimulus = "poisson_generator"
- parrot_input = False
- CE = epsilon * NE # estimated number of excitatory synapses per neuron
- CI = epsilon * NI # estimated number of inhibitory synapses per neuron
- if J_ex:
- nu_th = theta / (J_ex * CE * tauMem)
- else:
- nu_th = theta / (CE * tauMem)
- nu_ex = eta * nu_th
- p_rate = 1000.0 * nu_ex * CE
- p_rate_func = lambda eta: 1000 * eta*nu_th * CE
- ###### non-network parameters ######
- # cut swinging-in time
- cut_inital_time = 1000 #ms
- # bin size for correlation calculation
- bin_size = 2 #ms
- # derived number of bins
- bin_num = int((simtime - cut_inital_time) / bin_size)
- # seeds for multiple runs with same specification
- seed = list(range(1,101))
- seed_pairs = [f'{i[0]}-{i[1]}' for i in itertools.combinations(seed,2)]
|