edges
Builtin index · Signal processing
edges(d, [hysteresis=0])
Input: d, hysteresis · Output: no output
What it is
d: a Digital value from to_digital. Same hysteresis as find_edges, same return shape (a Model, kind "edges", with indices/directions/positions/rising/falling/count) — d.edges() is find_edges(x, level=threshold) with the threshold already remembered.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
edges(d, [hysteresis=0]) | d —d: a Digital value from to_digital.hysteresis Model, optional (default 0)Same hysteresis as find_edges, same return shape (a Model, kind "edges", with indices/directions/positions/rising/falling/count) — d.edges() is find_edges(x, level=threshold) with the threshold already remembered. | not documented yet | — |
Examples
No documentation example calls this form yet. The Signal processing chapter is where one belongs.
How it works
edges(d)/rising_edges(d)/falling_edges(d) -- the Digital value's edge accessors. edges returns the same shape find_edges does (reusing edge_set_to_model); rising_edges/falling_edges return just the interpolated crossing positions of one polarity, in seconds for a Signal and samples otherwise (same convention find_pulses's widths field already documents).
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.