Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
Public Member Functions | Public Attributes | List of all members
auryn::VoltageClampMonitor Class Reference

Implements a voltage clamp for one neuron and records the clamp current. More...

#include <VoltageClampMonitor.h>

Inheritance diagram for auryn::VoltageClampMonitor:
Inheritance graph
[legend]
Collaboration diagram for auryn::VoltageClampMonitor:
Collaboration graph
[legend]

Public Member Functions

 VoltageClampMonitor (NeuronGroup *source, NeuronID id, string filename)
 Default constructor. More...
 
virtual ~VoltageClampMonitor ()
 The default destructor. More...
 
void execute ()
 
- Public Member Functions inherited from auryn::VoltageMonitor
 VoltageMonitor (NeuronGroup *source, NeuronID id, string filename, AurynDouble stepsize=auryn_timestep)
 
virtual ~VoltageMonitor ()
 
void execute ()
 
- Public Member Functions inherited from auryn::StateMonitor
 StateMonitor (SpikingGroup *source, NeuronID id, string statename, string filename, AurynDouble sampling_interval=auryn_timestep)
 Standard constructor. More...
 
 StateMonitor (AurynStateVector *state, NeuronID id, string filename, AurynDouble sampling_interval=auryn_timestep)
 Alternative constructor. More...
 
 StateMonitor (AurynSynStateVector *state, NeuronID id, string filename, AurynDouble sampling_interval=auryn_timestep)
 Alternative constructor for synaptic states. More...
 
 StateMonitor (Trace *trace, NeuronID id, string filename, AurynDouble sampling_interval=auryn_timestep)
 Trace constructor. More...
 
void record_for (AurynDouble time=10.0)
 Sets relative time at which to stop recording. More...
 
void set_stop_time (AurynDouble time=10.0)
 Set an absolute time when to stop recording. More...
 
void set_step_size (int step=1)
 Sets the step size. More...
 
virtual ~StateMonitor ()
 
- Public Member Functions inherited from auryn::Monitor
virtual void flush ()
 Flush to file. More...
 
 Monitor (std::string filename, std::string default_extension="dat")
 Standard constructor with file name. More...
 
 Monitor ()
 Constructor which does not open a text file for output. More...
 
std::string generate_filename (std::string name_hint="")
 Generates a default filename from the device ID. More...
 
virtual ~Monitor ()
 Standard destructor. More...
 
- Public Member Functions inherited from auryn::Device
 Device ()
 Standard constructor. More...
 
void set_name (std::string s)
 Set device name. More...
 
std::string get_name ()
 Get device name. More...
 
int get_id ()
 Get numeric device id. More...
 
virtual ~Device ()
 Standard destructor. More...
 
virtual void evolve ()
 

Public Attributes

bool clamp_enabled
 Clamp active. More...
 
AurynState clamping_voltage
 The clamping voltage. More...
 
- Public Attributes inherited from auryn::VoltageMonitor
AurynTime paste_spikes
 Paste spikes switch (default = true) More...
 
- Public Attributes inherited from auryn::StateMonitor
bool enable_compression
 Switch to enable/disable output compression. More...
 
- Public Attributes inherited from auryn::Monitor
bool active
 Standard active switch. More...
 
- Public Attributes inherited from auryn::Device
bool active
 Standard active switch. More...
 

Additional Inherited Members

- Protected Member Functions inherited from auryn::VoltageMonitor
void init ()
 Standard initialization. More...
 
- Protected Member Functions inherited from auryn::StateMonitor
void init (string filename, AurynDouble stepsize)
 Standard initialization. More...
 
- Protected Member Functions inherited from auryn::Monitor
virtual void open_output_file (std::string filename)
 
virtual void virtual_serialize (boost::archive::binary_oarchive &ar, const unsigned int version)
 
virtual void virtual_serialize (boost::archive::binary_iarchive &ar, const unsigned int version)
 
- Protected Member Functions inherited from auryn::Device
void init ()
 Standard initializer to be called by the constructor. More...
 
- Protected Attributes inherited from auryn::StateMonitor
SpikingGroupsrc
 The source SpikingGroup to record from. More...
 
AurynStatetarget_variable
 Target variable. More...
 
AurynState lastval
 Last value (used for compression) More...
 
AurynState lastder
 
NeuronID nid
 The source neuron id to record from. More...
 
AurynTime ssize
 The step size (sampling interval) in units of auryn_timestep. More...
 
AurynTime t_stop
 Defines the maximum recording time in AurynTime to save space. More...
 
- Protected Attributes inherited from auryn::Monitor
std::ofstream outfile
 
std::string fname
 
std::string default_file_extension
 
- Protected Attributes inherited from auryn::Device
std::string device_name
 Identifying name for device. More...
 

Detailed Description

Implements a voltage clamp for one neuron and records the clamp current.

The Monitor puts a single cell in voltage clamp and records the membrane current required ot keep the clamp.

Constructor & Destructor Documentation

◆ VoltageClampMonitor()

VoltageClampMonitor::VoltageClampMonitor ( NeuronGroup source,
NeuronID  id,
std::string  filename 
)

Default constructor.

Parameters
sourceThe group to record and clamp
idThe neuron id to operate on
filenameThe filename to write the clamp current to
30  : VoltageMonitor(source, id, filename)
31 {
32  clamping_voltage = -70e-3;
33  clamp_enabled = true;
34 }
VoltageMonitor(NeuronGroup *source, NeuronID id, string filename, AurynDouble stepsize=auryn_timestep)
Definition: VoltageMonitor.cpp:30
bool clamp_enabled
Clamp active.
Definition: VoltageClampMonitor.h:53
AurynState clamping_voltage
The clamping voltage.
Definition: VoltageClampMonitor.h:56

◆ ~VoltageClampMonitor()

VoltageClampMonitor::~VoltageClampMonitor ( )
virtual

The default destructor.

37 {
38 }

Member Function Documentation

◆ execute()

void VoltageClampMonitor::execute ( )
virtual

Virtual execute function to be called at the end of central simulation loop in System

Reimplemented from auryn::StateMonitor.

41 {
42  if ( clamp_enabled && auryn::sys->get_clock() < t_stop ) {
43  AurynState * voltage = target_variable;
44  AurynState pseudo_current = clamping_voltage-*voltage;
45  // TODO a unitful quantity would be nice here ...
46  *voltage += pseudo_current;
47  outfile << (auryn::sys->get_time()) << " " << pseudo_current << "\n";
48  }
49 }
std::ofstream outfile
Definition: Monitor.h:58
AurynFloat AurynState
Type for Auryn state variables (default single precision since it needs to be compatible with auryn_v...
Definition: auryn_definitions.h:160
System * sys
Global pointer to instance of System which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:37
bool clamp_enabled
Clamp active.
Definition: VoltageClampMonitor.h:53
AurynDouble get_time()
Gets the current system time in [s].
Definition: System.cpp:226
AurynState * target_variable
Target variable.
Definition: StateMonitor.h:47
AurynTime t_stop
Defines the maximum recording time in AurynTime to save space.
Definition: StateMonitor.h:60
AurynState clamping_voltage
The clamping voltage.
Definition: VoltageClampMonitor.h:56
Here is the call graph for this function:

Member Data Documentation

◆ clamp_enabled

bool auryn::VoltageClampMonitor::clamp_enabled

Clamp active.

◆ clamping_voltage

AurynState auryn::VoltageClampMonitor::clamping_voltage

The clamping voltage.


The documentation for this class was generated from the following files: