/*
* multimeter.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/>.
*
*/
/*
This file illustrates recording from a iaf_cond_alpha neuron
using a multimeter.
*/
ResetKernel
% print recordables for illustration
(iaf_cond_alpha recordables: ) =only
/iaf_cond_alpha GetDefaults /recordables get ==
% Create neuron and multimeter
/iaf_cond_alpha Create /n Set
/multimeter Create /m Set
m << /interval 0.1
/record_from [/V_m /g_ex /g_in]
/withtime true
>> SetStatus
% connect multimeter to neuron
m n Connect
% Create spike generators and connect
/spike_generator Create dup << /spike_times [10.0 20.0 50.0] >> SetStatus /gex Set
/spike_generator Create dup << /spike_times [15.0 25.0 55.0] >> SetStatus /gin Set
gex n 200.0 1.0 Connect % excitatory input
gin n -20.0 1.0 Connect % inhibitory input
% simulate
100 Simulate
% obtain and display data
m /events get /me Set
me /V_m get ==
me /g_ex get ==
me /g_in get ==
me /times get ==