|
From: Ethan M. <eam...@gm...> - 2018-10-18 21:48:42
|
On Thu, Oct 18, 2018 at 12:51 PM theozh <th...@gm...> wrote:
>
> you're right, I wasn't clear. There are several possibilities. I'll try
> again.
> Actually, I had in mind either a point or range where you would say it
> "passes" the threshold.
> Assuming, as in the example, increasing (noisy) data values.
>
> a) range between two values:
> the first x1 value where y(x1) is above the threshold and the last value
> x2>x1 where y(x2) is below the threshold
>
> b) one value:
> where your "eye would say" this x value is the "crossing" of the threshold
> line.
> This probably would be a linear interpolation around the threshold value.
> > 4) for what x values is y(x) closer to threshold than both y(x-1) and
> y(x+1)?> Solutions to that do not necessarily involve crossing the
> threshold value at all.you're right, I assumed that a crossing exists.
>
> One value (version b) or a two values (version a) would be enough.
>
Here is a proof-of-principle example based on running_avg.dem.
set key fixed right center vertical Left reverse autotitle box
set key invert samplen 4 spacing 1
set xtics 10
set ytics
set title "Demonstrate use of assignment and serial evaluation
operators\nto accumulate statistics as su
ccessive data lines are read in\n"
set xrange [ 0.00000 : 57.0000 ] noreverse nowriteback
filter(this) = (prev < threshold) && (this >= threshold)
prev = 999.
threshold = 4.4
datafile = "silver.dat"
plot datafile using 0:3 with lp, \
'' using 0:(filter($3) ? ($3) : NaN) : (prev=$3) with impulse, \
threshold with lines
#
# Now save them to a table
#
prev = 999.
set table $HITS
plot datafile using 0:(filter($3) ? ($3) : NaN) : (prev=$3) with impulse
unset table
print $HITS
|