MayaFlux 1.0.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 )
inlinenodiscardnoexcept

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}
Tendency< D, float > threshold(const Tendency< D, float > &t, float thresh)
Zero output below threshold, pass through above.
Definition Tendency.hpp:142

References threshold().

Here is the call graph for this function: