The GroupMonitor class allows a user record group data (only support dopamine concentration for now) from a particular neuron group. First the method CARLsim::setGroupMonitor must be called with the group ID of the desired group as an argument. The setGroupMonitor call returns a pointer to a GroupMonitor object which can be queried for group data.
Group data will not be recorded until the GroupMonitor member function startRecording() is called. Before any metrics can be computed, the user must call stopRecording(). In general, a new recording period (the time period between startRecording and stopRecording calls) can be started at any point in time, and can last any number of milliseconds. The GroupMonitor has a PersistentMode, which is off by default. When PersistentMode is off, only the last recording period will be considered. When PersistentMode is on, all the recording periods will be considered. By default, PersistentMode can be switched on/off by calling setPersistentData(bool). The total time over which the metric is calculated can be retrieved by calling getRecordingTotalTime().
GroupMonitor objects should only be used after setupNetwork has been called. GroupMonitor objects will be deallocated automatically. The caller should not delete(free) GroupMonitor objects
Example usage:
daGroupMon->print();
float avgDAValue = daGroupMon->getMeanValue();
- TODO:
- finish documentation
Definition at line 107 of file group_monitor.h.
std::vector< float > getDataVector |
( |
| ) |
|
This function returns a vector containing all group data (only support dopamine concentration for now) If PersistentMode is off, only the last recording period will be considered for calculating metrics. If PersistentMode is on, all the recording periods will be considered. By default, PersistentMode is off, but can be switched on at any point in time by calling setPersistentData(bool).
- Returns
- 1D vector of float values presenting dopamine concentration
Definition at line 124 of file group_monitor.cpp.
std::vector< int > getPeakTimeVector |
( |
| ) |
|
This function returns a vector containing all timestamps of peaks (local maximum value) in group data. If PersistentMode is off, only the last recording period will be considered for calculating metrics. If PersistentMode is on, all the recording periods will be considered. By default, PersistentMode is off, but can be switched on at any point in time by calling setPersistentData(bool).
- Returns
- 1D vector of int values presenting the timestamps of peaks
Definition at line 148 of file group_monitor.cpp.
std::vector< float > getPeakValueVector |
( |
| ) |
|
This function returns a vector containing all peak values for group data. If PersistentMode is off, only the last recording period will be considered for calculating metrics. If PersistentMode is on, all the recording periods will be considered. By default, PersistentMode is off, but can be switched on at any point in time by calling setPersistentData(bool).
- Returns
- 1D vector of float values which are peaks (local maximum values) in group data
Definition at line 162 of file group_monitor.cpp.
std::vector< int > getSortedPeakTimeVector |
( |
| ) |
|
This function returns a vector containing all timestamps for sorted peak values (sorted in decending order) In other word, the first element in the vector is the timestamp of the highest peak in recording duration. If PersistentMode is off, only the last recording period will be considered for calculating metrics. If PersistentMode is on, all the recording periods will be considered. By default, PersistentMode is off, but can be switched on at any point in time by calling setPersistentData(bool).
- Returns
- 1D vector of int values presenting the timestamps of sorted peaks
Definition at line 155 of file group_monitor.cpp.
std::vector< float > getSortedPeakValueVector |
( |
| ) |
|
This function returns a vector containing all sorted peak values in group data (sorted in decending order). In other word, the first element in the vector is the highest peak value in recording duration. If PersistentMode is off, only the last recording period will be considered for calculating metrics. If PersistentMode is on, all the recording periods will be considered. By default, PersistentMode is off, but can be switched on at any point in time by calling setPersistentData(bool).
- Returns
- 1D vector of float values presenting sorted peaks
Definition at line 169 of file group_monitor.cpp.
void setPersistentData |
( |
bool |
persistentData | ) |
|
This function sets PersistentMode either on (true) or off (false). If PersistentMode is off, only the last recording period will be considered for calculating metrics. If PersistentMode is on, all the recording periods will be considered. By default, PersistentMode is off, but can be switched on at any point in time. The current state of PersistentMode can be retrieved by calling getPersistentData().
Definition at line 120 of file group_monitor.cpp.
This function starts a new recording period. From that moment onward, the data vector will be populated with all the concentrations of enabled neuromodulators of the group. Before any metrics can be computed, the user must call stopRecording(). Recording periods must be ended with stopRecording(). In general, a new recording period can be started at any point in time, and can last any number of milliseconds. If PersistentMode is off, only the last recording period will be considered. If PersistentMode is on, all the recording periods will be considered. By default, PersistentMode is off, and can be switched on by calling setPersistentData(bool). The total time over which the metric is calculated can be retrieved by calling getRecordingTotalTime().
Definition at line 74 of file group_monitor.cpp.