<p>Search an array from the specified starting index and report the
index of the first item in the array that is below or above the
specified threshold. If there is no such item, then -1 is
returned. The threshold can be absolute or relative to the value
at the starting index. If it is relative, it can be given on a
linear scale or in decibels. If the threshold is relative and we
are looking for values above the threshold, then values that are
above the value at the starting index by more than the threshold
are reported. If the threshold is relative and we are looking for
values below the threshold, then values that are below the value at
the starting index by more than the threshold are reported.</p>
<p> This actor is a generalization of Matlab code developed by John
Signorotti of Southwest Research Institute. The original function
was called UFDipSearch.</p>
Edward A. Lee, Steve Neuendorffer
$Id: ArrayLevelCrossing.java 70402 2014-10-23 00:52:20Z cxh $
Ptolemy II 4.0
Yellow (eal)
Red (cxh)
The array to search for a threshold crossing.
This has type {double}.
The output port producing the index of the first bin to break
the threshold. This has type int.
An indicator of whether to look for values above or below the
specified threshold. This is a boolean that defaults to false,
which specifies to find values below the threshold.
The direction to search from the start. If true, search forwards.
Otherwise, search backwards. This is a boolean that defaults to true.
An indicator of whether <i>threshold</i> should be interpreted
as absolute or relative, and if relative, then on a linear
scale, in amplitude decibels, or power decibels. If decibels
are used, then the corresponding linear threshold is
10^(<i>threshold</i>/<i>N</i>), where <i>N</i> is 20 (for
amplitude decibels) or 10 (for power decibels).
This parameter is a string with possible values "absolute",
"relative linear", "relative amplitude decibels" or "relative
power decibels". The default value is "absolute".
The index from which to start looking for a threshold crossing.
This is an integer that defaults to 0.
The threshold to look for. This is a double that can be
interpreted on an absolute or relative scale, and if relative,
on a linear or decibel scale, depending on the <i>scale</i>
parameter. It defaults to 0.0.