Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We want second order sections to be first class
scipy.signal
citizens, so I started working on giving them their ownlti
subclass. This is very much a work in progress, but I wanted to start a place to have relevant discussions.Specifically, the usual argument-counting scheme really falls down for sos. (Reminder: we often identify what form the LTI system tuple takes with
len(system)
, 2=TF, 3=ZPK, 4=SS) However, since the cascading sections are specified as anndarray
with shape[n, 6]
, when we calllen(system)
, we can get literally any integer. This doesn't just affect instantiation oflti
objects, but also the input arguments offreqresp
,step
,lsim
, etc. What should we do?Here is an incomplete list of other TODOs:
cont2discrete
_sos_normalize
functionAn alternative, which I believe @endolith has mentioned, is to instead create general cascaded LTI systems. Then, SOS systems are just cascaded second order TF systems. I don't think I've come across other kinds of cascaded systems though.
(As a side note, I moved the lti conversion functions that lived in
filter_design
tolti_conversion
for my own sanity. Even after the moves,filter_design
is over 3kloc.)