Hi Dan,
I've finally gotten around to making the switch from PoissonGroup to PoissonInput. Unfortunately, after making this switch, I've seen drastic changes in my results that imply I must have done something wrong. Here is a git diff that shows my PoissonGroup (the old) and PoissonInput (the new) implementations:
-fext = 1800.0 * brian2.hertz
+n_ext = 1000
+f_ext = 1.8 * brian2.hertz
sim_dt = 0.02 *
brian2.ms @@ -152,11 +153,6 @@ if __name__ == '__main__':
clock=simulation_clock, method='rk2',
namespace=name_space['mt']['inh'])
- pg_e_pfc = brian2.PoissonGroup(NE, fext, clock=simulation_clock)
- pg_i_pfc = brian2.PoissonGroup(NI, fext, clock=simulation_clock)
- pg_e_mt = brian2.PoissonGroup(NE, fext, clock=simulation_clock)
- pg_i_mt = brian2.PoissonGroup(NI, fext, clock=simulation_clock)
-
# -------------------------------------------------------------------------
# AMPA Connections
# -------------------------------------------------------------------------
@@ -214,15 +210,10 @@ if __name__ == '__main__':
# External Connections (from Unmodeled Cortical Areas)
# -------------------------------------------------------------------------
- cpe_pfc = brian2.Synapses(pg_e_pfc, pe_pfc, pre='s_ext += 1',
- connect='i == j', clock=simulation_clock)
- cpi_pfc = brian2.Synapses(pg_i_pfc, pi_pfc, pre='s_ext += 1',
- connect='i == j', clock=simulation_clock)
-
- cpe_mt = brian2.Synapses(pg_e_mt, pe_mt, pre='s_ext += 1',
- connect='i == j', clock=simulation_clock)
- cpi_mt = brian2.Synapses(pg_i_mt, pi_mt, pre='s_ext += 1',
- connect='i == j', clock=simulation_clock)
+ pg_e_pfc = brian2.PoissonInput(pe_pfc, 's_ext', n_ext, f_ext, weight=1)
+ pg_i_pfc = brian2.PoissonInput(pi_pfc, 's_ext', n_ext, f_ext, weight=1)
+ pg_e_mt = brian2.PoissonInput(pe_mt, 's_ext', n_ext, f_ext, weight=1)
+ pg_i_mt = brian2.PoissonInput(pi_mt, 's_ext', n_ext, f_ext, weight=1)
My first guess is that it was a mistake to set weight to an int. Perhaps it should be '1' (a string)? (Another difference between the old and new implementations is that the new one uses 1000 units at 1.8 Hz, rather than 1 unit at 1800 Hz -- though I believe these should be equivalent.)