Showing 98 of 668 total issues
Function cross_over_freq
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def cross_over_freq(sys, tol=0.05):
"""
Only returns the cross over frequency for a transfer function.
The tf may cross from above or below...
Very similar to margin due to a programming glitch on my part...
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function sv_dir
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def sv_dir(G, table=False):
"""
Returns the input and output singular vectors associated with the
minimum and maximum singular values.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function simulate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def simulate(self, uf, ts, x0=None):
"""
Simulates the response of the system to the input.
Uses a Runge-Kutta delay integration routine.
Parameters:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function BoundST
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def BoundST(G, poles, zeros, deadtime=None):
"""
This function will calculate the minimum peak values of S and T if the
system has zeros and poles in the input or output. For standard conditions
Equation 6.8 (p224) is applied. Equation 6.16 (p226) is used when deadtime
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function rule1
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def rule1(G, Gd, K=1, message=False, plot=False, w1=-4, w2=2):
Function dis_rejctn_plot
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def dis_rejctn_plot(G, Gd, S=None, w_start=-2,
Function input_acceptable_const_plot
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def input_acceptable_const_plot(G, Gd, w_start=-2, w_end=2, axlim=None,
Function allSISOrules
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def allSISOrules(G, deadtime, Gd, K, R, wr, Gm):
Function display_export_data
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def display_export_data(data, display_type, row_head, save=False, latex=False, width=None, sep='|'):
Function input_perfect_const_plot
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def input_perfect_const_plot(G, Gd, w_start=-2, w_end=2, axlim=None,
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, numerator, denominator=1, deadtime=0, name='',
Function pole_zero_directions
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def pole_zero_directions(G, vec, dir_type, display_type='a', e=1E-8, z_tol=1E-4, p_tol=1E-4):
Function bodeclosedloop
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def bodeclosedloop(G, K, w_start=-2, w_end=2,
Function tf_step
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def tf_step(G, t_end=10, initial_val=0, points=1000,
Function perf_Wp_plot
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def perf_Wp_plot(S, wB_req, maxSSerror, w_start, w_end,
Function rule4
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def rule4(G, R, wr, message=False, w1=-4, w2=2):
Function adjust_spine
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def adjust_spine(xlabel, ylabel, x0=0, y0=0, width=1, height=1):
Function setup_plot
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def setup_plot(legend_list, w1=False, w2=False, G=False, K=False, wr=False):
Function rule5
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def rule5(G, Gm=1, message=False):
"""
This is rule five of chapter five
Calculates constraints for time delay, wc < 1 / theta
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function step
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def step(G, t_end=100, initial_val=0, input_label=None,