/*
 *  reg_mask_rect_11.sli
 *
 *  This file is part of NEST.
 *
 *  Copyright (C) 2004 The NEST Initiative
 *
 *  NEST is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  NEST is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

% to be run before run_test.sli

%  Setup:
%  - 5x5 -> 5x5, extent 1.25x1.25 -> -0.5, -0.25, 0, 0.25, 0.5
%  - rectangular mask ll: [0.,0.] ur: [0.6,0.3]
%  - anchor [-0.5, -0.25]
%  - periodic bc
%
%  Expectation:
%  - anchor moves rectangle to lower left of source
%  - for source 14 [0.0,0.0] box-ll at [-0.5,-0.25], ie 5, ie T:31
%  - for source 14, box-ur at [0.1, 0.05], ie top-right of 14, ie T:40
%
%    Sources                      Targets
%     2  7 12 17 22    	          28 33 38 43 48
%     3  8 13 18 23		  29 34	39 44 49
%     4	 9 14 19 24		  30 35	40 45 50
%     5	10 15 20 25		  31 36	41 46 51
%     6	11 16 21 26		  32 37	42 47 52
%
%    Exemplary connections
%      2 -> 28 43 48       17 -> 33 38 43   22 -> 38 43 48
%	    29 44 49		 34 39 44	  39 44 49
%
%      6 -> 32 47 52       21 -> 37 42 47   26 -> 42 47 52
%           28 43 48             33 38 43         38 43 48  

/layer << /rows 5
          /columns 5
          /extent [1.25 1.25]
          /center [0. 0.]
          /edge_wrap true
          /elements /iaf_neuron
        >> def

/src_layer layer def
/tgt_layer layer def

/conns << /connection_type (divergent)
          /mask << /rectangular << /lower_left [0.0 0.0] /upper_right [0.6 0.3] >>
                   /anchor      [ -0.5 -0.25 ]
                >>
       >> def

