Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ matrix:
# Check for sphinx doc build warnings - we do this first because it
# runs for a long time
- python: 2.7
env: SETUP_CMD='build_sphinx -w -n' NUMPY_VERSION=1.8.0 OPTIONAL_DEPS=true
env: SETUP_CMD='build_sphinx -w' NUMPY_VERSION=1.8.0 OPTIONAL_DEPS=true
# OPTIONAL_DEPS needed because the plot_directive in sphinx needs them

# Try all python versions with the latest numpy
Expand Down Expand Up @@ -83,8 +83,8 @@ install:
# These command run pip, trying a wheel. If they fail the build aborts.
- if [[ $SETUP_CMD != egg_info ]]; then $PIP_ASTROPY_WHEEL --upgrade "numpy==$NUMPY_VERSION"; fi
- if [[ $SETUP_CMD != egg_info ]]; then $PIP_ASTROPY_WHEEL "Cython==0.19.1"; fi
- if [[ $SETUP_CMD != egg_info ]]; then $PIP_ASTROPY_WHEEL "pytest==2.5.1"; fi
- if [[ $SETUP_CMD != egg_info ]]; then $PIP_ASTROPY_WHEEL "pytest-xdist==1.10"; fi
- if [[ $SETUP_CMD != egg_info ]]; then pip install "pytest==2.5.2"; fi
- if [[ $SETUP_CMD != egg_info ]]; then pip install "pytest-xdist==1.10"; fi

# OPTIONAL DEPENDENCIES
- if $OPTIONAL_DEPS; then $PIP_ASTROPY_WHEEL "scipy==0.13.1"; fi
Expand Down
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ New Features
has changed substantially. See the APE5 text and the package documentation
for more details. [#2422]

- A `position_angle` method has been added to the new ``SkyCoord``. [#2487]
- A ``position_angle`` method has been added to the new ``SkyCoord``. [#2487]

- Updated ``Angle.dms`` and ``Angle.hms`` to return ``namedtuple`` -s instead
of regular tuples, and added ``Angle.signed_dms`` attribute that gives the
Expand All @@ -39,7 +39,7 @@ New Features
conversion to ``Angle`` is now required. [#2461]

- The deprecated functions for pre-0.3 coordinate object names like
`ICRSCoordinates` have been removed. [#2422]
``ICRSCoordinates`` have been removed. [#2422]

- ``astropy.cosmology``

Expand Down
28 changes: 14 additions & 14 deletions astropy/convolution/convolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ def convolve(array, kernel, boundary='fill', fill_value=0.,
The array to convolve. This should be a 1, 2, or 3-dimensional array
or a list or a set of nested lists representing a 1, 2, or
3-dimensional array.
kernel : `numpy.ndarray` or `astropy.nddata.convolution.Kernel`
kernel : `numpy.ndarray` or `~astropy.convolution.Kernel`
The convolution kernel. The number of dimensions should match those
for the array, and the dimensions should be odd in all directions.
boundary : str, optional
A flag indicating how to handle boundaries:
* `None`
Set the `result` values to zero where the kernel
Set the ``result`` values to zero where the kernel
extends beyond the edge of the array (default).
* 'fill'
Set values outside the array boundary to `fill_value`.
Set values outside the array boundary to ``fill_value``.
* 'wrap'
Periodic boundary that wrap to the other side of ``array``.
* 'extend'
Expand All @@ -61,12 +61,12 @@ def convolve(array, kernel, boundary='fill', fill_value=0.,
convolved with kernel. The data type depends on the input
array type. If array is a floating point type, then the
return array keeps the same data type, otherwise the type
is numpy.float.
is ``numpy.float``.

Notes
-----
Masked arrays are not supported at this time. The convolution
is always done at `numpy.float` precision.
is always done at ``numpy.float`` precision.
'''
from .boundary_none import (convolve1d_boundary_none,
convolve2d_boundary_none,
Expand Down Expand Up @@ -233,24 +233,24 @@ def convolve_fft(array, kernel, boundary='fill', fill_value=0, crop=True,
`convolve_fft` differs from `scipy.signal.fftconvolve` in a few ways:

* It can treat ``NaN`` values as zeros or interpolate over them.
* `inf` values are treated as ``NaN``
* ``inf`` values are treated as ``NaN``
* (optionally) It pads to the nearest 2^n size to improve FFT speed.
* Its only valid `mode` is 'same' (i.e., the same shape array is returned)
* Its only valid ``mode`` is 'same' (i.e., the same shape array is returned)
* It lets you use your own fft, e.g.,
`pyFFTW <http://pypi.python.org/pypi/pyFFTW>`_ or
`pyFFTW3 <http://pypi.python.org/pypi/PyFFTW3/0.2.1>`_ , which can lead to
performance improvements, depending on your system configuration. pyFFTW3
is threaded, and therefore may yield significant performance benefits on
multi-core machines at the cost of greater memory requirements. Specify
the `fftn` and `ifftn` keywords to override the default, which is
the ``fftn`` and ``ifftn`` keywords to override the default, which is
`numpy.fft.fft` and `numpy.fft.ifft`.

Parameters
----------
array : `numpy.ndarray`
Array to be convolved with `kernel`
Array to be convolved with ``kernel``
kernel : `numpy.ndarray`
Will be normalized if `normalize_kernel` is set. Assumed to be
Will be normalized if ``normalize_kernel`` is set. Assumed to be
centered (i.e., shifts may result if your kernel is asymmetric)
boundary : {'fill', 'wrap'}, optional
A flag indicating how to handle boundaries:
Expand All @@ -272,7 +272,7 @@ def convolve_fft(array, kernel, boundary='fill', fill_value=0, crop=True,
If ignoring ``NaN`` / zeros, force all grid points with a weight less than
this value to ``NaN`` (the weight of a grid point with *no* ignored
neighbors is 1.0).
If `min_wt` == 0.0, then all zero-weight points will be set to zero
If ``min_wt`` is zero, then all zero-weight points will be set to zero
instead of ``NaN`` (which they would be otherwise, because 1/0 = nan).
See the examples below
normalize_kernel : function or boolean, optional
Expand Down Expand Up @@ -300,7 +300,7 @@ def convolve_fft(array, kernel, boundary='fill', fill_value=0, crop=True,
fftn, ifftn : functions, optional
The fft and inverse fft functions. Can be overridden to use your own
ffts, e.g. an fftw3 wrapper or scipy's fftn, e.g.
`fftn=scipy.fftpack.fftn`
``fftn=scipy.fftpack.fftn``
complex_dtype : np.complex, optional
Which complex dtype to use. `numpy` has a range of options, from 64 to
256.
Expand All @@ -324,8 +324,8 @@ def convolve_fft(array, kernel, boundary='fill', fill_value=0, crop=True,
Returns
-------
default : ndarray
**array** convolved with `kernel`.
If `return_fft` is set, returns fft(**array**) * fft(`kernel`).
**array** convolved with ``kernel``.
If ``return_fft`` is set, returns fft(**array**) * fft(``kernel``).
If crop is not set, returns the image, but with the fft-padded size
instead of the input size

Expand Down
4 changes: 2 additions & 2 deletions astropy/convolution/kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class Box1DKernel(Kernel1D):
The Box filter or running mean is a smoothing filter. It is not isotropic
and can produce artifacts, when applied repeatedly to the same data.

By default the Box kernel uses the `linear_interp` discretization mode,
By default the Box kernel uses the ``linear_interp`` discretization mode,
which allows non-shifting, even-sized kernels. This is achieved by
weighting the edge pixels with 1/2. E.g a Box kernel with an effective
smoothing of 4 pixel would have the following array: [0.5, 1, 1, 1, 0.5].
Expand Down Expand Up @@ -229,7 +229,7 @@ class Box2DKernel(Kernel2D):
The Box filter or running mean is a smoothing filter. It is not isotropic
and can produce artifact, when applied repeatedly to the same data.

By default the Box kernel uses the `linear_interp` discretization mode,
By default the Box kernel uses the ``linear_interp`` discretization mode,
which allows non-shifting, even-sized kernels. This is achieved by
weighting the edge pixels with 1/2.

Expand Down
14 changes: 7 additions & 7 deletions astropy/coordinates/baseframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ def __init__(self, *args, **kwargs):
def data(self):
"""
The coordinate data for this object. If this frame has no data, an
`AttributeError` will be raised. Use `has_data` to check if data is
present on this frame object.
`~.exceptions.AttributeError` will be raised. Use `has_data` to
check if data is present on this frame object.
"""
if self._data is None:
raise AttributeError('The frame object "{0}" does not have '
Expand Down Expand Up @@ -304,7 +304,7 @@ def realize_frame(self, representation):
-------
frameobj : same as this frame
A new object with the same frame attributes as this one, but
with the `representation` as the data.
with the ``representation`` as the data.
"""
frattrs = dict([(nm, getattr(self, nm)) for nm in self.frame_attr_names
if nm not in self._attr_names_with_defaults])
Expand All @@ -322,7 +322,7 @@ def represent_as(self, new_representation):

Returns
-------
newrep : whatever `new_representation` is
newrep : whatever ``new_representation`` is
A new representation object of this frame's `data`.

Raises
Expand Down Expand Up @@ -413,8 +413,8 @@ def is_transformable_to(self, new_frame):
if coord.is_transformable_to(some_unknown_frame):
coord2 = coord.transform_to(some_unknown_frame)

This will work even if `some_unknown_frame` turns out to be the same
frame class as `coord`. This is intended for cases where the frame is
This will work even if ``some_unknown_frame`` turns out to be the same
frame class as ``coord``. This is intended for cases where the frame is
the same regardless of the frame attributes (e.g. ICRS), but be aware
that it *might* also indicate that someone forgot to define the
transformation between two objects of the same frame class but with
Expand Down Expand Up @@ -447,7 +447,7 @@ def is_frame_attr_default(self, attrnm):
Returns
-------
isdefault : bool
True if the attribute `attrnm` has its value by default, False if it
True if the attribute ``attrnm`` has its value by default, False if it
was specified at creation of this frame.
"""
return attrnm in self._attr_names_with_defaults
Expand Down
6 changes: 3 additions & 3 deletions astropy/coordinates/builtin_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class FK4(BaseCoordinateFrame):
dec : `Angle`, optional, must be keyword
The Declination for this object (``ra`` must also be given and
``representation`` must be None).
distance : `Quantity`, optional, must be keyword
distance : :class:`~astropy.units.Quantity`, optional, must be keyword
The Distance for this object along the line-of-sight.
(``representation`` must be None).
equinox : astropy.time.Time, optional, must be keyword
Expand Down Expand Up @@ -202,7 +202,7 @@ class FK4NoETerms(BaseCoordinateFrame):
dec : `Angle`, optional, must be keyword
The Declination for this object (``ra`` must also be given and
``representation`` must be None).
distance : `Quantity`, optional, must be keyword
distance : :class:`~astropy.units.Quantity`, optional, must be keyword
The Distance for this object along the line-of-sight.
(``representation`` must be None).
obstime : astropy.time.Time, optional, must be keyword
Expand Down Expand Up @@ -316,7 +316,7 @@ class AltAz(BaseCoordinateFrame):
alt : `Angle`, optional, must be keyword
The Altitude for this object (``az`` must also be given and
``representation`` must be None).
distance : `Quantity`, optional, must be keyword
distance : :class:`~astropy.units.Quantity`, optional, must be keyword
The Distance for this object along the line-of-sight.
"""

Expand Down
2 changes: 1 addition & 1 deletion astropy/coordinates/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def match_coordinates_sky(matchcoord, catalogcoord, nthneighbor=1, storekdtree='
dist3d : `~astropy.units.Quantity`
The 3D distance between the closest match for each ``matchcoord`` and
the ``matchcoord``. Shape matches ``matchcoord``. If either
`matchcoord` or `catalogcoord` don't have a distance, this is the 3D
``matchcoord`` or ``catalogcoord`` don't have a distance, this is the 3D
distance on the unit sphere, rather than a true distance.

Notes
Expand Down
22 changes: 11 additions & 11 deletions astropy/coordinates/name_resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ def _parse_response(resp_data):

def get_icrs_coordinates(name):
"""
Retrieve an ICRS object by using an online name resolving service
to retrieve coordinates for the specified name. By default, this
will search all available databases until a match is found. If you
would like to specify the database, use the science state
`name_resolve.sesame_database` . You can also specify a list of
servers to use for querying Sesame using the science state
`name_resolve.sesame_url`. This will try each one in order until a
valid response is returned. By default, this list includes the
main Sesame host and a mirror at vizier. The configuration item
`astropy.utils.data.Conf.remote_timeout` controls the number of
seconds to wait for a response from the server before giving
Retrieve an ICRS object by using an online name resolving service to
retrieve coordinates for the specified name. By default, this will
search all available databases until a match is found. If you would like
to specify the database, use the science state
``astropy.coordinates.name_resolve.sesame_database``. You can also
specify a list of servers to use for querying Sesame using the science
state ``astropy.coordinates.name_resolve.sesame_url``. This will try
each one in order until a valid response is returned. By default, this
list includes the main Sesame host and a mirror at vizier. The
configuration item `astropy.utils.data.Conf.remote_timeout` controls the
number of seconds to wait for a response from the server before giving
up.

Parameters
Expand Down
26 changes: 15 additions & 11 deletions astropy/coordinates/sky_coordinate.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,21 @@ class or the corresponding string alias. The frame classes that are built in
----------
frame : `~astropy.coordinates.BaseCoordinateFrame` class or string, optional
Type of coordinate frame this `SkyCoord` should represent.
unit : `~astropy.units.Unit`, string, or 2-tuple of `Unit` or string, optional
Units for supplied `LON` and `LAT` values, respectively. If only one unit
is supplied then it applies to both `LON` and `LAT`.
ra, dec: valid `~astropy.coordinates.Angle` initializer, optional
RA and Dec for frames where `ra` and `dec` are keys in the frame's
``preferred_attr_names``, including `ICRS`, `FK5`, `FK4`, and `FK4NoETerms`.
l, b: valid `~astropy.coordinates.Angle` initializer, optional
Galactic `l` and `b` for for frames where `l` and `b` are keys in the frame's
``preferred_attr_names``, including the `Galactic` frame.
obstime: valid `~astropy.time.Time` initializer, optional
unit : `~astropy.units.Unit`, string, or 2-tuple of :class:`~astropy.units.Unit` or str, optional
Units for supplied ``LON`` and ``LAT`` values, respectively. If
only one unit is supplied then it applies to both ``LON`` and
``LAT``.
ra, dec : valid `~astropy.coordinates.Angle` initializer, optional
RA and Dec for frames where ``ra`` and ``dec`` are keys in the
frame's ``preferred_attr_names``, including `ICRS`, `FK5`, `FK4`,
and `FK4NoETerms`.
l, b : valid `~astropy.coordinates.Angle` initializer, optional
Galactic ``l`` and ``b`` for for frames where ``l`` and ``b`` are
keys in the frame's ``preferred_attr_names``, including the
`Galactic` frame.
obstime : valid `~astropy.time.Time` initializer, optional
Time of observation
equinox: valid `~astropy.time.Time` initializer, optional
equinox : valid `~astropy.time.Time` initializer, optional
Coordinate frame equinox
**keyword_args
Other keyword arguments as applicable for user-defined coordinate frames.
Expand Down Expand Up @@ -606,6 +609,7 @@ def match_to_catalog_3d(self, catalogcoord, nthneighbor=1):
The 3D distance between the closest match for each element
in this object in ``catalogcoord``. Shape matches this
object.

Notes
-----
This method requires `SciPy <http://www.scipy.org>`_ to be
Expand Down
Loading