PTB-M4D / PyDynamic

Python library for the analysis of dynamic measurements
https://ptb-m4d.github.io/PyDynamic/
GNU Lesser General Public License v3.0
25 stars 13 forks source link

Optionally return RMS-value of LSIIR #288

Closed mgrub closed 2 years ago

mgrub commented 2 years ago

Is your feature request related to a problem? Please describe. LSIIR is able to print an rms-value if the verbose-flag is given. However, the value stays internal and is not available for later use.

Describe the solution you'd like Add a return_rms-flag to LSIIR to enable an additional return value. The default should be return_rms=False, to keep backwards compatibility.

Additional context Based on the rms-value, the output of multiple runs of LSIIR (e.g. with different coefficient lengths) can be compared automatically.

BjoernLudwigPTB commented 2 years ago

From v2.3.0 on it is now possible to call LSIIR with a new parameter return_rms=True to receive an additional float, which specifies the root-mean-square, e.g.:

[…]
b, a, tau, Uab, rms = LSIIR(H, Nb, Na, f, Fs, return_rms=True)

Let us know what you think of it and if it works for you.