MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ time_above()

double MayaFlux::Kinesis::time_above ( std::span< const double >  values,
double  threshold,
double  dt 
)
inlinenoexcept

Seconds within a window spent at or above a threshold.

Parameters
valuesChronological span
thresholdLevel to test against
dtSeconds per sample
Returns
Count of qualifying samples multiplied by dt

Occupancy in time rather than in space. The scalar counterpart to SymbolicTrajectory::dwell_count, which answers the same question for a point moving through a lattice.

Definition at line 105 of file TemporalMeasures.hpp.

107{
108 size_t count = 0;
109 for (const double v : values) {
110 if (v >= threshold)
111 ++count;
112 }
113 return static_cast<double>(count) * dt;
114}
std::vector< std::byte > values
Definition VDBWriter.cpp:26
size_t count
float threshold

References count, threshold, and values.