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

/

parent 6839bc48
No related branches found
No related tags found
1 merge request!35Pre-release MAM v1.1.0
This diff is collapsed.
"""
This script is used to run a simulation from the given command-line
arguments:
1. Label of the simulation
2. Label of the network to be simulated
It initializes the network class and then runs the simulate method of
the simulation class instance.
This script should be used in the `jobscript_template` defined in the
config.py file. See config_template.py.
"""
import json
import nest
import os
import sys
from config import data_path
from multiarea_model import MultiAreaModel
label = sys.argv[1]
network_label = sys.argv[2]
fn = os.path.join(data_path,
label,
'_'.join(('custom_params',
label,
str(nest.Rank()))))
with open(fn, 'r') as f:
custom_params = json.load(f)
os.remove(fn)
M = MultiAreaModel(network_label,
simulation=True,
sim_spec=custom_params['sim_params'])
M.simulation.simulate()
......@@ -189,10 +189,12 @@ def visualize_interareal_connectivity(M):
y = np.arange(0, len(area_list[::-1]) + 1)
X, Y = np.meshgrid(x, y)
ax.set_xticks([i + 0.5 for i in np.arange(0, len(area_list) + 1, 1)])
# ax.set_xticks([i + 0.5 for i in np.arange(0, len(area_list) + 1, 1)])
ax.set_xticks([i + 0.5 for i in np.arange(0, len(area_list), 1)])
# ax.set_xticklabels(area_list, rotation=90, size=6.)
ax.set_yticks([i + 0.5 for i in np.arange(0, len(area_list) + 1, 1)])
# ax.set_yticks([i + 0.5 for i in np.arange(0, len(area_list) + 1, 1)])
ax.set_yticks([i + 0.5 for i in np.arange(0, len(area_list), 1)])
# ax.set_yticklabels(area_list[::-1], size=6.)
ax.set_ylabel('Target area')
......
......@@ -189,10 +189,12 @@ def visualize_interareal_connectivity(M):
y = np.arange(0, len(area_list[::-1]) + 1)
X, Y = np.meshgrid(x, y)
ax.set_xticks([i + 0.5 for i in np.arange(0, len(area_list) + 1, 1)])
# ax.set_xticks([i + 0.5 for i in np.arange(0, len(area_list) + 1, 1)])
ax.set_xticks([i + 0.5 for i in np.arange(0, len(area_list), 1)])
# ax.set_xticklabels(area_list, rotation=90, size=6.)
ax.set_yticks([i + 0.5 for i in np.arange(0, len(area_list) + 1, 1)])
# ax.set_yticks([i + 0.5 for i in np.arange(0, len(area_list) + 1, 1)])
ax.set_yticks([i + 0.5 for i in np.arange(0, len(area_list), 1)])
# ax.set_yticklabels(area_list[::-1], size=6.)
ax.set_ylabel('Target area')
......
This diff is collapsed.
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