-
Notifications
You must be signed in to change notification settings - Fork 2
/
build_nestml_models.py
39 lines (29 loc) · 1.32 KB
/
build_nestml_models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import nest
from pynestml.frontend.pynestml_frontend import generate_nest_target
#################################################
## create nest models from nestml
path_to_nestml_models = '../nestml_models'
# def install_nestml_module():
# input_path = [path_to_nestml_models + "/iaf_psc_alpha.nestml"
# ]
# target_path = "./nestml_target"
# generate_nest_target(input_path=input_path,
# target_path=target_path,
# logging_level='ERROR',
# suffix="_nestml",
# )
def install_nestml_module():
input_path = [path_to_nestml_models + "/iaf_psc_alpha.nestml",
path_to_nestml_models + "/stdp_pl_synapse.nestml"
]
target_path = "./nestml_target"
generate_nest_target(input_path=input_path,
target_path=target_path,
logging_level='ERROR',
suffix="_nestml",
codegen_opts = {"neuron_synapse_pairs": [{"neuron": "iaf_psc_alpha",
"synapse": "stdp_pl",
"post_ports": ["post_spikes"]}]}
)
#################################################
install_nestml_module()