@@ -238,11 +238,7 @@ def _default_gains(num, den, xlim, ylim,zoom_xlim=None,zoom_ylim=None):
238238 y_tolerance = 0.05 * (ylim [1 ] - ylim [0 ])
239239
240240 tolerance = np .min ([x_tolerance , y_tolerance ])
241- # print('len kvect',len(kvect))
242241 indexes_too_far = _indexes_filt (mymat ,tolerance ,zoom_xlim ,zoom_ylim )
243- # print('indexes too far',indexes_too_far)
244- # print('my mat',mymat[ indexes_too_far])
245- # print('kvect',kvect[indexes_too_far])
246242
247243 while (len (indexes_too_far ) > 0 ) and (kvect .size < 5000 ):
248244 for counter ,index in enumerate (indexes_too_far ):
@@ -254,10 +250,6 @@ def _default_gains(num, den, xlim, ylim,zoom_xlim=None,zoom_ylim=None):
254250
255251 mymat = _RLSortRoots (mymat )
256252 indexes_too_far = _indexes_filt (mymat ,tolerance ,zoom_xlim ,zoom_ylim )
257- # print('indexes_too_far',indexes_too_far)
258- # print('mymat',mymat[indexes_too_far])
259- # print('kvect',kvect[indexes_too_far])
260- # print('len kvect after',len(kvect))
261253
262254 new_gains = kvect [- 1 ] * np .hstack ((np .logspace (0 , 3 , 4 )))
263255 new_points = _RLFindRoots (num , den , new_gains [1 :4 ])
@@ -487,16 +479,8 @@ def _RLFeedbackClicksPoint(event,sys,fig,ax_rlocus,sisotool=False):
487479 K = float ('inf' )
488480 K_xlim = float ('inf' )
489481 K_ylim = float ('inf' )
490- # print('gain',K)
491- # print('x_tolerance:',x_tolerance)
492- # print('y_tolerance:',y_tolerance)
493- # print('gain_tolerance:',gain_tolerance)
494- # print('margin:',abs(K.imag / K.real))
495- # print('Argument clickpoint',abs(K.imag / K.real))
496- # print('Argument X_scale:',abs(K_xlim.imag/K_xlim.real))
497- # print('Argument Y_scale:',abs(K_ylim.imag/K_ylim.real))
482+
498483 gain_tolerance += 0.1 * max ([abs (K_ylim .imag / K_ylim .real ),abs (K_xlim .imag / K_xlim .real )])
499- # print('New gain tolerance:',gain_tolerance)
500484
501485 if abs (K .real ) > 1e-8 and abs (K .imag / K .real ) < gain_tolerance and event .inaxes == ax_rlocus .axes and K .real > 0. :
502486
0 commit comments