Skip to content
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

DOC: Bump Python version on RTD build and fix failure #10524

Merged
merged 4 commits into from
Jul 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sphinx:
# Install regular dependencies.
# Then, install special pinning for RTD.
python:
version: 3.6
version: 3.8
install:
- method: pip
path: .
Expand Down
134 changes: 68 additions & 66 deletions astropy/wcs/docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ def RA_DEC_ORDER(indent=0):

Parameters
----------
pixcrd : double array[ncoord][nelem]
Array of pixel coordinates.
pixcrd : numpy.ndarray
Array of pixel coordinates as ``double array[ncoord][nelem]``.

{}

Returns
-------
world : double array[ncoord][nelem]
Returns an array of world coordinates.
world : numpy.ndarray
Returns an array of world coordinates as ``double array[ncoord][nelem]``.

Raises
------
Expand Down Expand Up @@ -824,7 +824,7 @@ def RA_DEC_ORDER(indent=0):
"""

get_cdelt = """
get_cdelt() -> double array[naxis]
get_cdelt() -> ``double array[naxis]``

Coordinate increments (``CDELTia``) for each coord axis.

Expand All @@ -837,7 +837,7 @@ def RA_DEC_ORDER(indent=0):
"""

get_pc = """
get_pc() -> double array[naxis][naxis]
get_pc() -> ``double array[naxis][naxis]``

Returns the ``PC`` matrix in read-only form. Unlike the
`~astropy.wcs.Wcsprm.pc` property, this works even when the header
Expand All @@ -848,13 +848,13 @@ def RA_DEC_ORDER(indent=0):
"""

get_ps = """
get_ps() -> list of tuples
get_ps() -> list of tuple

Returns ``PSi_ma`` keywords for each *i* and *m*.

Returns
-------
ps : list of tuples
ps : list of tuple

Returned as a list of tuples of the form (*i*, *m*, *value*):

Expand All @@ -870,7 +870,7 @@ def RA_DEC_ORDER(indent=0):
"""

get_pv = """
get_pv() -> list of tuples
get_pv() -> list of tuple

Returns ``PVi_ma`` keywords for each *i* and *m*.

Expand Down Expand Up @@ -1128,15 +1128,15 @@ def RA_DEC_ORDER(indent=0):
the search recommenced. *viter* controls how many times the step
size is halved. The allowed range is 5 - 10.

world : double array[naxis]
World coordinate elements. ``world[self.lng]`` and
world : numpy.ndarray
World coordinate elements as ``double array[naxis]``. ``world[self.lng]`` and
``world[self.lat]`` are the celestial longitude and latitude, in
degrees. Which is given and which returned depends on the value
of *mixcel*. All other elements are given. The results will be
written to this array in-place.

pixcrd : double array[naxis].
Pixel coordinates. The element indicated by *mixpix* is given and
pixcrd : numpy.ndarray
Pixel coordinates as ``double array[naxis]``. The element indicated by *mixpix* is given and
the remaining elements will be written in-place.

{}
Expand All @@ -1147,20 +1147,20 @@ def RA_DEC_ORDER(indent=0):

Returns a dictionary with the following keys:

- *phi* (double array[naxis])
- *phi* (``double array[naxis]``)

- *theta* (double array[naxis])
- *theta* (``double array[naxis]``)

- Longitude and latitude in the native coordinate system of
the projection, in degrees.

- *imgcrd* (double array[naxis])
- *imgcrd* (``double array[naxis]``)

- Image coordinate elements. ``imgcrd[self.lng]`` and
``imgcrd[self.lat]`` are the projected *x*- and
*y*-coordinates, in decimal degrees.

- *world* (double array[naxis])
- *world* (``double array[naxis]``)

- Another reference to the *world* argument passed in.

Expand Down Expand Up @@ -1318,8 +1318,8 @@ def RA_DEC_ORDER(indent=0):
Parameters
----------

pixcrd : double array[ncoord][nelem]
Array of pixel coordinates.
pixcrd : numpy.ndarray
Array of pixel coordinates as ``double array[ncoord][nelem]``.

{}

Expand All @@ -1328,32 +1328,34 @@ def RA_DEC_ORDER(indent=0):
result : dict
Returns a dictionary with the following keys:

- *imgcrd*: double array[ncoord][nelem]
- *imgcrd*: numpy.ndarray

- Array of intermediate world coordinates. For celestial axes,
- Array of intermediate world coordinates as ``double array[ncoord][nelem]``. For celestial axes,
``imgcrd[][self.lng]`` and ``imgcrd[][self.lat]`` are the
projected *x*-, and *y*-coordinates, in pseudo degrees. For
spectral axes, ``imgcrd[][self.spec]`` is the intermediate
spectral coordinate, in SI units.

- *phi*: double array[ncoord]
- *phi*: numpy.ndarray

- *theta*: double array[ncoord]
- Array as ``double array[ncoord]``.

- *theta*: numpy.ndarray

- Longitude and latitude in the native coordinate system of the
projection, in degrees.
projection, in degrees, as ``double array[ncoord]``.

- *world*: double array[ncoord][nelem]
- *world*: numpy.ndarray

- Array of world coordinates. For celestial axes,
- Array of world coordinates as ``double array[ncoord][nelem]``. For celestial axes,
``world[][self.lng]`` and ``world[][self.lat]`` are the
celestial longitude and latitude, in degrees. For spectral
axes, ``world[][self.spec]`` is the intermediate spectral
coordinate, in SI units.

- *stat*: int array[ncoord]
- *stat*: numpy.ndarray

- Status return value for each coordinate. ``0`` for success,
- Status return value for each coordinate as ``int array[ncoord]``. ``0`` for success,
``1+`` for invalid pixel coordinate.

Raises
Expand Down Expand Up @@ -1387,22 +1389,22 @@ def RA_DEC_ORDER(indent=0):
""".format(ORIGIN())

p4_pix2foc = """
p4_pix2foc(*pixcrd, origin*) -> double array[ncoord][nelem]
p4_pix2foc(*pixcrd, origin*) -> ``double array[ncoord][nelem]``

Convert pixel coordinates to focal plane coordinates using `distortion
paper`_ lookup-table correction.

Parameters
----------
pixcrd : double array[ncoord][nelem].
Array of pixel coordinates.
pixcrd : numpy.ndarray
Array of pixel coordinates as ``double array[ncoord][nelem]``.

{}

Returns
-------
foccrd : double array[ncoord][nelem]
Returns an array of focal plane coordinates.
foccrd : numpy.ndarray
Returns an array of focal plane coordinates as ``double array[ncoord][nelem]``.

Raises
------
Expand Down Expand Up @@ -1455,22 +1457,22 @@ def RA_DEC_ORDER(indent=0):
"""

pix2foc = """
pix2foc(*pixcrd, origin*) -> double array[ncoord][nelem]
pix2foc(*pixcrd, origin*) -> ``double array[ncoord][nelem]``

Perform both `SIP`_ polynomial and `distortion paper`_ lookup-table
correction in parallel.

Parameters
----------
pixcrd : double array[ncoord][nelem]
Array of pixel coordinates.
pixcrd : numpy.ndarray
Array of pixel coordinates as ``double array[ncoord][nelem]``.

{}

Returns
-------
foccrd : double array[ncoord][nelem]
Returns an array of focal plane coordinates.
foccrd : numpy.ndarray
Returns an array of focal plane coordinates as ``double array[ncoord][nelem]``.

Raises
------
Expand Down Expand Up @@ -1549,8 +1551,8 @@ def RA_DEC_ORDER(indent=0):

Parameters
----------
world : double array[ncoord][nelem]
Array of world coordinates, in decimal degrees.
world : numpy.ndarray
Array of world coordinates, in decimal degrees, as ``double array[ncoord][nelem]``.

{}

Expand All @@ -1559,14 +1561,14 @@ def RA_DEC_ORDER(indent=0):
result : dict
Returns a dictionary with the following keys:

- *phi*: double array[ncoord]
- *phi*: ``double array[ncoord]``

- *theta*: double array[ncoord]
- *theta*: ``double array[ncoord]``

- Longitude and latitude in the native coordinate system of
the projection, in degrees.

- *imgcrd*: double array[ncoord][nelem]
- *imgcrd*: ``double array[ncoord][nelem]``

- Array of intermediate world coordinates. For celestial axes,
``imgcrd[][self.lng]`` and ``imgcrd[][self.lat]`` are the
Expand All @@ -1576,12 +1578,12 @@ def RA_DEC_ORDER(indent=0):
spectral axes, ``imgcrd[][self.spec]`` is the intermediate
spectral coordinate, in SI units.

- *pixcrd*: double array[ncoord][nelem]
- *pixcrd*: ``double array[ncoord][nelem]``

- Array of pixel coordinates. Pixel coordinates are
zero-based.

- *stat*: int array[ncoord]
- *stat*: ``int array[ncoord]``

- Status return value for each coordinate. ``0`` for success,
``1+`` for invalid pixel coordinate.
Expand Down Expand Up @@ -1713,7 +1715,7 @@ def RA_DEC_ORDER(indent=0):

Parameters
----------
pv : list of tuples
pv : list of tuple

The input must be a sequence of tuples of the form (*i*, *m*,
*value*):
Expand Down Expand Up @@ -1742,24 +1744,24 @@ def RA_DEC_ORDER(indent=0):

Parameters
----------
a : double array[m+1][m+1]
The ``A_i_j`` polynomial for pixel to focal plane transformation.
a : numpy.ndarray
The ``A_i_j`` polynomial for pixel to focal plane transformation as ``double array[m+1][m+1]``.
Its size must be (*m* + 1, *m* + 1) where *m* = ``A_ORDER``.

b : double array[m+1][m+1]
The ``B_i_j`` polynomial for pixel to focal plane transformation.
b : numpy.ndarray
The ``B_i_j`` polynomial for pixel to focal plane transformation as ``double array[m+1][m+1]``.
Its size must be (*m* + 1, *m* + 1) where *m* = ``B_ORDER``.

ap : double array[m+1][m+1]
The ``AP_i_j`` polynomial for pixel to focal plane transformation.
ap : numpy.ndarray
The ``AP_i_j`` polynomial for pixel to focal plane transformation as ``double array[m+1][m+1]``.
Its size must be (*m* + 1, *m* + 1) where *m* = ``AP_ORDER``.

bp : double array[m+1][m+1]
The ``BP_i_j`` polynomial for pixel to focal plane transformation.
bp : numpy.ndarray
The ``BP_i_j`` polynomial for pixel to focal plane transformation as ``double array[m+1][m+1]``.
Its size must be (*m* + 1, *m* + 1) where *m* = ``BP_ORDER``.

crpix : double array[2]
The reference pixel.
crpix : numpy.ndarray
The reference pixel as ``double array[2]``.

Notes
-----
Expand All @@ -1769,22 +1771,22 @@ def RA_DEC_ORDER(indent=0):
"""

sip_foc2pix = """
sip_foc2pix(*foccrd, origin*) -> double array[ncoord][nelem]
sip_foc2pix(*foccrd, origin*) -> ``double array[ncoord][nelem]``

Convert focal plane coordinates to pixel coordinates using the `SIP`_
polynomial distortion convention.

Parameters
----------
foccrd : double array[ncoord][nelem]
Array of focal plane coordinates.
foccrd : numpy.ndarray
Array of focal plane coordinates as ``double array[ncoord][nelem]``.

{}

Returns
-------
pixcrd : double array[ncoord][nelem]
Returns an array of pixel coordinates.
pixcrd : numpy.ndarray
Returns an array of pixel coordinates as ``double array[ncoord][nelem]``.

Raises
------
Expand All @@ -1796,22 +1798,22 @@ def RA_DEC_ORDER(indent=0):
""".format(ORIGIN())

sip_pix2foc = """
sip_pix2foc(*pixcrd, origin*) -> double array[ncoord][nelem]
sip_pix2foc(*pixcrd, origin*) -> ``double array[ncoord][nelem]``

Convert pixel coordinates to focal plane coordinates using the `SIP`_
polynomial distortion convention.

Parameters
----------
pixcrd : double array[ncoord][nelem]
Array of pixel coordinates.
pixcrd : numpy.ndarray
Array of pixel coordinates as ``double array[ncoord][nelem]``.

{}

Returns
-------
foccrd : double array[ncoord][nelem]
Returns an array of focal plane coordinates.
foccrd : numpy.ndarray
Returns an array of focal plane coordinates as ``double array[ncoord][nelem]``.

Raises
------
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ all =
pytest
docs =
sphinx-astropy>=1.3
numpydoc<1.1.0
pytest
PyYAML>=3.12
scipy
Expand Down