Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diff exp dev #22

Draft
wants to merge 13 commits into
base: experimental
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/omv-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:


steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ NEST_SLI/*.gdf
/PyNN/*.mod
/PyNN/*.net.nml
/PyNN/tests.log
/PyNN/data/2024*
/p0/*
/NeuroML2/*.dat
/PyNN/LEMS_Sim_Microcircuit*.xml
/NeuroML2/*.spikes
/NeuroML2/Microcircuit*.gv
8 changes: 3 additions & 5 deletions NeuroML2/.test.validate.omt
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
277 changes: 277 additions & 0 deletions NeuroML2/LEMS_Sim_Microcircuit_0_2pcnt.xml

Large diffs are not rendered by default.

58,938 changes: 58,938 additions & 0 deletions NeuroML2/Microcircuit_0_2pcnt.net.nml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions NeuroML2/regenerate.sh
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
16 changes: 8 additions & 8 deletions PyNN/.test.pynn.mep
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ experiments:

spike_rate_l23e:
expected:
spike rate: 1.6693811074918568 # Note: this reflects only rate of cells that spiked at least once...
spike rate: 1.4385775862068966 # Note: this reflects only rate of cells that spiked at least once...
spike_rate_l23i:
expected:
spike rate: 3.643617021276596
spike rate: 3.44954128440367
spike_rate_l4e:
expected:
spike rate: 4.9837255883825735
spike rate: 4.850835322195704
spike_rate_l4i:
expected:
spike rate: 7.290489642184557
spike rate: 7.12312734082397
spike_rate_l5e:
expected:
spike rate: 7.753623188405797
spike rate: 7.869022869022869
spike_rate_l5i:
expected:
spike rate: 8.016826923076923
spike rate: 7.85377358490566
spike_rate_l6e:
expected:
spike rate: 2.094361334867664
spike rate: 1.8208245243128964
spike_rate_l6i:
expected:
spike rate: 8.274828767123287
spike rate: 8.225255972696246
2 changes: 1 addition & 1 deletion PyNN/.test.pynnnest.comparison.omt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Script for running automated tests on OSB using Travis-CI, see https://github.com/OpenSourceBrain/osb-model-validation

target: microcircuit.py
target: test.py
engine: PyNN_Nest
mep: ../PyNEST/.test.pynest.mep
experiments:
Expand Down
2 changes: 1 addition & 1 deletion PyNN/.test.pynnnest.omt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Script for running automated tests on OSB using Travis-CI, see https://github.com/OpenSourceBrain/osb-model-validation

target: microcircuit.py
target: test.py
engine: PyNN_Nest
mep: .test.pynn.mep
experiments:
Expand Down
95 changes: 0 additions & 95 deletions PyNN/README.md

This file was deleted.

22 changes: 0 additions & 22 deletions PyNN/connectivity.py

This file was deleted.

49 changes: 49 additions & 0 deletions PyNN/example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
"""
PyNN microcircuit example
---------------------------

Example file to run the microcircuit.

Based on original PyNEST version by Hendrik Rothe, Hannah Bos, Sacha van Albada; May 2016
Adapted for PyNN by Andrew Davison, December 2017

"""

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


# Initialize the network and pass parameters to it.
tic = time.time()
net = network.Network(sim_dict, net_dict, stim_dict)
toc = time.time() - tic
print("Time to initialize the network: %.2f s" % toc)
# Connect all nodes.
tic = time.time()
net.setup()
toc = time.time() - tic
print("Time to create the connections: %.2f s" % toc)
# Simulate.
tic = time.time()
net.simulate()
toc = time.time() - tic
print("Time to simulate: %.2f s" % toc)
tic = time.time()
net.write_data()
toc = time.time() - tic
print("Time to write data: %.2f s" % toc)
# Plot a raster plot of the spikes of the simulated neurons and the average
# spike rate of all populations. For visual purposes only spikes 100 ms
# before and 100 ms after the thalamic stimulus time are plotted here by
# default. The computation of spike rates discards the first 500 ms of
# the simulation to exclude initialization artifacts.
raster_plot_time_idx = np.array(
[stim_dict['th_start'] - 100.0, stim_dict['th_start'] + 100.0]
)
fire_rate_time_idx = np.array([500.0, sim_dict['t_sim']])
net.evaluate(raster_plot_time_idx, fire_rate_time_idx)
Loading
Loading