Open oleg-nesterov opened 10 months ago
ma.zc() is wrong in that it can't detect the crossing if the input signal is zero in between, for example
process = os.oscrs(F) : *(abs > 1/2) : ma.zc;
will never output 1.
The new function ba.tAndH() looks useful on its own, for example we can do
zc_threshold(t) = ba.tAndH(abs >= t) <: *(mem) < 0;
which reports the "significant" changes from -t to +t or vice versa.
While at it, change ba.time() to eliminate the unnecessary -(1) and generate a slightly better code.
ma.zc() is wrong in that it can't detect the crossing if the input signal is zero in between, for example
will never output 1.
The new function ba.tAndH() looks useful on its own, for example we can do
which reports the "significant" changes from -t to +t or vice versa.
While at it, change ba.time() to eliminate the unnecessary -(1) and generate a slightly better code.