Skip to content
Snippets Groups Projects
Commit 838123e8 authored by Didi Hou's avatar Didi Hou Committed by Administrator
Browse files

/

parent 034c122f
No related branches found
No related tags found
1 merge request!35Pre-release MAM v1.1.0
source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -26,10 +26,10 @@ def load_and_create_data(M):
simulated areas.
"""
# Instantiate an analysis class and load spike data
A = Analysis(network=M,
simulation=M.simulation,
data_list=['spikes'],
load_areas=None)
# A = Analysis(network=M,
# simulation=M.simulation,
# data_list=['spikes'],
# load_areas=None)
"""
......@@ -57,39 +57,12 @@ def load_and_create_data(M):
If set to 'complete', all populations the respective areas
are included. Defaults to 'complete'.
"""
A.create_pop_rates()
# A.create_pop_rates()
subprocess.run(['python3', './figures/Schmidt2018_dyn/compute_pop_rates.py'])
# subprocess.run(['Rscript', '--vanilla', 'compute_bold_signal.R', fn, out_fn])
print("Computing population rates done")
"""
Calculate synchrony as the coefficient of variation of the population rate
and store in member synchrony. Uses helper function synchrony.
If the synchrony has previously been stored with the
same parameters, they are loaded from file.
Parameters
----------
t_min : float, optional
Minimal time in ms of the simulation to take into account
for the calculation. Defaults to 500 ms.
t_max : float, optional
Maximal time in ms of the simulation to take into account
for the calculation. Defaults to the simulation time.
areas : list, optional
Which areas to include in the calculcation.
Defaults to all loaded areas.
pops : list or {'complete'}, optional
Which populations to include in the calculation.
If set to 'complete', all populations the respective areas
are included. Defaults to 'complete'.
resolution : float, optional
Resolution of the population rate. Defaults to 1 ms.
"""
A.create_synchrony()
print("Computing synchrony done")
"""
Calculate poulation-averaged LvR (see Shinomoto et al. 2009) and
store as member pop_LvR. Uses helper function LvR.
......@@ -110,7 +83,7 @@ def load_and_create_data(M):
If set to 'complete', all populations the respective areas
are included. Defaults to 'complete'.
"""
A.create_pop_LvR()
# A.create_pop_LvR()
print("Computing population LvR done")
......@@ -146,7 +119,7 @@ def load_and_create_data(M):
- 'alpha_time_window' : time constant of the alpha function
- 'rect_time_window' : width of the moving rectangular function
"""
A.create_rate_time_series()
# A.create_rate_time_series()
print("Computing rate time series done")
......@@ -184,7 +157,7 @@ def load_and_create_data(M):
# A.create_synaptic_input()
# print("Computing synaptic input done")
A.save()
# A.save()
# """
# Compute BOLD signal for a given area from the time series of
......@@ -197,4 +170,4 @@ def load_and_create_data(M):
# except FileNotFoundError:
# raise FileNotFoundError("Executing R failed. Did you install R?")
return A
\ No newline at end of file
# return A
\ No newline at end of file
......@@ -26,10 +26,10 @@ def load_and_create_data(M):
simulated areas.
"""
# Instantiate an analysis class and load spike data
A = Analysis(network=M,
simulation=M.simulation,
data_list=['spikes'],
load_areas=None)
# A = Analysis(network=M,
# simulation=M.simulation,
# data_list=['spikes'],
# load_areas=None)
"""
......@@ -57,39 +57,12 @@ def load_and_create_data(M):
If set to 'complete', all populations the respective areas
are included. Defaults to 'complete'.
"""
A.create_pop_rates()
# A.create_pop_rates()
subprocess.run(['python3', './figures/Schmidt2018_dyn/compute_pop_rates.py'])
# subprocess.run(['Rscript', '--vanilla', 'compute_bold_signal.R', fn, out_fn])
print("Computing population rates done")
"""
Calculate synchrony as the coefficient of variation of the population rate
and store in member synchrony. Uses helper function synchrony.
If the synchrony has previously been stored with the
same parameters, they are loaded from file.
Parameters
----------
t_min : float, optional
Minimal time in ms of the simulation to take into account
for the calculation. Defaults to 500 ms.
t_max : float, optional
Maximal time in ms of the simulation to take into account
for the calculation. Defaults to the simulation time.
areas : list, optional
Which areas to include in the calculcation.
Defaults to all loaded areas.
pops : list or {'complete'}, optional
Which populations to include in the calculation.
If set to 'complete', all populations the respective areas
are included. Defaults to 'complete'.
resolution : float, optional
Resolution of the population rate. Defaults to 1 ms.
"""
A.create_synchrony()
print("Computing synchrony done")
"""
Calculate poulation-averaged LvR (see Shinomoto et al. 2009) and
store as member pop_LvR. Uses helper function LvR.
......@@ -110,7 +83,7 @@ def load_and_create_data(M):
If set to 'complete', all populations the respective areas
are included. Defaults to 'complete'.
"""
A.create_pop_LvR()
# A.create_pop_LvR()
print("Computing population LvR done")
......@@ -146,7 +119,7 @@ def load_and_create_data(M):
- 'alpha_time_window' : time constant of the alpha function
- 'rect_time_window' : width of the moving rectangular function
"""
A.create_rate_time_series()
# A.create_rate_time_series()
print("Computing rate time series done")
......@@ -184,7 +157,7 @@ def load_and_create_data(M):
# A.create_synaptic_input()
# print("Computing synaptic input done")
A.save()
# A.save()
# """
# Compute BOLD signal for a given area from the time series of
......@@ -197,4 +170,4 @@ def load_and_create_data(M):
# except FileNotFoundError:
# raise FileNotFoundError("Executing R failed. Did you install R?")
return A
\ No newline at end of file
# return A
\ No newline at end of file
......@@ -35,7 +35,7 @@ def set_boxplot_props(d):
pl.setp(d['means'], marker='x', color='k',
markerfacecolor='k', markeredgecolor='k', markersize=3.)
def plot_resting_state(M, A, label_spikes, data_path):
def plot_resting_state(M, A, data_path):
t_sim = M.simulation.params["t_sim"]
"""
......
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
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