8000 Merge pull request #1094 from murrayrm/userguide-22Dec2024 · python-control/python-control@11d753f · GitHub
[go: up one dir, main page]

Skip to content

Commit 11d753f

Browse files
authored
Merge pull request #1094 from murrayrm/userguide-22Dec2024
Updated user documentation (User Guide, Reference Manual)
2 parents 1fc2c2d + 7da8c00 commit 11d753f

File tree

268 files changed

+15898
-7822lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

268 files changed

+15898
-7822
lines changed

.github/conda-env/doctest-env.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ dependencies:
1313
- nbsphinx
1414
- docutils
1515
- numpydoc
16+
- sphinx-copybutton

.github/conda-env/test-env.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ dependencies:
99
- numpy
1010
- matplotlib
1111
- scipy
12+
- numpydoc

.github/workflows/doctest.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ jobs:
3636
make html
3737
make doctest
3838
39+
- name: Run pytest
40+
shell: bash -l {0}
41+
working-directory: doc
42+
run: |
43+
make html
44+
PYTHONPATH=../ pytest
45+
3946
- name: Archive results
4047
uses: actions/upload-artifact@v4
4148
with:

.github/workflows/os-blas-test-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ jobs:
256256
- name: Install Wheel
257257
run: |
258258
python -m pip install --upgrade pip
259-
pip install matplotlib scipy pytest pytest-cov pytest-timeout coverage
259+
pip install matplotlib scipy pytest pytest-cov pytest-timeout coverage numpydoc
260260
pip install slycot-wheels/${{ matrix.packagekey }}/slycot*.whl
261261
pip show slycot
262262
- name: Test with pytest

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ record.txt
1414
.coverage
1515
doc/_build
1616
doc/generated
17-
examples/.ipynb_checkpoints/
17+
.ipynb_checkpoints/
1818
.settings/org.eclipse.core.resources.prefs
1919
.pydevproject
2020
.project

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Try out the examples in the examples folder using the binder service.
3131

3232
The package can also be installed on Google Colab using the commands::
3333

34-
!pip install control
34+
%pip install control
3535
import control as ct
3636

3737
Features
@@ -49,11 +49,11 @@ Features
4949
Links
5050
-----
5151

52-
- Project home page: http://python-control.org
52+
- Project home page: https://python-control.org
5353
- Source code repository: https://github.com/python-control/python-control
54-
- Documentation: http://python-control.readthedocs.org/
54+
- Documentation: https://python-control.readthedocs.io/
5555
- Issue tracker: https://github.com/python-control/python-control/issues
56-
- Mailing list: http://sourceforge.net/p/python-control/mailman/
56+
- Mailing list: https://sourceforge.net/p/python-control/mailman/
5757

5858
Dependencies
5959
------------
@@ -158,7 +158,7 @@ License
158158
-------
159159

160160
This is free software released under the terms of `the BSD 3-Clause
161-
License <http://opensource.org/licenses/BSD-3-Clause>`_. There is no
161+
License <https://opensource.org/licenses/BSD-3-Clause>`_. There is no
162162
warranty; not even for merchantability or fitness for a particular
163163
purpose. Consult LICENSE for copying conditions.
164164

benchmarks/optestim_bench.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def time_oep_minimizer_methods(minimizer_name, noise_name, initial_guess):
6464
initial_guess = (res.states, V)
6565
else:
6666
initial_guess = None
67-
6867

6968
# Set up optimal estimation function using Gaussian likelihoods for cost
7069
traj_cost = opt.gaussian_likelihood_cost(sys, Rv, Rw)

control/__init__.py

Lines changed: 23 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,27 @@
11
# __init__.py - initialization for control systems toolbox
22
#
3-
# Author: Richard M. Murray
4-
# Date: 24 May 09
5-
#
6-
# This file contains the initialization information from the control package.
7-
#
8-
# Copyright (c) 2009 by California Institute of Technology
9-
# All rights reserved.
10-
#
11-
# Redistribution and use in source and binary forms, with or without
12-
# modification, are permitted provided that the following conditions
13-
# are met:
14-
#
15-
# 1. Redistributions of source code must retain the above copyright
16-
# notice, this list of conditions and the following disclaimer.
17-
#
18-
# 2. Redistributions in binary form must reproduce the above copyright
19-
# notice, this list of conditions and the following disclaimer in the
20-
# documentation and/or other materials provided with the distribution.
21-
#
22-
# 3. Neither the name of the California Institute of Technology nor
23-
# the names of its contributors may be used to endorse or promote
24-
# products derived from this software without specific prior
25-
# written permission.
26-
#
27-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28-
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29-
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
30-
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALTECH
31-
# OR THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32-
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33-
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
34-
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
35-
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36-
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
37-
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38-
# SUCH DAMAGE.
39-
#
40-
# $Id$
41-
42-
"""
43-
The Python Control Systems Library :mod:`control` provides common functions
44-
for analyzing and designing feedback control systems.
3+
# Initial author: Richard M. Murray
4+
# Creation date: 24 May 2009
5+
# Use `git shortlog -n -s` for full list of contributors
6+
7+
"""The Python Control Systems Library (python-control) provides common
8+
functions for analyzing and designing feedback control systems.
9+
10+
The initial goal for the package is to implement all of the
11+
functionality required to work through the examples in the textbook
12+
`Feedback Systems <https://fbsbook.org>`_ by Astrom and Murray. In
13+
addition to standard techniques available for linear control systems,
14+
support for nonlinear systems (including trajectory generation, gain
15+
scheduling, phase plane diagrams, and describing functions) is
16+
included. A :ref:`matlab-module` is available that provides many of
17+
the common functions corresponding to commands available in the MATLAB
18+
Control Systems Toolbox.
4519
4620
Documentation is available in two forms: docstrings provided with the code,
47-
and the python-control users guide, available from `the python-control
21+
and the python-control User Guide, available from the `python-control
4822
homepage <https://www.python-control.org>`_.
4923
50-
The docstring examples assume that the following import commands::
24+
The docstring examples assume the following import commands::
5125
5226
>>> import numpy as np
5327
>>> import control as ct
@@ -57,14 +31,17 @@
5731
5832
The main control package includes the most common functions used in
5933
analysis, design, and simulation of feedback control systems. Several
60-
additional subpackages are available that provide more specialized
61-
functionality:
34+
additional subpackages and modules are available that provide more
35+
specialized functionality:
6236
6337
* :mod:`~control.flatsys`: Differentially flat systems
6438
* :mod:`~control.matlab`: MATLAB compatibility module
6539
* :mod:`~control.optimal`: Optimization-based control
6640
* :mod:`~control.phaseplot`: 2D phase plane diagrams
6741
42+
These subpackages and modules are described in more detail in the
43+
subpackage and module docstrings and in the User Guide.
44+
6845
"""
6946

7047
# Import functions from within the control system library
@@ -123,14 +100,5 @@
123100
except ImportError:
124101
__version__ = "dev"
125102

126-
# patch the LTI class with function aliases for convenience functions
127-
# this needs to be done after the fact since the modules that contain the functions
128-
# all heavily depend on the LTI class
129-
LTI.to_ss = ss
130-
LTI.to_tf = tf
131-
LTI.bode_plot = bode_plot
132-
LTI.nyquist_plot = nyquist_plot
133-
LTI.nichols_plot = nichols_plot
134-
135103
# Initialize default parameter values
136104
reset_defaults()

0 commit comments

Comments
 (0)
0