[SciPy-Dev] Proposal: calling signal.lti object returns transfer function value
Juan Luis Cano
Tue Jul 16 09:49:57 CDT 2013
I've been trying the scipy.signal module lately for some easy things and
I had an idea, but I thought it would be better to bring it up in the
mailing list before filing a PR on GitHub.
My proposal is to implement the __call__ method on signal.lti objects so
it returns the value on the transfer function.
I took the idea from the `bode` function. This line:
y = numpy.polyval(sys.num, jw) / numpy.polyval(sys.den, jw)
could be moved to signal.lti.__call__, and then in `bode` write
y = sys(jw)
The detail is trivial (so is the implementation) but I think it would be
a useful thing. What do others think? Shall I open a pull request?
More information about the SciPy-Dev