Skip to content

Commit 45e0450

Browse files
committed
Fix some mistakes in documentation
Note that one cannot use arbitrary section headings in numpydoc. For instance, the section headings "Usage", "Keywords", and "Return Values" are not valid section headings, and would give warnings when building documentation. In addition, the routine matlab.tfdata was documented incorrectly (the documentated behavior did not match the actual behavior when keyword arguments were used).
1 parent 24eb89b commit 45e0450

File tree

3 files changed

+10
-36
lines changed

3 files changed

+10
-36
lines changed

control/margins.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,6 @@ def stability_margins(sysdata, deg=True, returnall=False, epsw=1e-10):
8686
"""Calculate gain, phase and stability margins and associated
8787
crossover frequencies.
8888
89-
Usage
90-
-----
91-
gm, pm, sm, wg, wp, ws = stability_margins(sysdata, deg=True,
92-
returnall=False, epsw=1e-10)
93-
9489
Parameters
9590
----------
9691
sysdata: linsys or (mag, phase, omega) sequence

control/matlab.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,7 @@ def ssdata(sys):
15091509
return (ss.A, ss.B, ss.C, ss.D)
15101510

15111511
# Return transfer function data as a tuple
1512-
def tfdata(sys, **kw):
1512+
def tfdata(sys):
15131513
'''
15141514
Return transfer function data objects for a system
15151515
@@ -1518,17 +1518,12 @@ def tfdata(sys, **kw):
15181518
sys: Lti (StateSpace, or TransferFunction)
15191519
LTI system whose data will be returned
15201520
1521-
Keywords
1522-
--------
1523-
inputs = int; outputs = int
1524-
For MIMO transfer function, return num, den for given inputs, outputs
1525-
15261521
Returns
15271522
-------
15281523
(num, den): numerator and denominator arrays
15291524
Transfer function coefficients (SISO only)
15301525
'''
1531-
tf = _convertToTransferFunction(sys, **kw)
1526+
tf = _convertToTransferFunction(sys)
15321527

15331528
return (tf.num, tf.den)
15341529

control/nichols.py

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,6 @@ def nichols_plot(syslist, omega=None, grid=True):
103103
def nichols_grid(cl_mags=None, cl_phases=None):
104104
"""Nichols chart grid
105105
106-
Usage
107-
=====
108-
nichols_grid()
109-
110106
Plots a Nichols chart grid on the current axis, or creates a new chart
111107
if no plot already exists.
112108
@@ -119,8 +115,8 @@ def nichols_grid(cl_mags=None, cl_phases=None):
119115
Array of closed-loop phases defining the iso-phase lines on a custom
120116
Nichols chart. Must be in the range -360 < cl_phases < 0
121117
122-
Return values
123-
-------------
118+
Returns
119+
-------
124120
None
125121
"""
126122
# Default chart size
@@ -211,19 +207,15 @@ def closed_loop_contours(Gcl_mags, Gcl_phases):
211207
Gol is an open-loop transfer function, and Gcl is a corresponding
212208
closed-loop transfer function.
213209
214-
Usage
215-
=====
216-
contours = closed_loop_contours(Gcl_mags, Gcl_phases)
217-
218210
Parameters
219211
----------
220212
Gcl_mags : array-like
221213
Array of magnitudes of the contours
222214
Gcl_phases : array-like
223215
Array of phases in radians of the contours
224216
225-
Return values
226-
-------------
217+
Returns
218+
-------
227219
contours : complex array
228220
Array of complex numbers corresponding to the contours.
229221
"""
@@ -241,10 +233,6 @@ def m_circles(mags, phase_min=-359.75, phase_max=-0.25):
241233
Gol is an open-loop transfer function, and Gcl is a corresponding
242234
closed-loop transfer function.
243235
244-
Usage
245-
=====
246-
contours = m_circles(mags, phase_min, phase_max)
247-
248236
Parameters
249237
----------
250238
mags : array-like
@@ -254,8 +242,8 @@ def m_circles(mags, phase_min=-359.75, phase_max=-0.25):
254242
phase_max : degrees
255243
Maximum phase in degrees of the N-circles
256244
257-
Return values
258-
-------------
245+
Returns
246+
-------
259247
contours : complex array
260248
Array of complex numbers corresponding to the contours.
261249
"""
@@ -271,10 +259,6 @@ def n_circles(phases, mag_min=-40.0, mag_max=12.0):
271259
Gol is an open-loop transfer function, and Gcl is a corresponding
272260
closed-loop transfer function.
273261
274-
Usage
275-
=====
276-
contours = n_circles(phases, mag_min, mag_max)
277-
278262
Parameters
279263
----------
280264
phases : array-like
@@ -284,8 +268,8 @@ def n_circles(phases, mag_min=-40.0, mag_max=12.0):
284268
mag_max : dB
285269
Maximum magnitude in dB of the N-circles
286270
287-
Return values
288-
-------------
271+
Returns
272+
-------
289273
contours : complex array
290274
Array of complex numbers corresponding to the contours.
291275
"""

0 commit comments

Comments
 (0)