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

Port delay re-draw fix #10

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
15 changes: 11 additions & 4 deletions Potjans_2014/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,12 @@ def __connect_neuronal_populations(self):
std=(
self.net_dict['delay_matrix_mean'][i][j] *
self.net_dict['delay_rel_std'])),
min=self.sim_resolution,
max=np.inf)}
# resulting minimum delay is equal to resolution, see:
# https://nest-simulator.readthedocs.io/en/latest/nest_behavior
# /random_numbers.html#rounding-effects-when-randomizing-delays
min=nest.resolution - 0.5 * nest.resolution,
max=np.Inf)}

elif self.nest_version == '2':
syn_dict = {
'model': self.net_dict['synapse_type'],
Expand Down Expand Up @@ -774,8 +778,11 @@ def __connect_thalamic_stim_input(self):
std=(
self.stim_dict['delay_th_mean'] *
self.stim_dict['delay_th_rel_std'])),
min=self.sim_resolution,
max=np.inf)}
# resulting minimum delay is equal to resolution, see:
# https://nest-simulator.readthedocs.io/en/latest/nest_behavior
# /random_numbers.html#rounding-effects-when-randomizing-delays
min=nest.resolution - 0.5 * nest.resolution,
max=np.Inf)}

elif self.nest_version == '2':
syn_dict_th = {
Expand Down
9 changes: 6 additions & 3 deletions Potjans_2014/network_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,13 @@ def get_exc_inh_matrix(val_exc, val_inh, num_pops):
# mean rates of the different populations in the non-scaled version of the
# microcircuit (in spikes/s; same order as in 'populations');
# necessary for the scaling of the network.
# The values were optained by running this PyNEST microcircuit with 12 MPI
# processes and both 'N_scaling' and 'K_scaling' set to 1.
# The values were obtained by running this PyNEST microcircuit without MPI,
# 'local_num_threads' 4 and both 'N_scaling' and 'K_scaling' set to 1.
#
# Since these rates were only taken from one simulation, they alone are not sufficient for verification.
# For that, rates should be compared to mean values over multiple runs with different RNG seeds.
'full_mean_rates':
np.array([0.943, 3.026, 4.368, 5.882, 7.733, 8.664, 1.096, 7.851]),
np.array([0.903, 2.965, 4.414, 5.876, 7.569, 8.633, 1.105, 7.829]),
# connection probabilities (the first index corresponds to the targets
# and the second to the sources)
'conn_probs':
Expand Down
4 changes: 2 additions & 2 deletions multi-area-model/multiarea_model/simulation_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,8 @@ def connect(simulation,
mean=mean_delay,
std=mean_delay * network.params['delay_params']['delay_rel']
),
min=simulation.params['dt'],
max=np.inf)}
min=simulation.params['dt'] - 0.5 * nest.resolution,
max=np.Inf)}

nest.Connect(source_area.gids[source],
target_area.gids[target],
Expand Down