-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from OpenSourceBrain/test_pynn3
Add export of new PyNN to NeuroML
- Loading branch information
Showing
9 changed files
with
59,392 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
# Script for running automated tests on OSB using Travis-CI, see https://github.com/OpenSourceBrain/osb-model-validation | ||
# Still in development, subject to change without notice!! | ||
|
||
# This test will validate all of the NeuroML 2 files in the current directory using: jnml -validate *.nml | ||
target: "*.nml" | ||
# Script for running automated tests on OSB, see https://github.com/OpenSourceBrain/osb-model-validation | ||
|
||
target: "*.nml" | ||
engine: jNeuroML_validate |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
cd ../PyNN | ||
python test_neuroml.py | ||
|
||
cp *.nml LEMS*ml ../NeuroML2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
PyNN microcircuit example | ||
--------------------------- | ||
Export to NeuroML of the microcircuit. | ||
""" | ||
|
||
import time | ||
import numpy as np | ||
import network | ||
from network_params import net_dict | ||
from sim_params import sim_dict | ||
from stimulus_params import stim_dict | ||
import os | ||
|
||
from test import setup | ||
|
||
def export(net): | ||
|
||
# Export. | ||
tic = time.time() | ||
print("Exporting...") | ||
net.simulate() | ||
net.sim.end() | ||
toc = time.time() - tic | ||
print("Time to export: %.2f s" % toc) | ||
|
||
|
||
|
||
if __name__ == "__main__": | ||
net, net_dict, sim_dict = setup(simulator='neuroml', | ||
N_scaling=0.002) | ||
export(net) |