MUAData¶
General description¶
Data packet of the MUAData type describes the multi-unit activity by the frequency of spikes in a bin.
Payload details¶
name |
type |
description |
---|---|---|
mua |
double |
number of spikes / size of the bin * 1e3 |
API¶
-
class Data : public Base::Data
Public Functions
-
void Initialize(double bin_size)
-
void Initialize(const Parameters ¶meters)
-
void ClearData() override
-
void set_n_spikes(unsigned int n_spikes)
-
double mua() const
-
void set_bin_size(double bin_size)
-
double bin_size()
-
unsigned int n_spikes()
-
void SerializeBinary(std::ostream &stream, Serialization::Format format = Serialization::Format::FULL) const final
-
void SerializeYAML(YAML::Node &node, Serialization::Format format = Serialization::Format::FULL) const final
-
void YAMLDescription(YAML::Node &node, Serialization::Format format = Serialization::Format::FULL) const final
-
void SerializeFlatBuffer(flexbuffers::Builder &flex_builder) final
-
void Initialize(double bin_size)
Parameters¶
name |
type |
description |
validation |
---|---|---|---|
bin_size |
double (ms) |
Input parameter with default value = 0 |
needs to be a positive value (>0) |
n_spikes |
double |
Set separately after initialization of the datatype |
-
struct Parameters : public Base::Parameters
Public Functions
-
inline Parameters(double bin = 0)
Public Members
-
double bin_size
-
inline Parameters(double bin = 0)
Capabilities¶
-
class Capabilities : public Base::Capabilities
Public Functions
-
inline virtual void Validate(const Parameters ¶meters) const
-
inline virtual void Validate(const Parameters ¶meters) const
Binary Serialization¶
For serialization formats FULL and COMPACT, if compact format, only the mua data as being the number of spike / size of the bin * 1e3 is serialized. if full format, the number of spikes and the bin size are also sent.
YAML Serialization¶
For serialization formats FULL and COMPACT,
if compact format: the following YAML is emitted:
MUA: [number of spikes / size of the bin * 1e3]
if full format: the following YAML is emitted:
MUA: [number of spikes / size of the bin * 1e3] n_spikes: [number of spikes (double)] bin_size: [bin size (double)]