diff --git a/Potjans_2014/network.py b/Potjans_2014/network.py index 99e86ae..12169f3 100644 --- a/Potjans_2014/network.py +++ b/Potjans_2014/network.py @@ -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'], @@ -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 = { diff --git a/Potjans_2014/network_params.py b/Potjans_2014/network_params.py index 03cd213..e5cfcbf 100644 --- a/Potjans_2014/network_params.py +++ b/Potjans_2014/network_params.py @@ -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': diff --git a/multi-area-model/multiarea_model/simulation_3.py b/multi-area-model/multiarea_model/simulation_3.py index be618da..424bf03 100755 --- a/multi-area-model/multiarea_model/simulation_3.py +++ b/multi-area-model/multiarea_model/simulation_3.py @@ -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],