예제 #1
0
tr_prefix = 'train/'
te_prefix = 'test/test_'

#Antennal Lobe parameters
al_para = dict(N=N_AL,
               g_syn=in_AL,
               neuron_class=nm.n_FitzHugh_Nagumo,
               syn_class=nm.s_FitzHughNagumo_inh,
               PAL=PAL,
               mon=['V'])

#create the network object
net = Network()

G_AL, S_AL, trace_AL, spikes_AL = lm.get_AL(
    al_para,
    net)  #creates neuron group, synapses, spike and state monitors, etc

net.store()  # saves current unsimulated configuration of antennal lobe

inp = 0.15  #input current amplitude
noise_amp = 0.0  #max noise percentage of inp
noise_test = 0.0  #no noise in the mixtures

num_odors_train = 20  #how many buckets. Base odors.
num_odors_mix = 2  #mix 2 of the odors together

num_alpha = 20  #values of A in: A*I_1 + (1-A)*I_2

num_test = 1  #test per value of A. If there is no noise, then this value may make no difference if greater than or equal
#   to one. If there is noise, then it may be useful to raise this above 1.
예제 #2
0
tr_prefix = 'train/'
te_prefix = 'test/test_'

# Antennal Lobe parameters
al_para = dict(N=N_AL,
               g_syn=in_AL,
               neuron_class=nm.n_FitzHugh_Nagumo,
               syn_class=nm.s_FitzHughNagumo_inh,
               PAL=PAL,
               mon=['V']
               )

# create the network object
net = Network()

G_AL, S_AL, trace_AL, spikes_AL = lm.get_AL(al_para, net)

net.store()

inp = 0.15  # input current amplitude
noise_amp = 0.0  # max noise percentage of inp
noise_test = 0.0  # no noise in the mixtures

num_odors_train = 10  # how many buckets
num_odors_mix = 2  # mix 2 of the odors together

num_alpha = 100  # values of A in: A*I_1 + (1-A)*I_2

num_test = 1  # test per value of A

run_time = 120 * ms
예제 #3
0
#Antennal Lobe parameters
al_para = dict(N=N_AL,
               g_syn=in_AL,
               neuron_class=nm.n_FitzHugh_Nagumo,
               syn_class=nm.s_FitzHughNagumo_inh,
               PAL=PAL,
               mon=[],
               lfp_syn=lfp_syn)

t_sim = time.time()

#create the network object
net = Network()
# monlfp if using synapse to monitor
G_AL, S_AL, trace_AL, spikes_AL, G_LFP, S_LFP, trace_LFP = lm.get_AL(
    al_para, net)

states = [G_AL]

#----------------------------------------------------------
'''
There are a few components to using a time dependent current.

(1) The data file must be loaded, and the TimedArray function used -- include
units. dt for the file must be specified. The file must be long enough for the
run time! If the run time exceeds the time of the file, it will use the last
current value.

(2) The run_regularly function. This exists in the namespace of the NeuronGroup
you're adding it to. It can execute code strings at regular intervals. This
object needs to be assigned a name and added to the network separately if the
예제 #4
0
                 ex_KCGGN=ex_ALKC,
                 synGGNKC_class=nm.s_gapjunc_in,
                 in_GGNKC=in_GGNKC,
                 synKCBL_class=nm.s_lifSTDP_ex,
                 ex_KCBL=ex_KCBL,
                 etaSTDP=eta,
                 taupreSTDP=taupre,
                 taupostSTDP=taupost,
                 PALKC=PALKC,
                 PKCBL=PKCBL,
                 S_ALKC_conn=S_ALKC_conn,
                 S_KCBL_conn=S_KCBL_conn)

net = Network()

G_AL, S_AL, trace_AL, spikes_AL = lm.get_AL(al_para, net, train=False)

G_KC, trace_KC, spikes_KC = lm.get_KCs(kc_para, net)

G_GGN, trace_GGN = lm.get_GGN(ggn_para, net)

G_BL, S_BL, trace_BL, spikes_BL = lm.get_BL(bl_para, net)

states = [G_AL, G_KC, G_GGN, G_BL]

S_ALKC, S_KCGGN, S_GGNKC, S_KCBL = lm.connect_network(conn_para,
                                                      states,
                                                      net,
                                                      train=False)

#-------------------------------------------------