1/*
2 *  correlospinmatrix_detector.sli
3 *
4 *  This file is part of NEST.
5 *
6 *  Copyright (C) 2004 The NEST Initiative
7 *
8 *  NEST is free software: you can redistribute it and/or modify
9 *  it under the terms of the GNU General Public License as published by
10 *  the Free Software Foundation, either version 2 of the License, or
11 *  (at your option) any later version.
12 *
13 *  NEST is distributed in the hope that it will be useful,
14 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *  GNU General Public License for more details.
17 *
18 *  You should have received a copy of the GNU General Public License
19 *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23% autorun=true
24
25/* simple example of usage for the
26   correlospinmatrix detector
27*/
28
29modeldict begin
30
31/sg1 /spike_generator Create def
32/sg2 /spike_generator Create def
33/sg3 /spike_generator Create def
34
35/csd /correlospinmatrix_detector Create def
36/sr /spike_recorder << /record_to /screen >> Create def
37
38csd << /N_channels 3 /tau_max 10. /delta_tau 1.0 >> SetStatus
39
40sg1 << /spike_times [10. 10. 16.] >> SetStatus  % binary pulse starting at 10. ending at 16.
41sg2 << /spike_times [15. 15. 20.] >> SetStatus  % binary pulse starting at 15. ending at 20.
42
43sg1 GetStatus info
44
45sg1 sr << >> << /receptor_type 0 >> Connect
46
47% one final event needed so that last down transition will be detected
48sg3 << /spike_times [25.] >> SetStatus
49
50
51sg1 csd << >> << /receptor_type 0 >> Connect
52sg2 csd << >> << /receptor_type 1 >> Connect
53sg3 csd << >> << /receptor_type 2 >> Connect
54
55100. Simulate
56
57csd GetStatus 0 get /count_covariance get ==
58
59modeldict end
60