From c02c254af77403a7fa5c1cc95d5078631c61bc02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryan=20W=C3=BCest?= Date: Tue, 23 Apr 2024 13:12:26 +0200 Subject: [PATCH 1/2] Fix setting freq range for frd with nyquist --- control/freqplot.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/control/freqplot.py b/control/freqplot.py index 961f499b3..2f0bcea28 100644 --- a/control/freqplot.py +++ b/control/freqplot.py @@ -2468,6 +2468,14 @@ def _determine_omega_vector(syslist, omega_in, omega_limits, omega_num, """ omega_range_given = True + if omega_in is None: + for sys in syslist: + if isinstance(sys, FrequencyResponseData): + # FRD already has predetermined frequencies + if omega_in is not None and not np.all(omega_in == sys.omega): + raise ValueError("List of FrequencyResponseData systems can only have a single frequency range between them") + omega_in = sys.omega + if omega_in is None: if omega_limits is None: omega_range_given = False From 035156203ade87ed67b5fc759291a0074868574c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryan=20W=C3=BCest?= Date: Tue, 23 Apr 2024 13:37:59 +0200 Subject: [PATCH 2/2] Expand nyquist test --- control/tests/frd_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/control/tests/frd_test.py b/control/tests/frd_test.py index 987121987..25ecc5e21 100644 --- a/control/tests/frd_test.py +++ b/control/tests/frd_test.py @@ -192,6 +192,8 @@ def testNyquist(self): # plt.savefig('/dev/null', format='svg') plt.figure(2) freqplot.nyquist(f1, f1.omega) + plt.figure(3) + freqplot.nyquist(f1) # plt.savefig('/dev/null', format='svg') @slycotonly pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy