Skip to content

Commit 8864385

Browse files
committed
fix up class docstrings + See Also
1 parent 9edd422 commit 8864385

21 files changed

Lines changed: 254 additions & 202 deletions

control/ctrlplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
# Control figure
122122
#
123123

124-
class ControlPlot(object):
124+
class ControlPlot():
125125
"""A class for representing control figures.
126126
127127
This class is used as the return type for control plotting functions.
@@ -134,7 +134,7 @@ class ControlPlot(object):
134134
a number of lines that represent the data for the plot. There may also
135135
be a legend present in one or more of the axes.
136136
137-
Attributes
137+
Parameters
138138
----------
139139
lines : array of list of `matplotlib:Line2D`
140140
Array of Line2D objects for each line in the plot. Generally, the

control/descfcn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class is used by the `describing_function_response`
224224
response of the linear systems and the describing function for the
225225
nonlinear element.
226226
227-
Attributes
227+
Parameters
228228
----------
229229
response : `FrequencyResponseData`
230230
Frequency response of the linear system component of the system.

control/flatsys/basis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class BasisFamily:
2424
each flat output (nvars = None) or a different variable for different
2525
flat outputs (nvars > 0).
2626
27-
Attributes
27+
Parameters
2828
----------
2929
N : int
3030
Order of the basis set.

control/flatsys/flatsys.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ class FlatSystem(NonlinearIOSystem):
5050
name : string, optional
5151
System name.
5252
53+
See Also
54+
--------
55+
flatsys
56+
5357
Notes
5458
-----
5559
The class must implement two functions:

control/frdata.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class constructor, using the `frd` factory function, or
112112
113113
See Also
114114
--------
115-
frd
115+
frd, InputOutputSystem, TransferFunction, TimeResponseData
116116
117117
Notes
118118
-----
@@ -189,17 +189,17 @@ def __init__(self, *args, **kwargs):
189189
190190
Construct a frequency response data (FRD) object.
191191
192-
The default constructor is FrequencyResponseData(d, w), where w is
193-
an iterable of frequency points, and d is the matching frequency
194-
data. If d is a single list, 1D array, or tuple, a SISO system
195-
description is assumed. d can also be a 2D array, in which case a
196-
MIMO response is created. To call the copy constructor, call
197-
FrequencyResponseData(sys), where sys is a FRD object. The
198-
timebase for the frequency response can be provided using an
199-
optional third argument or the 'dt' keyword.
192+
The default constructor is `FrequencyResponseData(d, w)`, where `w`
193+
is an iterable of frequency points and `d` is the matching
194+
frequency data. If `d` is a single list, 1D array, or tuple, a
195+
SISO system description is assumed. `d` can also be a 2D array, in
196+
which case a MIMO response is created. To call the copy
197+
constructor, call `FrequencyResponseData(sys)`, where `sys` is a
198+
FRD object. The timebase for the frequency response can be
199+
provided using an optional third argument or the `dt` keyword.
200200
201201
To construct frequency response data for an existing LTI object,
202-
other than an FRD, call FrequencyResponseData(sys, omega). This
202+
other than an FRD, call `FrequencyResponseData(sys, omega)`. This
203203
functionality can also be obtained using `frequency_response`
204204
(which has additional options available).
205205

control/freqplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ class NyquistResponseData:
11071107
response object can be used to obtain information about the Nyquist
11081108
response or to generate a Nyquist plot.
11091109
1110-
Attributes
1110+
Parameters
11111111
----------
11121112
count : integer
11131113
Number of encirclements of the -1 point by the Nyquist curve for

control/grid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from .iosys import isdtime
2323

2424

25-
class FormatterDMS(object):
25+
class FormatterDMS():
2626
'''Transforms angle ticks to damping ratios'''
2727
def __call__(self, direction, factor, values):
2828
angles_deg = np.asarray(values)/factor

control/iosys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def __getitem__(self, key):
103103
return super().__getitem__(self._parse_key(key))
104104

105105

106-
class InputOutputSystem(object):
106+
class InputOutputSystem():
107107
"""A class for representing input/output systems.
108108
109109
The InputOutputSystem class allows (possibly nonlinear) input/output

control/lti.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ class LTI(InputOutputSystem):
3030
contains the number of inputs and outputs, and the timebase (dt) for the
3131
system. This function is not generally called directly by the user.
3232
33-
When two LTI systems are combined, their timebases much match. A system
34-
with timebase None can be combined with a system having a specified
35-
timebase, and the result will have the timebase of the latter system.
36-
37-
Note: dt processing has been moved to the InputOutputSystem class.
33+
See Also
34+
--------
35+
InputOutputSystem, StateSpace, TransferFunction, FrequencyResponseData
3836
3937
"""
4038
def __init__(self, inputs=1, outputs=1, states=None, name=None, **kwargs):
@@ -264,9 +262,7 @@ def poles(sys):
264262
265263
See Also
266264
--------
267-
zeros
268-
TransferFunction.poles
269-
StateSpace.poles
265+
zeros, StateSpace.poles, TransferFunction.poles
270266
271267
"""
272268

@@ -289,9 +285,7 @@ def zeros(sys):
289285
290286
See Also
291287
--------
292-
poles
293-
StateSpace.zeros
294-
TransferFunction.zeros
288+
poles, StateSpace.zeros, TransferFunction.zeros
295289
296290
"""
297291

@@ -319,7 +313,7 @@ def damp(sys, doprint=True):
319313
320314
See Also
321315
--------
322-
pole
316+
poles
323317
324318
Notes
325319
-----
@@ -396,8 +390,7 @@ def evalfr(sys, x, squeeze=None):
396390
397391
See Also
398392
--------
399-
freqresp
400-
bode
393+
frequency_response, bode_plot
401394
402395
Notes
403396
-----
@@ -479,8 +472,7 @@ def frequency_response(
479472
480473
See Also
481474
--------
482-
evalfr
483-
bode_plot
475+
evalfr, bode_plot
484476
485477
Notes
486478
-----

control/matlab/wrappers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def connect(*args):
415415
416416
See Also
417417
--------
418-
append, feedback, interconnect, negate, parallel, series
418+
append, feedback, connect, negate, parallel, series
419419
420420
Examples
421421
--------

0 commit comments

Comments
 (0)