コード例 #1
0
            print(IPost)
            print('actionIndex')
            print(actionIndex)
            print('reward: %f'%(reward))
            print('rewardAfterAdapt: %f'%(rewardAfterAdapt))
            print('points: %f'%(points))
        if recording and step%recordingSample==0:
           Trace['actionIndex'][step/recordingSample]=actionIndex
           Trace['reward'][step/recordingSample]=reward
           Trace['points'][step/recordingSample]=points
           Trace['rewardIncrease'][step/recordingSample]=rewardIncrease
           Trace['rewardAdaption'][step/recordingSample]=rewardAdaption
           ADSA.Recording()
           ALIFNArray.Record()
        if saveVideo and step>StarRcordFrames:
            p.saveScreen(capturePath+'frame%.9d.png'%(p.getFrameNumber()))

        #%%  
    if not os.path.exists(path):
        os.makedirs(path) 
    codepath=path+'src/'
    if not os.path.exists(codepath):
        os.makedirs(codepath) 
    for filename in os.listdir(os.getcwd()):
        if filename.endswith(".py"): 
            shutil.copy2(filename, codepath)
    NeuonNumber=0
    newSlice= [slice(None)]*3
    newSlice[1]=NeuonNumber
    Traces = Tracet, ADSA.Trace['Weighters'][newSlice], ADSA.Trace['WeighterVarRates'][newSlice], ADSA.Trace['WeighterInAxonConcentration'][newSlice], ADSA.Trace['WeightersCentre'][newSlice], ADSA.Trace['WeighterVarDamping'][newSlice], ADSA.Trace['EquivalentVolume'][newSlice]
#    figure1,figure2,figure3,figure4,figure5, figure6, figure7,figure8,figure9,ax = DSA.plot(TimOfRecording, Traces, path=path, savePlots=savePlots, StartTimeRate=1, linewidth= linewidth) #path=