Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit03ae372

Browse files
authored
Merge pull request#1140 from murrayrm/release_notes-07Mar2025
Version 0.10.2 release notes
2 parentsbb47d59 +b3d8ce9 commit03ae372

File tree

17 files changed

+466
-36
lines changed

17 files changed

+466
-36
lines changed

‎control/iosys.py‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,24 @@ class NamedSignal(np.ndarray):
4646
This class modifies the `numpy.ndarray` class and allows signals to
4747
be accessed using the signal name in addition to indices and slices.
4848
49+
Signals can be either a 2D array, index by signal and time, or a 3D
50+
array, indexed by signal, trace, and time.
51+
52+
Attributes
53+
----------
54+
signal_labels : list of str
55+
Label names for each of the signal elements in the signal.
56+
trace_labels : list of str, optional
57+
Label names for each of the traces in the signal (if multi-trace).
58+
59+
Examples
60+
--------
61+
>>> sys = ct.rss(
62+
... states=['p1', 'p2', 'p3'], inputs=['u1', 'u2'], outputs=['y'])
63+
>>> resp = ct.step_response(sys)
64+
>>> resp.states['p1', 'u1'] # Step response from u1 to p1
65+
NamedSignal(...)
66+
4967
"""
5068
def__new__(cls,input_array,signal_labels=None,trace_labels=None):
5169
# See https://numpy.org/doc/stable/user/basics.subclassing.html
@@ -314,7 +332,7 @@ def _repr_latex_(self):
314332
def_repr_html_(self):
315333
# Defaults to using __repr__; override in subclasses
316334
returnNone
317-
335+
318336
def_repr_markdown_(self):
319337
returnself._repr_html_()
320338

‎control/tests/phaseplot_test.py‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def invpend_ode(t, x, m=0, l=0, b=0, g=0):
167167
ct.phase_plane_plot(
168168
invpend_ode, [-5,5,2,2],params={'stuff': (1,1,0.2,1)},
169169
plot_streamlines=True)
170-
170+
171171
withpytest.raises(ValueError,match="gridtype must be 'meshgrid' when using streamplot"):
172172
ct.phase_plane_plot(ct.rss(2,1,1),plot_streamlines=False,
173173
plot_streamplot=True,gridtype='boxgrid')
@@ -190,7 +190,7 @@ def invpend_ode(t, x, m=0, l=0, b=0, g=0):
190190
sys, [-12,12,-10,10],15,gridspec=[2,9],
191191
plot_streamlines=True,plot_separatrices=False,
192192
suppress_warnings=True)
193-
193+
194194
@pytest.mark.usefixtures('mplcleanup')
195195
deftest_phase_plot_zorder():
196196
# some of these tests are a bit akward since the streamlines and separatrices
@@ -211,7 +211,7 @@ def get_zorders(cplt):
211211
assertcplt.lines[3]==Noneorisinstance(cplt.lines[3],mpl.streamplot.StreamplotSet)
212212
streamplot=max(cplt.lines[3].lines.get_zorder(),cplt.lines[3].arrows.get_zorder())ifcplt.lines[3]elseNone
213213
returnstreamlines,quiver,streamplot,separatrices,equilpoints
214-
214+
215215
defassert_orders(streamlines,quiver,streamplot,separatrices,equilpoints):
216216
print(streamlines,quiver,streamplot,separatrices,equilpoints)
217217
ifstreamlinesisnotNone:
@@ -261,8 +261,6 @@ def sys(t, x):
261261
# make sure changing the norm at least doesn't throw an error
262262
ct.phase_plane_plot(sys,plot_streamplot=dict(vary_color=True,norm=mpl.colors.LogNorm()))
263263

264-
265-
266264

267265
@pytest.mark.usefixtures('mplcleanup')
268266
deftest_basic_phase_plots(savefigs=False):

‎control/timeresp.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -551,10 +551,10 @@ def outputs(self):
551551
defstates(self):
552552
"""Time response state vector.
553553
554-
Time evolution of the state vector, indexedindexedby either the
555-
state andtime (if only a single trace is given) or the state, trace,
556-
andtime (for multiple traces). See `TimeResponseData.squeeze`
557-
for adescription of how this can be modified using the `squeeze`
554+
Time evolution of the state vector, indexed by either the state and
555+
time (if only a single trace is given) or the state, trace, and
556+
time (for multiple traces). See `TimeResponseData.squeeze` for a
557+
description of how this can be modified using the `squeeze`
558558
keyword.
559559
560560
Input and output signal names can be used to index the data in
@@ -616,9 +616,9 @@ def inputs(self):
616616
def_legacy_states(self):
617617
"""Time response state vector (legacy version).
618618
619-
Time evolution of the state vector, indexedindexedby either the
620-
state andtime (if only a single trace is given) or the state,
621-
trace, andtime (for multiple traces).
619+
Time evolution of the state vector, indexed by either the state and
620+
time (if only a single trace is given) or the state, trace, and
621+
time (for multiple traces).
622622
623623
The `legacy_states` property is not affected by the `squeeze` keyword
624624
and hence it will always have these dimensions.

‎doc/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Makefile for python-control Sphinx documentation
22
# RMM, 15 Jan 2025
33

4-
FIGS = figures/classes.pdf
4+
FIGS = figures/classes.svg
55
RST_FIGS = figures/flatsys-steering-compare.png\
66
figures/iosys-predprey-open.png\
77
figures/timeplot-servomech-combined.png\
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{ fullname | escape | underline}}
2+
3+
..currentmodule::{{ module }}
4+
5+
..autoclass::{{ objname }}
6+
:no-members:
7+
:show-inheritance:
8+
:no-inherited-members:
9+
:no-special-members:

‎doc/classes.rst‎

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ systems (both linear time-invariant and nonlinear). They are usually
1414
created from factory functions such as:func:`tf` and:func:`ss`, so the
1515
user should normally not need to instantiate these directly.
1616

17-
The following figure illustrates the relationship between the classes.
17+
The following figure illustrates the relationship between the classes:
1818

19-
..image::figures/classes.pdf
20-
:width:800
19+
..figure::figures/classes.svg
20+
:width:640
2121
:align:center
2222

2323
..autosummary::
@@ -34,6 +34,17 @@ The following figure illustrates the relationship between the classes.
3434
InterconnectedSystem
3535
LinearICSystem
3636

37+
The time response of an input/output system is represented using a
38+
special:class:`NamedSignal` class that allows the individual signal
39+
elements to be access using signal names in place of integer offsets:
40+
41+
..autosummary::
42+
:toctree: generated/
43+
:template: extended-class-template.rst
44+
:nosignatures:
45+
46+
NamedSignal
47+
3748

3849
Response and Plotting Classes
3950
=============================
@@ -95,5 +106,5 @@ operations:
95106
optimal.OptimalEstimationProblem
96107
optimal.OptimalEstimationResult
97108

98-
Moreinformaton on the functions used to create these classes can be
109+
Moreinformation on the functions used to create these classes can be
99110
found in the:ref:`nonlinear-systems` chapter.

‎doc/figures/Makefile‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# RMM, 26 Dec 2024
33

44
# List of figures that need to be created (first figure generated is OK)
5-
FIGS = classes.pdf
5+
FIGS = classes.svg
66

77
# Location of the control package
88
SRCDIR = ../..
@@ -12,5 +12,5 @@ all: $(FIGS)
1212
clean:
1313
/bin/rm -f$(FIGS)
1414

15-
classes.pdf: classes.fig
16-
fig2dev -Lpdf$<$@
15+
classes.svg: classes.fig
16+
fig2dev -Lsvg$<$@

‎doc/figures/classes.fig‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#FIG 3.2 Produced by xfig version 3.2.8b
1+
#FIG 3.2 Produced by xfig version 3.2.9
2+
#encoding: UTF-8
23
Landscape
34
Center
45
Inches
@@ -37,12 +38,13 @@ Single
3738
2 1 0 2 1 7 50 -1 -1 0.000 0 0 7 0 1 2
3839
1 0 1.00 60.00 90.00
3940
6525 1950 7050 2550
40-
4 1 1 50 -1 16 12 0.0000 4 210 2115 4050 3675 InterconnectedSystem\001
41-
4 1 1 50 -1 16 12 0.0000 4 165 1605 7950 3675 TransferFunction\001
42-
4 1 1 50 -1 0 12 0.0000 4 150 345 7050 2775 LTI\001
43-
4 1 1 50 -1 16 12 0.0000 4 210 1830 5175 2775 NonlinearIOSystem\001
44-
4 1 1 50 -1 16 12 0.0000 4 210 1095 6150 3675 StateSpace\001
45-
4 1 1 50 -1 16 12 0.0000 4 210 1500 5175 4575 LinearICSystem\001
46-
4 2 1 50 -1 16 12 0.0000 4 210 1035 3375 3225 FlatSystem\001
47-
4 0 1 50 -1 16 12 0.0000 4 165 420 8400 3225 FRD\001
48-
4 1 1 50 -1 16 12 0.0000 4 210 1770 6300 1875 InputOutputSystem\001
41+
4 1 1 50 -1 16 12 0.0000 4 191 1958 4050 3675 InterconnectedSystem\001
42+
4 1 1 50 -1 16 12 0.0000 4 151 1496 7950 3675 TransferFunction\001
43+
4 1 1 50 -1 0 12 0.0000 4 133 305 7050 2775 LTI\001
44+
4 1 1 50 -1 16 12 0.0000 4 191 1705 5175 2775 NonlinearIOSystem\001
45+
4 1 1 50 -1 16 12 0.0000 4 190 1016 6150 3675 StateSpace\001
46+
4 1 1 50 -1 16 12 0.0000 4 191 1394 5175 4575 LinearICSystem\001
47+
4 2 1 50 -1 16 12 0.0000 4 191 970 3375 3225 FlatSystem\001
48+
4 0 1 50 -1 16 12 0.0000 4 145 384 8400 3225 FRD\001
49+
4 1 1 50 -1 16 12 0.0000 4 191 1681 6300 1875 InputOutputSystem\001
50+
4 1 7 50 -1 16 12 0.0000 4 22 21 5175 4800 .\001

‎doc/figures/classes.pdf‎

-6.7 KB
Binary file not shown.

‎doc/figures/classes.svg‎

Lines changed: 151 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp