Skip to content
Snippets Groups Projects
Commit 9705d3c6 authored by Didi Hou's avatar Didi Hou
Browse files

code cleaning

parent 633507e9
No related branches found
No related tags found
2 merge requests!65Fix the bug due to deprecation of np.float,!64Code cleaning and documentation
...@@ -32,11 +32,8 @@ def compute_corrcoeff(M, data_path, label): ...@@ -32,11 +32,8 @@ def compute_corrcoeff(M, data_path, label):
resolution = 1. resolution = 1.
cc_dict = {} cc_dict = {}
for area in areas_simulated: for area in areas_simulated:
cc_dict[area] = {} cc_dict[area] = {}
LvR_list = []
N = []
for pop in M.structure[area]: for pop in M.structure[area]:
fp = '-'.join((label, fp = '-'.join((label,
'spikes', # assumes that the default label for spike files was used 'spikes', # assumes that the default label for spike files was used
......
...@@ -32,8 +32,6 @@ def compute_pop_LvR(M, data_path, label): ...@@ -32,8 +32,6 @@ def compute_pop_LvR(M, data_path, label):
for area in areas_simulated: for area in areas_simulated:
pop_LvR_dict[area] = {} pop_LvR_dict[area] = {}
LvR_list = []
N = []
for pop in M.structure[area]: for pop in M.structure[area]:
fp = '-'.join((label, fp = '-'.join((label,
'spikes', # Assumes that the default label for spike files was used 'spikes', # Assumes that the default label for spike files was used
......
...@@ -52,7 +52,7 @@ def compute_rate_time_series(M, data_path, label, area, method): ...@@ -52,7 +52,7 @@ def compute_rate_time_series(M, data_path, label, area, method):
N_list = [] N_list = []
for pop in M.structure[area]: for pop in M.structure[area]:
fp = '-'.join((label, fp = '-'.join((label,
'spikes', # assumes that the default label for spike files was used 'spikes', # Assumes that the default label for spike files was used
area, area,
pop)) pop))
fn = '{}/{}.npy'.format(load_path, fp) fn = '{}/{}.npy'.format(load_path, fp)
......
...@@ -73,7 +73,6 @@ def plot_firing_rate_over_areas(M, data_path): ...@@ -73,7 +73,6 @@ def plot_firing_rate_over_areas(M, data_path):
t_min = 500. t_min = 500.
t_max = M.simulation.params['t_sim'] t_max = M.simulation.params['t_sim']
time = np.arange(t_min, t_max)
matrix = [] matrix = []
for area in area_list: for area in area_list:
binned_spikes = rate_time_series[area][500:600] binned_spikes = rate_time_series[area][500:600]
......
...@@ -90,7 +90,6 @@ def visualize_fc(M, data_path): ...@@ -90,7 +90,6 @@ def visualize_fc(M, data_path):
Returns: Returns:
None None
""" """
area_list = M.simulation.params["areas_simulated"]
label = M.simulation.label label = M.simulation.label
# Compute functional connectivity # Compute functional connectivity
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment