From c94117064d30df79d90d2b39c08d72ee8a830e70 Mon Sep 17 00:00:00 2001 From: Ryan Thorpe Date: Wed, 5 Jun 2024 12:05:43 -0400 Subject: [PATCH] lock in poisson seed before setting drives in sim_dev_spiking() --- rs_dd_project/plot_simulate_rep_L6.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rs_dd_project/plot_simulate_rep_L6.py b/rs_dd_project/plot_simulate_rep_L6.py index 632c3af37..7f056a92b 100644 --- a/rs_dd_project/plot_simulate_rep_L6.py +++ b/rs_dd_project/plot_simulate_rep_L6.py @@ -83,6 +83,12 @@ def sim_dev_spiking(dev_magnitude=-1, n_trials=1, burn_in_time=300.0, net = L6_model(layer_6_fb=True, rng=rng, grid_shape=grid_shape) net.set_cell_positions(inplane_distance=300.0) + # before we continue, sample a random integer to serve as seed for the + # baseline (poisson) drive - this will keep baseline drive constant + # despite differences between the evoked drive event sampling on dev vs. + # non-dev sims + poisson_seed = int(rng.integers(0, np.iinfo(np.int32).max)) + ########################################################################### # Add drives # note: first define syn weights associated with proximal drive that will @@ -194,7 +200,7 @@ def sim_dev_spiking(dev_magnitude=-1, n_trials=1, burn_in_time=300.0, burn_in_time=burn_in_time, n_trials=n_trials, n_procs=n_procs, poiss_params=poiss_drive_params, - record_vsec=record_vsec, rng=rng) + record_vsec=record_vsec, rng=poisson_seed) # window_len, scaling_factor = 30, 2000 # for dpl in dpls: