Skip to content

Commit

Permalink
merged with master
Browse files Browse the repository at this point in the history
  • Loading branch information
janhahne committed Nov 2, 2016
2 parents 7a777ea + 1fd378f commit 8784461
Show file tree
Hide file tree
Showing 53 changed files with 4,253 additions and 427 deletions.
3 changes: 3 additions & 0 deletions .mention-bot
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"userBlacklist": ["otizonaizit", "tammoippen"] // users in this list will never be mentioned by mention-bot
}
38 changes: 33 additions & 5 deletions extras/userdoc/md/documentation/connection-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ Example:
syn_dict ={"model": "static_synapse", "weight":2.5, "delay":0.5, 'receptor_type': 1}
Connect(A, B, syn_spec=syn_dict)

**Array** parameters can be used in conjunction with the rules 'one\_to\_one'
and 'all\_to\_all'. The arrays can be specified as numpy arrays or lists. As
for the scalar parameters, all parameters but the receptor types must be
specified as arrays of floats. For 'one\_to\_one' the array must have the same
length as the population vector.
**Array** parameters can be used in conjunction with the rules 'one\_to\_one',
'all\_to\_all', 'fixed\_indegree' and 'fixed\_outdegree'. The arrays can be
specified as numpy arrays or lists. As for the scalar parameters, all
parameters but the receptor types must be specified as arrays of floats.
For 'one\_to\_one' the array must have the same length as the population vector.

Example:

Expand All @@ -216,6 +216,34 @@ Example:
syn_dict = {'weight': [[1.2, -3.5, 2.5],[0.4, -0.2, 0.7]]}
Connect(A, B, syn_spec=syn_dict)

For 'fixed\_indegree' the array has to be a two-dimensional NumPy array
with shape (len(post), indegree), where indegree is the number of
incoming connections per target neuron, therefore the rows describe the
target and the columns the connections converging to the target neuron,
regardless of the identity of the source neurons.

Example:

A = Create("iaf_neuron", 5)
B = Create("iaf_neuron", 3)
conn_dict = {'rule': 'fixed_indegree', 'indegree': 2}
syn_dict = {'weight': [[1.2, -3.5],[0.4, -0.2],[0.6, 2.2]]}
Connect(A, B, conn_spec=conn_dict, syn_spec=syn_dict)

For 'fixed\_outdegree' the array has to be a two-dimensional NumPy array
with shape (len(pre), outdegree), where outdegree is the number of
outgoing connections per source neuron, therefore the rows describe the
source and the columns the connections starting from the source neuron
regardless of the identity of the target neuron.

Example:

A = Create("iaf_neuron", 2)
B = Create("iaf_neuron", 5)
conn_dict = {'rule': 'fixed_outdegree', 'outdegree': 3}
syn_dict = {'weight': [[1.2, -3.5, 0.4], [-0.2, 0.6, 2.2]]}
Connect(A, B, conn_spec=conn_dict, syn_spec=syn_dict)

**Distributed** parameters are initialized with yet another dictionary
specifying the 'distribution' and the distribution-specific parameters, whose
specification is optional.
Expand Down
2 changes: 1 addition & 1 deletion lib/sli/helpinit.sli
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ SeeAlso: SetOptions, help, helpindex
/:helpdesk_complete_command
{
/helpdesk /command GetOption
statusdict/hostos :: 6 Take (darwin) eq
(^darwin) statusdict/hostos :: regex_find
{
% OSX, must use open -a <cmd> <url>
(open -a ) exch join
Expand Down
3 changes: 3 additions & 0 deletions models/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ set( models_sources
aeif_cond_alpha_multisynapse.h aeif_cond_alpha_multisynapse.cpp
aeif_cond_beta_multisynapse.h aeif_cond_beta_multisynapse.cpp
aeif_cond_exp.h aeif_cond_exp.cpp
aeif_psc_alpha.h aeif_psc_alpha.cpp
aeif_psc_exp.h aeif_psc_exp.cpp
amat2_psc_exp.h amat2_psc_exp.cpp
binary_neuron.h binary_neuron_impl.h
cont_delay_connection.h cont_delay_connection_impl.h
Expand Down Expand Up @@ -94,6 +96,7 @@ set( models_sources
tsodyks_connection_hom.h tsodyks_connection_hom.cpp
volume_transmitter.h volume_transmitter.cpp
vogels_sprekeler_connection.h
weight_recorder.h weight_recorder.cpp
spike_dilutor.h spike_dilutor.cpp
)

Expand Down
7 changes: 6 additions & 1 deletion models/aeif_cond_alpha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ nest::aeif_cond_alpha_dynamics_DT0( double,
* ---------------------------------------------------------------- */

nest::aeif_cond_alpha::Parameters_::Parameters_()
: V_peak_( 0.0 ) // mV, should not be larger that V_th+10
: V_peak_( 0.0 ) // mV
, V_reset_( -60.0 ) // mV
, t_ref_( 0.0 ) // ms
, g_L( 30.0 ) // nS
Expand Down Expand Up @@ -303,6 +303,11 @@ nest::aeif_cond_alpha::Parameters_::set( const DictionaryDatum& d )
}
}

if ( V_peak_ < V_th )
{
throw BadProperty( "V_peak >= V_th required." );
}

if ( C_m <= 0 )
{
throw BadProperty( "Capacitance must be strictly positive." );
Expand Down
11 changes: 8 additions & 3 deletions models/aeif_cond_alpha_multisynapse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ RecordablesMap< aeif_cond_alpha_multisynapse >::create()
* ---------------------------------------------------------------- */

aeif_cond_alpha_multisynapse::Parameters_::Parameters_()
: V_peak_( 0.0 ) // mV, should not be larger that V_th+10
: V_peak_( 0.0 ) // mV
, V_reset_( -60.0 ) // mV
, t_ref_( 0.0 ) // ms
, g_L( 30.0 ) // nS
Expand Down Expand Up @@ -234,9 +234,14 @@ aeif_cond_alpha_multisynapse::Parameters_::set( const DictionaryDatum& d )
HMIN = tmp;
}

if ( V_peak_ <= V_th )
if ( V_peak_ < V_th )
{
throw BadProperty( "V_peak must be larger than threshold." );
throw BadProperty( "V_peak >= V_th required." );
}

if ( V_reset_ >= V_peak_ )
{
throw BadProperty( "Ensure that: V_reset < V_peak ." );
}

if ( Delta_T < 0. )
Expand Down
Loading

0 comments on commit 8784461

Please sign in to comment.