Auryn simulator
v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
|
Records from an arbitray state vector of one unit from the source SpikingGroup to a file. More...
#include <StateMonitor.h>
Public Member Functions | |
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 () |
void | execute () |
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 | 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... | |
Protected Member Functions | |
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 | |
SpikingGroup * | src |
The source SpikingGroup to record from. More... | |
AurynState * | target_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... | |
Records from an arbitray state vector of one unit from the source SpikingGroup to a file.
StateMonitor::StateMonitor | ( | SpikingGroup * | source, |
NeuronID | id, | ||
std::string | statename, | ||
std::string | filename, | ||
AurynDouble | sampling_interval = auryn_timestep |
||
) |
Standard constructor.
source | The neuron group to record from |
id | The neuron id in the group to record from |
statename | The name of the StateVector to record from |
filename | The filename of the file to dump the output to |
sampling_interval | The sampling interval in seconds |
StateMonitor::StateMonitor | ( | AurynStateVector * | state, |
NeuronID | id, | ||
std::string | filename, | ||
AurynDouble | sampling_interval = auryn_timestep |
||
) |
Alternative constructor.
state | The source state vector |
filename | The filename of the file to dump the output to |
sampling_interval | The sampling interval in seconds |
StateMonitor::StateMonitor | ( | AurynSynStateVector * | state, |
NeuronID | id, | ||
std::string | filename, | ||
AurynDouble | sampling_interval = auryn_timestep |
||
) |
Alternative constructor for synaptic states.
state | The source state vector |
filename | The filename of the file to dump the output to |
sampling_interval | The sampling interval in seconds |
StateMonitor::StateMonitor | ( | Trace * | trace, |
NeuronID | id, | ||
std::string | filename, | ||
AurynDouble | sampling_interval = auryn_timestep |
||
) |
Trace constructor.
trace | The source synaptic trace |
filename | The filename of the file to dump the output to |
sampling_interval | The sampling interval in seconds |
|
virtual |
|
virtual |
Virtual execute function to be called at the end of central simulation loop in System
Reimplemented from auryn::Device.
Reimplemented in auryn::VoltageClampMonitor, and auryn::VoltageMonitor.
|
protected |
Standard initialization.
void StateMonitor::record_for | ( | AurynDouble | time = 10.0 | ) |
Sets relative time at which to stop recording.
The time is given in seconds and interpreted as relative time with respect to the current clock value. This features is useful to decrease IO. The stop time can be set again after calling run to record multiple snippets.
void StateMonitor::set_step_size | ( | int | step = 1 | ) |
Sets the step size.
Sets the sampling interval using units of AurynTime.
step | The step size |
void StateMonitor::set_stop_time | ( | AurynDouble | time = 10.0 | ) |
Set an absolute time when to stop recording.
bool auryn::StateMonitor::enable_compression |
Switch to enable/disable output compression.
When set to true, Auryn will compute the derivative of two consecutive datapoints of the state and only a value if the derivative changes. The correct function can then be recovered with linear interpolation (i.e. plotting in gnuplot with lines will yield the correct output). When compression is enabled the last value written to file always by one timestep with respect to the simulation clock. enable_compression is true by default.
|
protected |
|
protected |
Last value (used for compression)
|
protected |
The source neuron id to record from.
|
protected |
The source SpikingGroup to record from.
|
protected |
The step size (sampling interval) in units of auryn_timestep.
|
protected |
Defines the maximum recording time in AurynTime to save space.
|
protected |
Target variable.