-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update docstrings for LTI class constructors #171
Merged
murrayrm
merged 7 commits into
python-control:master
from
murrayrm:statesp_constructor_doc
Jan 2, 2018
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b19ca11
DOC: update docstrings for system creation (see PR #163)
murrayrm bde823b
DOC: add more info on class constructors
murrayrm b881b77
DOC: improved docstrings for fucntions with variable arguments
murrayrm 314c4eb
DOC: fixed typos + address @roryyorke feedback
murrayrm aa6e0df
replace np.pi with math.pi (avoids Mock() issues) + docstring update …
murrayrm 6e3c2dd
Merge branch 'master' into statesp_constructor_doc
murrayrm 2635889
Merge branch 'master' into statesp_constructor_doc
murrayrm File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,6 @@ | |
Date: 14 July 2011 | ||
|
||
$Id$ | ||
|
||
""" | ||
|
||
import numpy as np | ||
|
@@ -62,7 +61,7 @@ | |
# helper functions for stability_margins | ||
def _polyimsplit(pol): | ||
"""split a polynomial with (iw) applied into a real and an | ||
imaginary part with w applied""" | ||
imaginary part with w applied""" | ||
rpencil = np.zeros_like(pol) | ||
ipencil = np.zeros_like(pol) | ||
rpencil[-1::-4] = 1. | ||
|
@@ -294,8 +293,7 @@ def dstab(w): | |
# Contributed by Steffen Waldherr <waldherr@ist.uni-stuttgart.de> | ||
#! TODO - need to add test functions | ||
def phase_crossover_frequencies(sys): | ||
""" | ||
Compute frequencies and gains at intersections with real axis | ||
"""Compute frequencies and gains at intersections with real axis | ||
in Nyquist plot. | ||
|
||
Call as: | ||
|
@@ -338,7 +336,9 @@ def phase_crossover_frequencies(sys): | |
|
||
|
||
def margin(*args): | ||
"""Calculate gain and phase margins and associated crossover frequencies | ||
"""margin(sys) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just below (line 345) the name "sysdata" is used; perhaps that should be used here? |
||
|
||
Calculate gain and phase margins and associated crossover frequencies | ||
|
||
Parameters | ||
---------- | ||
|
@@ -360,8 +360,8 @@ def margin(*args): | |
Wcp : float | ||
Phase crossover frequency (corresponding to gain margin) (in rad/sec) | ||
|
||
Margins are of SISO open-loop. If more than one crossover frequency is | ||
detected, returns the lowest corresponding margin. | ||
Margins are of SISO open-loop. If more than one crossover frequency is | ||
detected, returns the lowest corresponding margin. | ||
|
||
Examples | ||
-------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about "from math import pi" here? Or does that result in a mocked instance of some sort too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better fix since math is included in the base python distribution.