% to be run before run_test.sli
% this tests checks if weights and delays can be set to
% arbitrary values within the limits set by resolution
%
% It creates a grid with a single row and uses linear functions for weights and delays
% Expected weights are 1., 0.98, 0.96, 0.94, 0.92, 0.90, 0.88, 0.86, 0.84, 0.82
% Expected delays with resolution 0.04 are 1.0 0.96 0.96 0.92 0.92 0.88 0.84
/layer << /rows 1
/columns 10
/extent [10. 1.]
/center [0. 0.]
/edge_wrap true
/elements /iaf_neuron
>> def
/src_layer layer def
/tgt_layer layer def
/conns << /connection_type (divergent)
/mask << /grid << /rows 1 /columns 10 >> /anchor << /row 0 /column 0 >> >>
/weights << /linear << /c 1.0 /a -0.02 >> >>
/delays << /linear << /c 1.0 /a -0.02 >> >>
>> def
% required to make sure that resolution goes into userdict
userdict begin
/resolution 0.04 def
end