find_clipping
Builtin index · Signal processing
result = find_clipping(x, [threshold=], [full_scale=], [tol=], [min_run=3])
Input: x, threshold, full_scale, tol, min_run · Output: result
What it is
Same detection as is_clipped, same keywords, but returns *where*.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = find_clipping(x, [threshold=], [full_scale=], [tol=], [min_run=3]) | x —not documented yetthreshold Model, Num, or Vec, optionalReturns a Model of kind "find_clipping" (the named-field multi-return findpeaks/qr/svd already use, since Qu has no tuple unpacking) with fields count (a Num, how many runs), starts, ends (Vecs of run bounds, inclusive at both ends like every Qu range), lengths (a Vec), values (a Vec, the level each run is held at — signed, so the positive rail is distinguishable from the negative one), samples (a Num, total samples inside runs), fraction (a Num, samples / N), and threshold, tol, min_run (Nums, echoing back the parameters actually used — when the threshold was inferred, a caller reading only starts has no way to know what level the answer is relative to).full_scale optionalnot documented yettol Model, Num, or Vec, optionalReturns a Model of kind "find_clipping" (the named-field multi-return findpeaks/qr/svd already use, since Qu has no tuple unpacking) with fields count (a Num, how many runs), starts, ends (Vecs of run bounds, inclusive at both ends like every Qu range), lengths (a Vec), values (a Vec, the level each run is held at — signed, so the positive rail is distinguishable from the negative one), samples (a Num, total samples inside runs), fraction (a Num, samples / N), and threshold, tol, min_run (Nums, echoing back the parameters actually used — when the threshold was inferred, a caller reading only starts has no way to know what level the answer is relative to).min_run Model, Num, or Vec, optional (default 3)Returns a Model of kind "find_clipping" (the named-field multi-return findpeaks/qr/svd already use, since Qu has no tuple unpacking) with fields count (a Num, how many runs), starts, ends (Vecs of run bounds, inclusive at both ends like every Qu range), lengths (a Vec), values (a Vec, the level each run is held at — signed, so the positive rail is distinguishable from the negative one), samples (a Num, total samples inside runs), fraction (a Num, samples / N), and threshold, tol, min_run (Nums, echoing back the parameters actually used — when the threshold was inferred, a caller reading only starts has no way to know what level the answer is relative to). | count Numa Num, how many runsends VecVecs of run bounds, inclusive at both ends like every Qu rangelengths Veca Vecvalues Veca Vec, the level each run is held at — signed, so the positive rail is distinguishable from the negative onesamples Numa Num, total samples inside runsfraction Numa Num, samples / Nmin_run NumNums, echoing back the parameters actually used — when the threshold was inferred, a caller reading only starts has no way to know what level the answer is relative to | Returns a Model of kind "find_clipping" (the named-field multi-return findpeaks/qr/svd already use, since Qu has no tuple unpacking) with fields count (a Num, how many runs), starts, ends (Vecs of run bounds, inclusive at both ends like every Qu range), lengths (a Vec), values (a Vec, the level each run is held at — signed, so the positive rail is distinguishable from the negative one), samples (a Num, total samples inside runs), fraction (a Num, samples / N), and threshold, tol, min_run (Nums, echoing back the parameters actually used — when the threshold was inferred, a caller reading only starts has no way to know what level the answer is relative to). |
Examples
No documentation example calls this form yet. The Signal processing chapter is where one belongs.
How it works
Returns a Value::Model, the named-field multi-return this engine already uses for findpeaks/qr/svd -- Qu has no tuple unpacking, and clipping is never one number. threshold/tol/min_run are echoed back on purpose: when the threshold was inferred from the record, a caller reading only starts has no way to know what level the answer is relative to.
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.