Addresses #219.
This commit is contained in:
parent
21b8addad7
commit
4f883d1565
1 changed files with 6 additions and 5 deletions
|
|
@ -61,12 +61,14 @@ def pointwise_sat(phi, dt=0.1):
|
||||||
if not quantitative:
|
if not quantitative:
|
||||||
sig = booleanize_signal(sig)
|
sig = booleanize_signal(sig)
|
||||||
|
|
||||||
|
start_time = sig.items()[0][0]
|
||||||
|
|
||||||
if t is None:
|
if t is None:
|
||||||
res = [(t, v[phi]) for t, v in f(sig).items()]
|
res = [(t, v[phi]) for t, v in f(sig).items() if t >= start_time]
|
||||||
return res if quantitative else [(t, v > 0) for t, v in res]
|
return res if quantitative else [(t, v > 0) for t, v in res]
|
||||||
|
|
||||||
if t is False:
|
if t is False: # Use original signals starting time.
|
||||||
t = f(sig).items()[0][0]
|
t = start_time
|
||||||
|
|
||||||
res = interp(f(sig), t, phi)
|
res = interp(f(sig), t, phi)
|
||||||
return res if quantitative else res > 0
|
return res if quantitative else res > 0
|
||||||
|
|
@ -150,8 +152,7 @@ def eval_mtl_next(phi, dt):
|
||||||
f = eval_mtl(phi.arg, dt)
|
f = eval_mtl(phi.arg, dt)
|
||||||
|
|
||||||
def _eval(x):
|
def _eval(x):
|
||||||
v = (f(x) << dt)
|
return (f(x) << dt).retag({phi.arg: phi})
|
||||||
return v[max(v.start, 0):].retag({phi.arg: phi})
|
|
||||||
|
|
||||||
return _eval
|
return _eval
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue