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
DM-15004: Upgrading display_ds9 to numpydoc status #12
Conversation
python/lsst/display/ds9/ds9.py
Outdated
@@ -61,8 +61,12 @@ class Ds9Error(IOError): | |||
|
|||
|
|||
def getXpaAccessPoint(): | |||
"""Parse XPA_PORT and send return an identifier to send ds9 commands there, instead of "ds9" | |||
If you don't have XPA_PORT set, the usual xpans tricks will be played when we return "ds9". | |||
"""Parse XPA_PORT if set and return an identifier to send `ds9` commands. |
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.
I think ds9 should be in double-backticks (here and elsewhere), since we're treating as the name of the external program rather than a cross-reference within this documentation.
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.
Actually, probably in a :command:
role, rather than double backticks.
python/lsst/display/ds9/ds9.py
Outdated
Notes | ||
----- | ||
If you don't have XPA_PORT set, the usual xpans tricks will be played | ||
when we return `ds9`. |
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.
Here we are returning the string "ds9"
, not a cross reference.
python/lsst/display/ds9/ds9.py
Outdated
@@ -78,7 +82,13 @@ def getXpaAccessPoint(): | |||
|
|||
|
|||
def ds9Version(): | |||
"""Return the version of ds9 in use, as a string""" | |||
"""Get the version of `ds9` in use. |
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.
(Same comments as above)
python/lsst/display/ds9/ds9.py
Outdated
|
||
Parameters | ||
---------- | ||
size : `int`, optional |
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.
This doesn't look optional from the argument list above.
size of buffer. | ||
Default is -1: largest possible given bugs in xpa | ||
silent : `bool`, optional | ||
Do not print error messages (default `True`). |
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.
Pretty sure Sphinx is smart enough to extract default values for us automatically, so we don't need to list them. Should check that though.
python/lsst/display/ds9/ds9.py
Outdated
points : `list` of (`int`, `int`) | ||
a list of points specified as (col,row) | ||
ctype : `str` | ||
the name of a colour (e.g. 'red') |
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:
e.g. ``"red"``
?
python/lsst/display/ds9/ds9.py
Outdated
Parameters | ||
----------- | ||
points : `list` of (`int`, `int`) | ||
a list of points specified as (col,row) |
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.
Needs a space between col,
and row
.
python/lsst/display/ds9/ds9.py
Outdated
---------- | ||
algorithm : `str` | ||
Scale algorithm | ||
e.g., linear|log|pow|sqrt|squared|asinh|sinh|histequ |
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.
Actually e.g., or is this a complete list? Is this a list of algorithms understood by ds9, or understood by afwDisplay?
python/lsst/display/ds9/ds9.py
Outdated
minimum value for scale | ||
max : `float` | ||
maximum value for scale | ||
unit : unused |
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.
Should mention *args
& **kwargs
, although they seem to be unused.
python/lsst/display/ds9/ds9.py
Outdated
cmd = selectFrame(self.display.frame) + "; " | ||
# ds9 is 1-indexed. Grrr | ||
cmd += "pan to %g %g physical; " % (colc + 1, rowc + 1) | ||
|
||
ds9Cmd(cmd, flush=True) | ||
|
||
def _getEvent(self): | ||
"""Listen for a key press on frame in ds9, returning (key, x, y)""" | ||
"""Listen for a key press on frame in ds9. |
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.
On a frame?
c8608b8
to
934e247
Compare
No description provided.