t_array = ntwk.arange(int(Model['tstop'] / Model['dt'])) * Model['dt'] # # # afferent excitation onto cortical excitation and inhibition for i, tpop in enumerate(['Exc', 'Inh', 'DsInh']): # both on excitation and inhibition ntwk.construct_feedforward_input( NTWK, tpop, 'AffExc', t_array, 0. * t_array + 0.3, additional_spikes_in_terms_of_pre_pop={ 'indices': NTWK['iRASTER_AffExc'], 'times': NTWK['tRASTER_AffExc'] }, SEED=i + 3, verbose=True) ################################################################ ## --------------- Initial Condition ------------------------ ## ################################################################ ntwk.initialize_to_rest(NTWK) ##################### ## ----- Run ----- ## ##################### network_sim = ntwk.collect_and_run(NTWK, verbose=True) ntwk.write_as_hdf5(NTWK, filename='visual_input_data.h5') print('Results of the simulation are stored as:', 'visual_input_data.h5') print('--> Run \"python visual_input.py plot\" to plot the results')
int(200 / 0.1)) # ###################### # ## ----- Plot ----- ## # ###################### # # # afferent excitation onto cortical excitation and inhibition for i, tpop in enumerate(['RecExc', 'RecInh', 'DsInh' ]): # both on excitation and inhibition ntwk.construct_feedforward_input(NTWK, tpop, 'AffExc', t_array, faff, verbose=True) ################################################################ ## --------------- Initial Condition ------------------------ ## ################################################################ ntwk.initialize_to_rest(NTWK) ##################### ## ----- Run ----- ## ##################### network_sim = ntwk.collect_and_run(NTWK, verbose=True) ntwk.write_as_hdf5(NTWK, filename='CellRep2019_data.h5') print('Results of the simulation are stored as:', 'CellRep2019_data.h5') print('--> Run \"python CellRep2019.py plot\" to plot the results')
# # noise excitation for i, tpop in enumerate(REC_POPS): # both on excitation and inhibition ntwk.construct_feedforward_input(NTWK, tpop, 'NoiseExc', t_array, fnoise + 0. * t_array, verbose=True, SEED=5) ################################################################ ## --------------- Initial Condition ------------------------ ## ################################################################ ntwk.initialize_to_rest(NTWK) ##################### ## ----- Run ----- ## ##################### network_sim = ntwk.collect_and_run(NTWK, verbose=True) ##################### ## ----- Save ----- ## ##################### ntwk.write_as_hdf5(NTWK, filename='mean_field_data.h5') print('Results of the simulation are stored as:', 'mean_field_data.h5') print('--> Run \"python mean_field.py plot\" to plot the results') print( '--> Run \"python mean_field.py mf\" to run the associated MF and plot the results' )
verbose=True) ntwk.build_up_recurrent_connections(NTWK, SEED=5, verbose=True) ################################################################ ## --------------- Initial Condition ------------------------ ## ################################################################ for i in range(2): NTWK['POPS'][i].V = (-65 + 5 * np.random.randn(NTWK['POPS'][i].N) ) * ntwk.mV # random Vm # then excitation NTWK['POPS'][0].GExcExc = abs(40 + 15 * np.random.randn(NTWK['POPS'][0].N)) * ntwk.nS NTWK['POPS'][0].GInhExc = abs(200 + 120 * np.random.randn(NTWK['POPS'][0].N)) * ntwk.nS # # then inhibition NTWK['POPS'][1].GExcInh = abs(40 + 15 * np.random.randn(NTWK['POPS'][1].N)) * ntwk.nS NTWK['POPS'][1].GInhInh = abs(200 + 120 * np.random.randn(NTWK['POPS'][1].N)) * ntwk.nS # ##################### # ## ----- Run ----- ## # ##################### network_sim = ntwk.collect_and_run(NTWK, verbose=True) ntwk.write_as_hdf5(NTWK, filename='Vogels-Abbott.h5') print('Results of the simulation are stored as:', 'Vogels-Abbott.h5') print('--> Run \"python coba_LIF.py plot\" to plot the results')
print('-------------------------------------------------------') faff = 1. t_array = ntwk.arange(int(Model['tstop'] / Model['dt'])) * Model['dt'] # # # afferent excitation onto cortical excitation and inhibition for i, tpop in enumerate(['Exc', 'Inh']): # both on excitation and inhibition ntwk.construct_feedforward_input_correlated( NTWK, tpop, 'AffExc', t_array, faff + 0. * t_array, # with_presynaptic_spikes=True, verbose=True, SEED=int(37 * faff + i) % 37) ################################################################ ## --------------- Initial Condition ------------------------ ## ################################################################ ntwk.initialize_to_rest(NTWK) ##################### ## ----- Run ----- ## ##################### network_sim = ntwk.collect_and_run(NTWK, verbose=True) ntwk.write_as_hdf5(NTWK, filename='with_correl_drive_data.h5') print('Results of the simulation are stored as:', 'with_correl_drive_data.h5') print('--> Run \"python with_correl_drive.py plot\" to plot the results')
####################################### ########### AFFERENT INPUTS ########### ####################################### faff = 1. t_array = ntwk.arange(int(Model['tstop'] / Model['dt'])) * Model['dt'] # # # afferent excitation onto cortical excitation and inhibition for i, tpop in enumerate(['Exc', 'Inh', 'DsInh']): # both on excitation and inhibition ntwk.construct_feedforward_input(NTWK, tpop, 'AffExc', t_array, faff + 0. * t_array, verbose=True, SEED=int(37 * faff + i) % 37) ################################################################ ## --------------- Initial Condition ------------------------ ## ################################################################ ntwk.initialize_to_rest(NTWK) ##################### ## ----- Run ----- ## ##################### network_sim = ntwk.collect_and_run(NTWK, verbose=True) ntwk.write_as_hdf5(NTWK, filename='3pop_model_data.h5') print('Results of the simulation are stored as:', '3pop_model_data.h5') print('--> Run \"python 3pop_model.py plot\" to plot the results')
####################################### ########### AFFERENT INPUTS ########### ####################################### faff = 4. t_array = ntwk.arange(int(Model['tstop'] / Model['dt'])) * Model['dt'] # # # afferent excitation onto cortical excitation and inhibition for i, tpop in enumerate(['Exc', 'Inh']): # both on excitation and inhibition ntwk.construct_feedforward_input(NTWK, tpop, 'AffExc', t_array, faff + 0. * t_array, verbose=True, SEED=int(37 * faff + i) % 37) ################################################################ ## --------------- Initial Condition ------------------------ ## ################################################################ ntwk.initialize_to_rest(NTWK) ##################### ## ----- Run ----- ## ##################### network_sim = ntwk.collect_and_run(NTWK, verbose=True) ntwk.write_as_hdf5(NTWK, filename='RS-FS.h5') print('Results of the simulation are stored as:', 'RS-FS.h5') print('--> Run \"python RS-FS.py plot\" to plot the results')
t_array = ntwk.arange(int(Model['tstop'] / Model['dt'])) * Model['dt'] faff = 0.8 + 0.7 * (1 - np.cos(2 * np.pi * 4e-3 * t_array)) faff[t_array < 750] = 1. # # # afferent excitation onto cortical excitation and inhibition for i, tpop in enumerate(['L23Exc', 'PVInh', 'SOMInh', 'VIPInh']): # both on excitation and inhibition ntwk.construct_feedforward_input(NTWK, tpop, 'L4Exc', t_array, faff, verbose=True, SEED=int(i) % 37) ################################################################ ## --------------- Initial Condition ------------------------ ## ################################################################ ntwk.initialize_to_rest(NTWK) ##################### ## ----- Run ----- ## ##################### network_sim = ntwk.collect_and_run(NTWK, verbose=True) ntwk.write_as_hdf5(NTWK, filename='sinusoidal_input_data.h5') print('Results of the simulation are stored as:', 'sinusoidal_input_data.h5') print('--> Run \"python sinusoidal_input.py plot\" to plot the results')
####################################### ########### AFFERENT INPUTS ########### ####################################### faff = 0.5 t_array = ntwk.arange(int(Model['tstop']/Model['dt']))*Model['dt'] # # # afferent excitation onto cortical excitation and inhibition for i, tpop in enumerate(['Exc', 'Inh', 'oscillExc']): # both on excitation and inhibition ntwk.construct_feedforward_input(NTWK, tpop, 'AffExc', t_array, faff+0.*t_array, verbose=True, SEED=int(37*faff+i)%37) ################################################################ ## --------------- Initial Condition ------------------------ ## ################################################################ ntwk.initialize_to_rest(NTWK) ##################### ## ----- Run ----- ## ##################### network_sim = ntwk.collect_and_run(NTWK, verbose=True) ntwk.write_as_hdf5(NTWK, filename='rhythmic_ntwk_data.h5') print('Results of the simulation are stored as:', 'rhythmic_ntwk_data.h5') print('--> Run \"python rhythmic_ntwk.py plot\" to plot the results')
verbose=True) ntwk.build_up_recurrent_connections(NTWK, SEED=5, verbose=True, with_ring_geometry=True) ####################################### ########### AFFERENT INPUTS ########### ####################################### t_array = ntwk.arange(int(Model['tstop'] / Model['dt'])) * Model['dt'] faff = 3. + 0 * t_array ntwk.construct_feedforward_input(NTWK, 'Inh', 'AffExc', t_array, faff) faff[(t_array > 400) & (t_array > 500)] += 2. ntwk.construct_feedforward_input(NTWK, 'Exc', 'AffExc', t_array, faff) ################################################################ ## --------------- Initial Condition ------------------------ ## ################################################################ ntwk.initialize_to_rest(NTWK) ##################### ## ----- Run ----- ## ##################### network_sim = ntwk.collect_and_run(NTWK, verbose=True) ntwk.write_as_hdf5(NTWK, filename='ring_ntwk_data.h5') print('Results of the simulation are stored as:', 'ring_ntwk_data.h5') print('--> Run \"python ring_ntwk.py plot\" to plot the results')
verbose=True) ntwk.build_up_recurrent_connections(NTWK, SEED=5, verbose=True) ################################################################ ## --------------- Initial Condition ------------------------ ## ################################################################ for i in range(2): NTWK['POPS'][i].V = (-65 + 5 * np.random.randn(NTWK['POPS'][i].N) ) * ntwk.mV # random Vm # then excitation NTWK['POPS'][0].GExcExc = abs(40 + 15 * np.random.randn(NTWK['POPS'][0].N)) * ntwk.nS NTWK['POPS'][0].GInhExc = abs(200 + 120 * np.random.randn(NTWK['POPS'][0].N)) * ntwk.nS # # then inhibition NTWK['POPS'][1].GExcInh = abs(40 + 15 * np.random.randn(NTWK['POPS'][1].N)) * ntwk.nS NTWK['POPS'][1].GInhInh = abs(200 + 120 * np.random.randn(NTWK['POPS'][1].N)) * ntwk.nS # ##################### # ## ----- Run ----- ## # ##################### network_sim = ntwk.collect_and_run(NTWK, verbose=True) ntwk.write_as_hdf5(NTWK, filename='coba_LIF_data.h5') print('Results of the simulation are stored as:', 'coba_LIF_data.h5') print('--> Run \"python coba_LIF.py plot\" to plot the results')