def getInputs (self): """ get a dictionary of input types used in simulation with distal/proximal specificity for evoked,ongoing inputs """ dinty = {'Evoked':False,'Ongoing':False,'Poisson':False,'Tonic':False,'EvokedDist':False,\ 'EvokedProx':False,'OngoingDist':False,'OngoingProx':False} try: dinty['Evoked'] = usingEvokedInputs(dfile['outparam']) dinty['EvokedDist'] = usingEvokedInputs(dfile['outparam'], lsuffty = ['_evdist_']) dinty['EvokedProx'] = usingEvokedInputs(dfile['outparam'], lsuffty = ['_evprox_']) dinty['Ongoing'] = usingOngoingInputs(dfile['outparam']) dinty['OngoingDist'] = usingOngoingInputs(dfile['outparam'], lty = ['_dist']) dinty['OngoingProx'] = usingOngoingInputs(dfile['outparam'], lty = ['_prox']) dinty['Poisson'] = usingPoissonInputs(dfile['outparam']) dinty['Tonic'] = usingTonicInputs(dfile['outparam']) except: pass return dinty
# colors for the different cell types dclr = {'L2_pyramidal' : 'g', 'L5_pyramidal' : 'r', 'L2_basket' : 'w', 'L5_basket' : 'b'} ntrial = 1; tstop = -1; outparamf = spkpath = paramf = ''; EvokedInputs = OngoingInputs = PoissonInputs = False; for i in range(len(sys.argv)): if sys.argv[i].endswith('.txt'): spkpath = sys.argv[i] elif sys.argv[i].endswith('.param'): paramf = sys.argv[i] tstop = paramrw.quickgetprm(paramf,'tstop',float) ntrial = paramrw.quickgetprm(paramf,'N_trials',int) EvokedInputs = paramrw.usingEvokedInputs(paramf) OngoingInputs = paramrw.usingOngoingInputs(paramf) PoissonInputs = paramrw.usingPoissonInputs(paramf) outparamf = os.path.join(dconf['datdir'],paramf.split('.param')[0].split(os.path.sep)[-1],'param.txt') try: extinputs = spikefn.ExtInputs(spkpath, outparamf) except ValueError: print("Error: could not load spike timings from %s" % spkpath) extinputs.add_delay_times() alldat = {} ncell = len(net.cells)