Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Shencong-Ni authored Oct 10, 2023
1 parent 9ef4f0c commit 8beaeef
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions twoInputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def get_sparse_spk_matrix(i, t, shape):
spk_mat_i2 = get_sparse_spk_matrix(spk_i_2.i[:], spk_tstep_i2, [ijwd2.Ni, simu_time_tot*10])


data = {'datetime':now.strftime("%Y-%m-%d %H:%M:%S"), 'dt':0.1, 'loop_num':loop_num, 'data_dir': os.getcwd(),
data_save = {'datetime':now.strftime("%Y-%m-%d %H:%M:%S"), 'dt':0.1, 'loop_num':loop_num, 'data_dir': os.getcwd(),
'param':param_all,
'a1':{'param':param_a1,
'ge':{'t_ind': spk_mat_e1.indices, 't_indptr': spk_mat_e1.indptr},
Expand All @@ -586,18 +586,22 @@ def get_sparse_spk_matrix(i, t, shape):
'inter':{'param':param_inter}}

if record_LFP:
data['a1']['ge']['LFP'] = lfp_moni_1.lfp[:]/nA
data['a2']['ge']['LFP'] = lfp_moni_2.lfp[:]/nA
data_save['a1']['ge']['LFP'] = lfp_moni_1.lfp[:]/nA
data_save['a2']['ge']['LFP'] = lfp_moni_2.lfp[:]/nA


with open(data_dir+'data%d.file'%loop_num, 'wb') as file:
pickle.dump(data, file)
pickle.dump(data_save, file)


#%%
import firing_rate_analysis as fra
import matplotlib.pyplot as plt

'''load data'''
data = mydata.mydata()
data.load(data_dir+'data%d.file'%loop_num)

''' produce animation '''

#%
Expand Down

0 comments on commit 8beaeef

Please sign in to comment.