|
1 | 1 | # ctrlutil.py - control system utility functions |
2 | 2 | # |
3 | | -# Author: Richard M. Murray |
4 | | -# Date: 24 May 09 |
5 | | -# |
6 | | -# These are some basic utility functions that are used in the control |
7 | | -# systems library and that didn't naturally fit anyplace else. |
8 | | -# |
9 | | -# Copyright (c) 2009 by California Institute of Technology |
10 | | -# All rights reserved. |
11 | | -# |
12 | | -# Redistribution and use in source and binary forms, with or without |
13 | | -# modification, are permitted provided that the following conditions |
14 | | -# are met: |
15 | | -# |
16 | | -# 1. Redistributions of source code must retain the above copyright |
17 | | -# notice, this list of conditions and the following disclaimer. |
18 | | -# |
19 | | -# 2. Redistributions in binary form must reproduce the above copyright |
20 | | -# notice, this list of conditions and the following disclaimer in the |
21 | | -# documentation and/or other materials provided with the distribution. |
22 | | -# |
23 | | -# 3. Neither the name of the California Institute of Technology nor |
24 | | -# the names of its contributors may be used to endorse or promote |
25 | | -# products derived from this software without specific prior |
26 | | -# written permission. |
27 | | -# |
28 | | -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
29 | | -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
30 | | -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
31 | | -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALTECH |
32 | | -# OR THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
33 | | -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
34 | | -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
35 | | -# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
36 | | -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
37 | | -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
38 | | -# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
39 | | -# SUCH DAMAGE. |
40 | | -# |
41 | | -# $Id$ |
| 3 | +# Original author: Richard M. Murray |
| 4 | +# Creation date: 24 May 2009 |
| 5 | +# Use `git shortlog -n -s ctrlutil.py` for full list of contributors |
| 6 | + |
| 7 | +"""Control system utility functions.""" |
42 | 8 |
|
43 | 9 | import math |
44 | 10 | import warnings |
45 | 11 |
|
46 | 12 | import numpy as np |
47 | 13 |
|
48 | | -# Packages that we need access to |
49 | | -from . import lti |
| 14 | +from .lti import LTI |
50 | 15 |
|
51 | 16 | __all__ = ['unwrap', 'issys', 'db2mag', 'mag2db'] |
52 | 17 |
|
@@ -96,7 +61,7 @@ def issys(obj): |
96 | 61 | """ |
97 | 62 | warnings.warn("issys() is deprecated; use isinstance(obj, ct.LTI)", |
98 | 63 | FutureWarning, stacklevel=2) |
99 | | - return isinstance(obj, lti.LTI) |
| 64 | + return isinstance(obj, LTI) |
100 | 65 |
|
101 | 66 | def db2mag(db): |
102 | 67 | """Convert a gain in decibels (dB) to a magnitude. |
|
0 commit comments