51 #ifndef _SPIKE_MON_CORE_H_ 52 #define _SPIKE_MON_CORE_H_ 157 void print(
bool printSpikeTimes);
160 void pushAER(
int time,
int neurId);
206 void calculateFiringRates();
209 void sortFiringRates();
212 void writeSpikeFileHeader();
215 bool needToCalculateFiringRates_;
218 bool needToSortFiringRates_;
221 bool needToWriteFileHeader_;
229 int spikeFileSignature_;
230 float spikeFileVersion_;
233 std::vector<std::vector<int> > spkVector_;
235 std::vector<float> firingRates_;
236 std::vector<float> firingRatesSorted_;
240 long int startTimeLast_;
245 long int spkMonLastUpdated_;
248 bool persistentData_;
251 bool userHasBeenWarned_;
int getGrpNumNeurons()
returns number of neurons in the group
FILE * getSpikeFileId()
returns a pointer to the spike file
int getNumNeuronsWithFiringRate(float min, float max)
returns number of neurons whose firing rate was in [min,max] during recording
void clear()
deletes data from the 2D spike vector
SpikeMonMode
SpikeMonitor mode.
int getGrpId()
returns the group ID
void setMode(SpikeMonMode mode)
sets recording mode
std::vector< float > getAllFiringRates()
returns a list of firing rates for all neurons in the group (sorted by neuron ID ascending) ...
int getNumSilentNeurons()
returns number of neurons that didn't spike while recording
long int getRecordingStopTime()
returns the timestamp of stopRecording
float getPercentSilentNeurons()
returns percentage of neurons that didn't spike during recording
std::vector< float > getAllFiringRatesSorted()
returns a list of firing rates for all neurons in the group (sorted by firing rate ascending) ...
long int getRecordingTotalTime()
returns the total recorded time in ms
bool isBufferBig()
returns true if spike buffer is close to maxAllowedBufferSize
int getMonitorId()
returns the SpikeMonitor ID
SpikeMonMode getMode()
returns recording mode
float getPercentNeuronsWithFiringRate(float min, float max)
returns percentage of neurons whose firing rate was in [min,max] during recording ...
float getNeuronMeanFiringRate(int neurId)
returns the recorded mean firing rate for a specific neuron
void setLastUpdated(long int lastUpdate)
sets timestamp of last SpikeMonitor update
long int getLastUpdated()
returns timestamp of last SpikeMonitor update
int getNeuronNumSpikes(int neurId)
returns the number of recorded spikes of a specific neuron
std::vector< std::vector< int > > getSpikeVector2D()
returns the 2D AER vector
void startRecording()
starts recording AER data
void setSpikeFileId(FILE *spikeFileId)
sets pointer to spike file
float getMaxFiringRate()
returns the largest recorded firing rate
void setPersistentData(bool persistentData)
sets status of PersistentData mode
long int getAccumTime()
returns the total accumulated time
long int getRecordingStartTime()
retunrs the timestamp of the first startRecording in ms
long int getRecordingLastStartTime()
returns the timestamp of the last startRecording in ms
void print(bool printSpikeTimes)
prints the AER vector in human-readable format
int getPopNumSpikes()
returns the total number of recorded spikes in the group
~SpikeMonitorCore()
destructor, cleans up all the memory upon object deletion
Contains all of CARLsim's core functionality.
float getMinFiringRate()
returns the smallest recorded firing rate
void pushAER(int time, int neurId)
inserts a (time,neurId) tupel into the 2D spike vector
bool isRecording()
returns recording status
bool getPersistentData()
returns status of PersistentData mode
float getPopStdFiringRate()
computes the standard deviation of firing rates in the group
float getPopMeanFiringRate()
returns the recorded mean firing rate of the group
void stopRecording()
stops recording AER data
SpikeMonitorCore(SNN *snn, int monitorId, int grpId)
constructor (called by CARLsim::setSpikeMonitor)
long int getBufferSize()
returns the approximate size of the spike vector in bytes