You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

APLpy

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

APLpy - pypi Package Compare versions

Comparing version
2.0rc2
to
2.0
+55
README.rst
|Build Status| |CircleCI| |codecov| |Documentation Status|
About
-----
APLpy (the Astronomical Plotting Library in Python) is a Python module
aimed at producing publication-quality plots of astronomical imaging
data in FITS format.
PyPI: https://pypi.python.org/pypi/APLpy
Website: http://aplpy.github.io
Documentation: http://aplpy.readthedocs.io
APLpy is released under an MIT open-source license.
Installing
----------
The following dependencies are required:
- `Numpy <http://www.numpy.org>`__ 1.11 or later
- `Matplotlib <http://www.matplotlib.org>`__ 2.0 or later
- `Astropy <http://www.astropy.org>`__ 3.1 or later
- `reproject <http://reproject.readthedocs.org>`__ 0.4 or later
and the following are optional:
- `PyAVM <http://astrofrog.github.io/pyavm/>`__ 0.9.4 or later
- `pyregion <http://pyregion.readthedocs.org/>`__ 2.0 or later
- `pillow <https://pypi.org/project/Pillow/>`__ 4.0 or later
- `scikit-image <https://pypi.org/project/scikit-image/>`__ 0.14 or
later
You can install APLpy with:
::
pip install aplpy
If you want to install all optional dependencies, you can do:
::
pip install aplpy[all]
.. |Build Status| image:: https://travis-ci.org/aplpy/aplpy.svg?branch=master
:target: https://travis-ci.org/aplpy/aplpy
.. |CircleCI| image:: https://circleci.com/gh/aplpy/aplpy/tree/master.svg?style=svg
:target: https://circleci.com/gh/aplpy/aplpy/tree/master
.. |codecov| image:: https://codecov.io/gh/aplpy/aplpy/branch/master/graph/badge.svg
:target: https://codecov.io/gh/aplpy/aplpy
.. |Documentation Status| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat
:target: https://aplpy.readthedocs.io/en/latest/
+5
-6

@@ -13,3 +13,2 @@ from __future__ import absolute_import, print_function, division

from astropy.wcs.utils import proj_plane_pixel_scales
from astropy.extern import six

@@ -103,3 +102,3 @@ from .decorators import auto_refresh

if isinstance(corner, six.string_types):
if isinstance(corner, str):
corner = corners[corner]

@@ -383,9 +382,9 @@

if isinstance(major, six.string_types):
if isinstance(major, str):
major = self._header[major]
if isinstance(minor, six.string_types):
if isinstance(minor, str):
minor = self._header[minor]
if isinstance(angle, six.string_types):
if isinstance(angle, str):
angle = self._header[angle]

@@ -432,3 +431,3 @@

if isinstance(corner, six.string_types):
if isinstance(corner, str):
corner = corners[corner]

@@ -435,0 +434,0 @@

from __future__ import absolute_import, print_function, division
from astropy.extern import six
from astropy import log

@@ -94,3 +93,3 @@ from astropy import wcs

# read region file
if isinstance(region_file, six.string_types):
if isinstance(region_file, str):
rr = pyregion.open(region_file)

@@ -97,0 +96,0 @@ elif isinstance(region_file, pyregion.ShapeList):

@@ -8,3 +8,2 @@ from __future__ import absolute_import, print_function, division

import numpy as np
from astropy.extern import six
from astropy import log

@@ -133,3 +132,3 @@ from astropy.io import fits

if isinstance(data, six.string_types):
if isinstance(data, str):

@@ -243,5 +242,5 @@ image = fits.getdata(data)

Two files are produced by this function. The first is a three-dimensional
FITS cube with a filename give by `output`, where the third dimension
FITS cube with a filename give by ``output``, where the third dimension
contains the different channels. The second is a two-dimensional FITS
image with a filename given by `output` with a `_2d` suffix. This file
image with a filename given by ``output`` with a `_2d` suffix. This file
contains the mean of the different channels, and is required as input to

@@ -248,0 +247,0 @@ FITSFigure if show_rgb is subsequently used to show a color image

from __future__ import absolute_import, print_function, division
import pytest
import numpy as np
try:
import skimage # noqa
except ImportError:
SKIMAGE_INSTALLED = False
else:
SKIMAGE_INSTALLED = True
from .. import FITSFigure
@pytest.mark.skipif("not SKIMAGE_INSTALLED")
def test_numpy_downsample():

@@ -9,0 +18,0 @@ data = np.arange(256).reshape((16, 16))

@@ -236,1 +236,9 @@ from __future__ import absolute_import, print_function, division

return f._figure
@pytest.mark.remote_data
@pytest.mark.mpl_image_compare(style={}, savefig_kwargs={'adjust_bbox': False}, baseline_dir=baseline_dir, tolerance=5)
def test_downsample(self):
data = np.arange(256).reshape((16, 16))
f = FITSFigure(data, downsample=2)
f.show_grayscale()
return f._figure

@@ -5,3 +5,2 @@ from __future__ import absolute_import, print_function, division

import sys
from astropy.extern import six

@@ -20,3 +19,3 @@ from io import BytesIO as StringIO

def is_format(filename, format):
if isinstance(filename, six.string_types):
if isinstance(filename, str):
f = open(filename, 'rb')

@@ -23,0 +22,0 @@ else:

@@ -1,2 +0,2 @@

# Autogenerated by Astropy-affiliated package aplpy's setup.py on 2018-12-31 21:31:30 UTC
# Autogenerated by Astropy-affiliated package aplpy's setup.py on 2019-02-17 11:50:54 UTC
from __future__ import unicode_literals

@@ -190,4 +190,4 @@ import datetime

_packagename = "aplpy"
_last_generated_version = "2.0rc2"
_last_githash = "80493a087c524582c35f4f9159da6ee515d170a3"
_last_generated_version = "2.0"
_last_githash = "a3f9352a73debc7a0f9be1205c4c028873529f96"

@@ -215,6 +215,6 @@ # Determine where the source code for this module

release = True
timestamp = datetime.datetime(2018, 12, 31, 21, 31, 30)
timestamp = datetime.datetime(2019, 2, 17, 11, 50, 54)
debug = False
astropy_helpers_version = "2.0"
astropy_helpers_version = "3.1"

@@ -221,0 +221,0 @@ try:

@@ -1,4 +0,4 @@

Metadata-Version: 1.1
Metadata-Version: 1.2
Name: astropy-helpers
Version: 2.0
Version: 3.1
Summary: Utilities for building and installing Astropy, Astropy affiliated packages, and their respective documentation.

@@ -12,5 +12,21 @@ Home-page: https://github.com/astropy/astropy-helpers

* Stable versions: https://pypi.org/project/astropy-helpers/
* Development version, issue tracker: https://github.com/astropy/astropy-helpers
.. image:: https://travis-ci.org/astropy/astropy-helpers.svg
:target: https://travis-ci.org/astropy/astropy-helpers
.. image:: https://ci.appveyor.com/api/projects/status/rt9161t9mhx02xp7/branch/master?svg=true
:target: https://ci.appveyor.com/project/Astropy/astropy-helpers
.. image:: https://codecov.io/gh/astropy/astropy-helpers/branch/master/graph/badge.svg
:target: https://codecov.io/gh/astropy/astropy-helpers
**Warning:** Please note that version ``v3.0`` and later of ``astropy-helpers``
requires Python 3.5 or later. If you wish to maintain Python 2 support
for your package that uses ``astropy-helpers``, then do not upgrade the
helpers to ``v3.0+``. We will still provide Python 2.7 compatible
releases on the ``v2.0.x`` branch during the lifetime of the ``astropy``
core package LTS of ``v2.0.x``.
About
-----
This project provides a Python package, ``astropy_helpers``, which includes

@@ -20,44 +36,325 @@ many build, installation, and documentation-related tools used by the Astropy

leverage this work. The motivation behind this package and details of its
implementation are in the accepted
implementation are in the accepted
`Astropy Proposal for Enhancement (APE) 4 <https://github.com/astropy/astropy-APEs/blob/master/APE4.rst>`_.
The ``astropy_helpers.extern`` sub-module includes modules developed elsewhere
that are bundled here for convenience. At the moment, this consists of the
following two sphinx extensions:
* `numpydoc <https://github.com/numpy/numpydoc>`_, a Sphinx extension
developed as part of the Numpy project. This is used to parse docstrings
in Numpy format
* `sphinx-automodapi <https://github.com/astropy/sphinx-automodapi>`_, a Sphinx
developed as part of the Astropy project. This used to be developed directly
in ``astropy-helpers`` but is now a standalone package.
Issues with these sub-modules should be reported in their respective repositories,
and we will regularly update the bundled versions to reflect the latest released
versions.
``astropy_helpers`` includes a special "bootstrap" module called
``ah_bootstrap.py`` which is intended to be used by a project's setup.py in
order to ensure that the ``astropy_helpers`` package is available for
build/installation. This is similar to the ``ez_setup.py`` module that is
shipped with some projects to bootstrap `setuptools
<https://bitbucket.org/pypa/setuptools>`_.
build/installation.
As described in APE4, the version numbers for ``astropy_helpers`` follow the
corresponding major/minor version of the `astropy core package
<http://www.astropy.org/>`_, but with an independent sequence of micro (bugfix)
version numbers. Hence, the initial release is 0.4, in parallel with Astropy
v0.4, which will be the first version of Astropy to use ``astropy-helpers``.
As described in `APE4 <https://github.com/astropy/astropy-APEs/blob/master/APE4.rst>`_, the version
numbers for ``astropy_helpers`` follow the corresponding major/minor version of
the `astropy core package <http://www.astropy.org/>`_, but with an independent
sequence of micro (bugfix) version numbers. Hence, the initial release is 0.4,
in parallel with Astropy v0.4, which will be the first version of Astropy to
use ``astropy-helpers``.
For examples of how to implement ``astropy-helpers`` in a project,
see the ``setup.py`` and ``setup.cfg`` files of the
see the ``setup.py`` and ``setup.cfg`` files of the
`Affiliated package template <https://github.com/astropy/package-template>`_.
.. image:: https://travis-ci.org/astropy/astropy-helpers.svg
:target: https://travis-ci.org/astropy/astropy-helpers
What does astropy-helpers provide?
----------------------------------
.. image:: https://coveralls.io/repos/astropy/astropy-helpers/badge.svg
:target: https://coveralls.io/r/astropy/astropy-helpers
Astropy-helpers' big-picture purpose is to provide customization to Python's
packaging infrastructure process in ways that the Astropy Project has found to
help simplifying the developint and releasing packages. This is primarily
build around ``setup.py`` commands, as outlined below, as well as code to help
manage version numbers and better control the build process of larger packages.
Custom setup.py commands
^^^^^^^^^^^^^^^^^^^^^^^^
The main part of astropy-helpers is to provide customized setuptools commands.
For example, in a package that uses astropy-helpers, the following command
will be available::
python setup.py build_docs
and this command is implemented in astropy-helpers. To use the custom
commands described here, add::
from astropy_helpers.setup_helpers import register_commands
to your ``setup.py`` file, then do::
cmdclassd = register_commands(NAME, VERSION, RELEASE)
where ``NAME`` is the name of your package, ``VERSION`` is the full version
string, and ``RELEASE`` is a boolean value indicating whether the version is
a stable released version (``True``) or a developer version (``False``).
Finally, pass ``cmdclassd`` to the ``setup`` function::
setup(...,
cmdclass=cmdclassd)
The commands we provide or customize are:
**python setup.py test**
This command will automatically build the package, install it to a temporary
directory, and run the tests using `pytest <http://pytest.org/>`_ on this
installed version. Note that the bulk of this command is actually defined
in ``astropy.tests.command.AstropyTest``, because that allows the test
machinery to operate outside a setuptools command. This, here we
simply define the custom
setuptools command.
**python setup.py sdist**
We redefine ``sdist`` to use the version from distutils rather than from
setuptools, as the setuptools version requires duplication of information
in ``MANIFEST.in``.
**python setup.py build_docs**
This command will automatically build the package, then run sphinx to build
the documentation. This makes development much easier because it ensures
sphinx extensions that use the package's code to make documentation are
actually using the in-development version of the code. Sphinx itself
provides a custom setuptools command, which we
expand with the following options:
* ``-w``: set the return code to 1 if there are any warnings during the build
process.
* ``-l``: completely clean previous builds, including files generated by
the sphinx-automodapi package (which creates API pages for different
functions/classes).
* ``-n``: disable the intersphinx option.
* ``-o``: open the documentation in a browser if a build finishes successfully.
In addition, ``build_docs`` will automatically download and temporarily install
sphinx-astropy (which is a meta-package that
provides standardized configuration and documentation dependencies for astropy
packages) if it isn't already installed. Temporary installation means that the
package will be installed into an ``.eggs`` directory in the current working
directory, and it will only be available for the duration of the call to
``build_docs``.
**python setup.py build_ext**
This is also used when running ``build`` or ``install``. We add several features
compared to the default ``build_ext`` command:
* For packages with C/Cython extensions, we create a ``packagename._compiler``
submodule that contains information about the compilers used.
* Packages that need to build C extensions using the Numpy C API, we allow
those packages to define the include path as ``'numpy'`` as opposed to having
to import Numpy and call ``get_include``. The goal is to solve the issue that
if one has to import Numpy to define extensions, then Numpy has to be
installed/available before the package is installed, which means that one
needs to install Numpy in a separate installation step.
* We detect broken compilers and replace them with other compilers on-the-fly
unless the compiler is explicitly specified with the ``CC`` environment
variable.
* If Cython is not installed, then we automatically check for generated C files
(which are normally present in the stable releases) and give a nice error
if these are not found.
Version helpers
^^^^^^^^^^^^^^^^
Another piece of functionality we provide in astropy-helpers is the ability
to generate a ``packagename.version`` file that includes functions that
automatically set the version string for developer versions, to e.g.
``3.2.dev22213`` so that each developer version has a unique number (although
note that branches an equal number of commits away from the master branch will
share the same version number). To use this, import::
from astropy_helpers.git_helpers import get_git_devstr
in your ``setup.py`` file, and you will then be able to use::
VERSION += get_git_devstr()
where ``VERSION`` is a version string without any developer version suffix.
We then also provide a function that generates a ``version.py`` file inside your
package (which can then be imported as ``packagename.version``) that contains
variables such as ``major``, ``minor``, and ``bugfix``, as well as
``version_info`` (a tuple of the previous three values), a ``release`` flag that
indicates whether we are using a stable release, and several other complementary
variables. To use this, import::
from astropy_helpers.version_helpers import generate_version_py
in your ``setup.py`` file, and call::
generate_version_py(NAME, VERSION, RELEASE, uses_git=not RELEASE)
where ``NAME`` is the name of your package, ``VERSION`` is the full version string
(including any developer suffix), ``RELEASE`` indicates whether the version is a
stable or developer version, and ``uses_git`` indicates whether we are in a git
repository (using ``not RELEASE`` is sensible since git is not available in a
stable release).
Collecting package information
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``setup`` function from setuptools can take a number of options that indicate
for example what extensions to build, and what package data to include. However,
for large packages this can become cumbersome. We therefore provide a mechanism
for defining extensions and package data inside individual sub-packages. To do
this, you can create ``setup_package.py`` files anywhere in your package, and
these files can include one or more of the following functions:
* ``get_package_data``:
This function, if defined, should return a dictionary mapping the name of
the subpackage(s) that need package data to a list of data file paths
(possibly including wildcards) relative to the path of the package's source
code. e.g. if the source distribution has a needed data file
``astropy/wcs/tests/data/3d_cd.hdr``, this function should return
``{'astropy.wcs.tests':['data/3d_cd.hdr']}``. See the ``package_data``
option of the :func:`distutils.core.setup` function.
It is recommended that all such data be in a directory named ``data`` inside
the package within which it is supposed to be used. This package data
should be accessed via the ``astropy.utils.data.get_pkg_data_filename`` and
``astropy.utils.data.get_pkg_data_fileobj`` functions.
* ``get_extensions``:
This provides information for building C or Cython extensions. If defined,
it should return a list of ``distutils.core.Extension`` objects.
* ``get_build_options``:
This function allows a package to add extra build options. It
should return a list of tuples, where each element has:
- *name*: The name of the option as it would appear on the
commandline or in the ``setup.cfg`` file.
- *doc*: A short doc string for the option, displayed by
``setup.py build --help``.
- *is_bool* (optional): When `True`, the option is a boolean
option and doesn't have an associated value.
Once an option has been added, its value can be looked up using
``astropy_helpers.setup_helpers.get_distutils_build_option``.
* ``get_external_libraries``:
This function declares that the package uses libraries that are
included in the astropy distribution that may also be distributed
elsewhere on the users system. It should return a list of library
names. For each library, a new build option is created,
``'--use-system-X'`` which allows the user to request to use the
system's copy of the library. The package would typically call
``astropy_helpers.setup_helpers.use_system_library`` from its
``get_extensions`` function to determine if the package should use
the system library or the included one.
* ``get_entry_points()``:
This function can returns a dict formatted as required by
the ``entry_points`` argument to ``setup()``.
With these files in place, you can then add the following to your ``setup.py``
file::
from astropy_helpers.setup_helpers import get_package_info
...
package_info = get_package_info()
...
setup(..., **package_info)
OpenMP helpers
^^^^^^^^^^^^^^
We provide a helper function ``add_openmp_flags_if_available`` that can be used
to automatically add OpenMP flags for C/Cython extensions, based on whether
OpenMP is available and produces executable code. To use this, edit the
``setup_package.py`` file where you define a C extension, import the helper
function::
from astropy_helpers.openmp_helpers import add_openmp_flags_if_available
then once you have defined the extension and before returning it, use it as::
extension = Extension(...)
add_openmp_flags_if_available(extension)
return [extension]
Using astropy-helpers
---------------------
The easiest way to get set up with astropy-helpers in a new package is to use
the `package-template <http://docs.astropy.org/projects/package-template>`_
that we provide. This template is specifically designed for use with the helpers,
so using it avoids some of the tedium of setting up the heleprs.
However, we now go through the steps of adding astropy-helpers
as a submodule to a package in case you wish to do so manually. First, add
astropy-helpers as a submodule at the root of your repository::
git submodule add git://github.com/astropy/astropy-helpers astropy_helpers
Then go inside the submodule and check out a stable version of astropy-helpers.
You can see the available versions by running::
$ cd astropy_helpers
$ git tag
...
v2.0.6
v2.0.7
...
v3.0.1
v3.0.2
If you want to support Python 2, pick the latest v2.0.x version (in the above
case ``v2.0.7``) and if you don't need to support Python 2, just pick the latest
stable version (in the above case ``v3.0.2``). Check out this version with e.g.::
$ git checkout v3.0.2
Then go back up to the root of your repository and copy the ``ah_bootstrap.py``
file from the submodule to the root of your repository::
$ cd ..
$ cp astropy_helpers/ah_bootstrap.py .
Finally, add::
import ah_bootstrap
at the top of your ``setup.py`` file. This will ensure that ``astropy_helpers``
is now available to use in your ``setup.py`` file. Finally, add then commit your
changes::
git add astropy_helpers ah_bootstrap.py setup.py
git commit -m "Added astropy-helpers"
Updating astropy-helpers
------------------------
If you would like the Astropy team to automatically open pull requests to update
astropy-helpers in your package, then see the instructions `here
<https://github.com/astropy/astropy-procedures/blob/master/update-packages/README.md>`_.
To instead update astropy-helpers manually, go inside the submodule and do::
cd astropy_helpers
git fetch origin
Then checkout the version you want to use, e.g.::
git checkout v3.0.3
Go back up to the root of the repository and update the ``ah_bootstap.py`` file
too, then add your changes::
cp astropy_helpers/ah_bootstrap.py .
git add astropy_helpers ah_bootstrap.py
git commit ...
Platform: UNKNOWN

@@ -76,1 +373,2 @@ Classifier: Development Status :: 5 - Production/Stable

Classifier: Topic :: System :: Archiving :: Packaging
Requires-Python: >=3.5

@@ -6,10 +6,10 @@ CHANGES.rst

ah_bootstrap.py
ez_setup.py
setup.cfg
setup.py
astropy_helpers/__init__.py
astropy_helpers/conftest.py
astropy_helpers/distutils_helpers.py
astropy_helpers/git_helpers.py
astropy_helpers/openmp_helpers.py
astropy_helpers/setup_helpers.py
astropy_helpers/test_helpers.py
astropy_helpers/utils.py

@@ -25,54 +25,9 @@ astropy_helpers/version.py

astropy_helpers/commands/_dummy.py
astropy_helpers/commands/_test_compat.py
astropy_helpers/commands/build_ext.py
astropy_helpers/commands/build_py.py
astropy_helpers/commands/build_sphinx.py
astropy_helpers/commands/install.py
astropy_helpers/commands/install_lib.py
astropy_helpers/commands/register.py
astropy_helpers/commands/setup_package.py
astropy_helpers/commands/test.py
astropy_helpers/commands/src/compiler.c
astropy_helpers/compat/__init__.py
astropy_helpers/extern/__init__.py
astropy_helpers/extern/setup_package.py
astropy_helpers/extern/automodapi/__init__.py
astropy_helpers/extern/automodapi/autodoc_enhancements.py
astropy_helpers/extern/automodapi/automodapi.py
astropy_helpers/extern/automodapi/automodsumm.py
astropy_helpers/extern/automodapi/smart_resolver.py
astropy_helpers/extern/automodapi/utils.py
astropy_helpers/extern/automodapi/templates/autosummary_core/base.rst
astropy_helpers/extern/automodapi/templates/autosummary_core/class.rst
astropy_helpers/extern/automodapi/templates/autosummary_core/module.rst
astropy_helpers/extern/numpydoc/__init__.py
astropy_helpers/extern/numpydoc/docscrape.py
astropy_helpers/extern/numpydoc/docscrape_sphinx.py
astropy_helpers/extern/numpydoc/linkcode.py
astropy_helpers/extern/numpydoc/numpydoc.py
astropy_helpers/sphinx/__init__.py
astropy_helpers/sphinx/conf.py
astropy_helpers/sphinx/setup_package.py
astropy_helpers/sphinx/ext/__init__.py
astropy_helpers/sphinx/ext/changelog_links.py
astropy_helpers/sphinx/ext/doctest.py
astropy_helpers/sphinx/ext/edit_on_github.py
astropy_helpers/sphinx/ext/tocdepthfix.py
astropy_helpers/sphinx/ext/tests/__init__.py
astropy_helpers/sphinx/local/python2_local_links.inv
astropy_helpers/sphinx/local/python3_local_links.inv
astropy_helpers/sphinx/themes/bootstrap-astropy/globaltoc.html
astropy_helpers/sphinx/themes/bootstrap-astropy/layout.html
astropy_helpers/sphinx/themes/bootstrap-astropy/localtoc.html
astropy_helpers/sphinx/themes/bootstrap-astropy/searchbox.html
astropy_helpers/sphinx/themes/bootstrap-astropy/theme.conf
astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_linkout.svg
astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_linkout_20.png
astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo.ico
astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo.svg
astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo_32.png
astropy_helpers/sphinx/themes/bootstrap-astropy/static/bootstrap-astropy.css
astropy_helpers/sphinx/themes/bootstrap-astropy/static/copybutton.js
astropy_helpers/sphinx/themes/bootstrap-astropy/static/sidebar.js
licenses/LICENSE_COPYBUTTON.rst
licenses/LICENSE_NUMPYDOC.rst
licenses/LICENSE_ASTROSCRAPPY.rst

@@ -1,17 +0,21 @@

# Autogenerated by Astropy-affiliated package astropy_helpers's setup.py on 2017-07-29 16:14:44.427577
# Autogenerated by Astropy-affiliated package astropy_helpers's setup.py on 2019-02-17 11:49:47 UTC
from __future__ import unicode_literals
import datetime
version = "2.0"
githash = "ed2e7897862ae9e979b336df670d7a5541cdd8f0"
version = "3.1"
githash = "9f82aac6c2141b425e2d639560f7260189d90b54"
major = 2
minor = 0
major = 3
minor = 1
bugfix = 0
version_info = (major, minor, bugfix)
release = True
timestamp = datetime.datetime(2017, 7, 29, 16, 14, 44, 427577)
timestamp = datetime.datetime(2019, 2, 17, 11, 49, 47)
debug = False
astropy_helpers_version = ""
try:

@@ -18,0 +22,0 @@ from ._compiler import compiler

@@ -152,1 +152,6 @@ # -*- coding: utf-8 -*-

edit_on_github_doc_root = "docs"
# Use nitpicky mode to avoid broken links in docs
nitpicky = True
nitpick_ignore = [('py:class', 'aplpy.layers.Layers'),
('py:class', 'aplpy.regions.Regions')]

@@ -15,4 +15,4 @@ .. _arbitrary:

header. However, it is possible to explicitly specify the coordinate type with
the :meth:`~aplpy.aplpy.FITSFigure.set_xaxis_coord_type` and :meth:`~aplpy.aplpy.FITSFigure.set_yaxis_coord_type` methods in the
:class:`~aplpy.aplpy.FITSFigure` object::
the :meth:`~aplpy.FITSFigure.set_xaxis_coord_type` and :meth:`~aplpy.FITSFigure.set_yaxis_coord_type` methods in the
:class:`~aplpy.FITSFigure` object::

@@ -62,4 +62,4 @@ f = FITSFigure('2MASS_k.fits')

but it is possible to change this, which can be useful for non-sky
coordinates. When calling :meth:`~aplpy.aplpy.FITSFigure.show_grayscale` or
:meth:`~aplpy.aplpy.FITSFigure.show_colorscale`, simply add ``aspect='auto'``
coordinates. When calling :meth:`~aplpy.FITSFigure.show_grayscale` or
:meth:`~aplpy.FITSFigure.show_colorscale`, simply add ``aspect='auto'``
which will override the ``aspect='equal'`` default.

@@ -14,6 +14,6 @@ .. _howto-avm:

Note that no filename is required for :meth:`~aplpy.aplpy.FITSFigure.show_rgb`
Note that no filename is required for :meth:`~aplpy.FITSFigure.show_rgb`
in this case.
If PyAVM is installed, :func:`~aplpy.rgb.make_rgb_image` can embed AVM
If PyAVM is installed, :func:`~aplpy.make_rgb_image` can embed AVM
meta-data into RGB images it creates, although only JPEG and PNG files support

@@ -33,9 +33,9 @@ this::

In other words, this means that when creating an RGB image with APLpy, it is
no longer necessary to initialize :class:`~aplpy.aplpy.FITSFigure` with a FITS
file and then use :meth:`~aplpy.aplpy.FITSFigure.show_rgb` with the RGB image
filename - instead, :class:`~aplpy.aplpy.FITSFigure` can be directly
no longer necessary to initialize :class:`~aplpy.FITSFigure` with a FITS
file and then use :meth:`~aplpy.FITSFigure.show_rgb` with the RGB image
filename - instead, :class:`~aplpy.FITSFigure` can be directly
initialized with the AVM-tagged image.
To disable the embedding of AVM tags, you can use the ``embed_avm_tags=False``
option for :func:`~aplpy.rgb.make_rgb_image`.
option for :func:`~aplpy.make_rgb_image`.

@@ -42,0 +42,0 @@ These features require `PyAVM 0.9.1 <http://astrofrog.github.io/pyavm/>`_

Creating subplots
-----------------
By default, :class:`~aplpy.aplpy.FITSFigure` creates a figure with a single
By default, :class:`~aplpy.FITSFigure` creates a figure with a single
subplot that occupies the entire figure. However, APLpy can be used to place a
subplot in an existing matplotlib figure instance. To do this,
:class:`~aplpy.aplpy.FITSFigure` should be called with the ``figure=``
:class:`~aplpy.FITSFigure` should be called with the ``figure=``
argument as follows::

@@ -9,0 +9,0 @@

@@ -12,5 +12,5 @@ Quick reference Guide

For more information on a specific command and all the options
available, type ``help`` followed by the method name, e.g. ``help
fig.show_grayscale``. When multiple optional arguments are given,
this does not mean that all of them have to be specified, but
available, use the ``help()`` function, e.g.
``help(fig.show_grayscale)``. When multiple optional arguments are
given, this does not mean that all of them have to be specified, but
just shows all the options available.

@@ -149,3 +149,3 @@

Once :meth:`~aplpy.aplpy.FITSFigure.add_colorbar` has been called, the ``fig.colorbar`` object is created and the following methods are then available:
Once :meth:`~aplpy.FITSFigure.add_colorbar` has been called, the ``fig.colorbar`` object is created and the following methods are then available:

@@ -201,3 +201,3 @@ * Show and hide the colorbar::

Once :meth:`~aplpy.aplpy.FITSFigure.add_grid` has been called, the ``fig.grid`` object is created and the following methods are then available:
Once :meth:`~aplpy.FITSFigure.add_grid` has been called, the ``fig.grid`` object is created and the following methods are then available:

@@ -235,3 +235,3 @@ * Show and hide the grid::

Once :meth:`~aplpy.aplpy.FITSFigure.add_scalebar` has been called, the ``fig.scalebar`` object is created and the following methods are then available:
Once :meth:`~aplpy.FITSFigure.add_scalebar` has been called, the ``fig.scalebar`` object is created and the following methods are then available:

@@ -298,3 +298,3 @@ * Show and hide the scalebar::

Once :meth:`~aplpy.aplpy.FITSFigure.add_beam` has been called, the ``fig.beam`` object is created and the following methods are then available:
Once :meth:`~aplpy.FITSFigure.add_beam` has been called, the ``fig.beam`` object is created and the following methods are then available:

@@ -301,0 +301,0 @@ * Show and hide the beam::

@@ -23,3 +23,3 @@ Beginner Tutorial

To start off, use the :class:`~aplpy.aplpy.FITSfigure` class to create a
To start off, use the :class:`~aplpy.FITSFigure` class to create a
canvas to where your data will be plotted::

@@ -53,4 +53,4 @@

to show the image showing a 'heat' map. You can find more information in the
:meth:`~aplpy.aplpy.FITSFigure.show_grayscale` and
:meth:`~aplpy.aplpy.FITSFigure.show_colorscale` documentation. For
:meth:`~aplpy.FITSFigure.show_grayscale` and
:meth:`~aplpy.FITSFigure.show_colorscale` documentation. For
example, you can control the minimum and maximum pixel values to show and the

@@ -79,5 +79,5 @@ stretch function to use.

There are a number of arguments that can be passed to :meth:`~aplpy.aplpy.FITSFigure.show_contour` to
There are a number of arguments that can be passed to :meth:`~aplpy.FITSFigure.show_contour` to
control the appearance of the contours as well as the number of levels to
show. For more information, see the see the :meth:`~aplpy.aplpy.FITSFigure.show_contour` documentation.
show. For more information, see the see the :meth:`~aplpy.FITSFigure.show_contour` documentation.

@@ -97,12 +97,11 @@ Display a coordinate grid using::

import numpy
data = numpy.loadtxt('data/yso_wcs_only.txt')
ra, dec = data[:, 0], data[:, 1]
ra, dec = numpy.loadtxt('data/yso_wcs_only.txt', unpack=True)
gc.show_markers(ra, dec, edgecolor='green', facecolor='none',
marker='o', s=10, alpha=0.5)
For more information, see the :meth:`~aplpy.aplpy.FITSFigure.show_markers`
For more information, see the :meth:`~aplpy.FITSFigure.show_markers`
documentation.
It's often the case that you might want to change the look of a contour or
markers, but if you run :meth:`~aplpy.aplpy.FITSFigure.show_contour` or :meth:`~aplpy.aplpy.FITSFigure.show_markers` a second time, it
markers, but if you run :meth:`~aplpy.FITSFigure.show_contour` or :meth:`~aplpy.FITSFigure.show_markers` a second time, it
will overplot rather than replacing. To solve this problem APLpy has 'layers'

@@ -120,5 +119,5 @@ which can be manipulated in a basic way. Type::

You can use :meth:`~aplpy.aplpy.FITSFigure.remove_layer`, :meth:`~aplpy.aplpy.FITSFigure.hide_layer`, and :meth:`~aplpy.aplpy.FITSFigure.show_layer` to manipulate
You can use :meth:`~aplpy.FITSFigure.remove_layer`, :meth:`~aplpy.FITSFigure.hide_layer`, and :meth:`~aplpy.FITSFigure.show_layer` to manipulate
the layers, and you can also specify the ``layer=name`` argument to
:meth:`~aplpy.aplpy.FITSFigure.show_contour` or :meth:`~aplpy.aplpy.FITSFigure.show_markers`. Using the latter forces APLpy to name
:meth:`~aplpy.FITSFigure.show_contour` or :meth:`~aplpy.FITSFigure.show_markers`. Using the latter forces APLpy to name
the layer you are creating with the name provided, and can also be used to

@@ -132,3 +131,3 @@ replace an existing layer. For example, let's change the color of the markers

Note the presence of the ``layer='marker_set_1'`` which means that the
current markers plot will be replaced. To view active layers, you can use the :meth:`~aplpy.aplpy.FITSFigure.list_layers` documentation.
current markers plot will be replaced. To view active layers, you can use the :meth:`~aplpy.FITSFigure.list_layers` documentation.

@@ -158,4 +157,3 @@ To wrap up this tutorial, we will save the plot to a file. Type the following::

data = numpy.loadtxt('data/yso_wcs_only.txt')
ra, dec = data[:, 0], data[:, 1]
ra, dec = numpy.loadtxt('data/yso_wcs_only.txt', unpack=True)

@@ -162,0 +160,0 @@ gc.show_markers(ra, dec, layer='marker_set_1', edgecolor='red',

@@ -9,4 +9,4 @@ Slicing multi-dimensional data cubes

re-ordering dimensions. The two key arguments to
:class:`~aplpy.aplpy.FITSFigure` to control this are ``dimensions`` and
``slices``. These arguments can also be passed to :meth:`~aplpy.aplpy.FITSFigure.show_contour`.
:class:`~aplpy.FITSFigure` to control this are ``dimensions`` and
``slices``. These arguments can also be passed to :meth:`~aplpy.FITSFigure.show_contour`.

@@ -48,4 +48,4 @@ The ``dimensions`` argument is used to specify which dimensions should be used

but it is possible to change this. When calling
:meth:`~aplpy.aplpy.FITSFigure.show_grayscale` or
:meth:`~aplpy.aplpy.FITSFigure.show_colorscale`, simply add ``aspect='auto'``
:meth:`~aplpy.FITSFigure.show_grayscale` or
:meth:`~aplpy.FITSFigure.show_colorscale`, simply add ``aspect='auto'``
which will override the ``aspect='equal'`` default. The ``aspect='auto'`` is

@@ -52,0 +52,0 @@ demonstrated below.

@@ -103,1 +103,2 @@ *******************

:no-inheritance-diagram:
:inherited-members:

@@ -13,3 +13,3 @@ Making RGB images

following code shows how this can be done using the
:func:`~aplpy.rgb.make_rgb_cube` function::
:func:`~aplpy.make_rgb_cube` function::

@@ -28,6 +28,6 @@ aplpy.make_rgb_cube(['2mass_k.fits', '2mass_h.fits',

The :func:`~aplpy.rgb.make_rgb_image` function can be used to produce an RGB
The :func:`~aplpy.make_rgb_image` function can be used to produce an RGB
image from either three FITS files in the exact same projection, or a FITS cube
containing the three channels (such as that output by
:func:`~aplpy.rgb.make_rgb_cube`). The following example illustrates how to do
:func:`~aplpy.make_rgb_cube`). The following example illustrates how to do
this::

@@ -64,7 +64,7 @@

other than JPEG or PNG, then you need to instantiate the
:class:`~aplpy.aplpy.FITSFigure` class with a FITS file with exactly the same
dimensions and WCS as the RGB image. The :func:`~aplpy.rgb.make_rgb_cube`
:class:`~aplpy.FITSFigure` class with a FITS file with exactly the same
dimensions and WCS as the RGB image. The :func:`~aplpy.make_rgb_cube`
function will in fact produce a file with the same name as the main output, but
including a ``_2d`` suffix, and this can be used to instantiate
:class:`~aplpy.aplpy.FITSFigure`::
:class:`~aplpy.FITSFigure`::

@@ -71,0 +71,0 @@ # Reproject the images to a common projection - this will also

Metadata-Version: 2.1
Name: aplpy
Version: 2.0rc2
Name: APLpy
Version: 2.0
Summary: The Astronomical Plotting Library in Python

@@ -9,7 +9,62 @@ Home-page: http://aplpy.github.io

License: MIT
Description: The Astronomical Plotting Library in Python
Description: |Build Status| |CircleCI| |codecov| |Documentation Status|
About
-----
APLpy (the Astronomical Plotting Library in Python) is a Python module
aimed at producing publication-quality plots of astronomical imaging
data in FITS format.
PyPI: https://pypi.python.org/pypi/APLpy
Website: http://aplpy.github.io
Documentation: http://aplpy.readthedocs.io
APLpy is released under an MIT open-source license.
Installing
----------
The following dependencies are required:
- `Numpy <http://www.numpy.org>`__ 1.11 or later
- `Matplotlib <http://www.matplotlib.org>`__ 2.0 or later
- `Astropy <http://www.astropy.org>`__ 3.1 or later
- `reproject <http://reproject.readthedocs.org>`__ 0.4 or later
and the following are optional:
- `PyAVM <http://astrofrog.github.io/pyavm/>`__ 0.9.4 or later
- `pyregion <http://pyregion.readthedocs.org/>`__ 2.0 or later
- `pillow <https://pypi.org/project/Pillow/>`__ 4.0 or later
- `scikit-image <https://pypi.org/project/scikit-image/>`__ 0.14 or
later
You can install APLpy with:
::
pip install aplpy
If you want to install all optional dependencies, you can do:
::
pip install aplpy[all]
.. |Build Status| image:: https://travis-ci.org/aplpy/aplpy.svg?branch=master
:target: https://travis-ci.org/aplpy/aplpy
.. |CircleCI| image:: https://circleci.com/gh/aplpy/aplpy/tree/master.svg?style=svg
:target: https://circleci.com/gh/aplpy/aplpy/tree/master
.. |codecov| image:: https://codecov.io/gh/aplpy/aplpy/branch/master/graph/badge.svg
:target: https://codecov.io/gh/aplpy/aplpy
.. |Documentation Status| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat
:target: https://aplpy.readthedocs.io/en/latest/
Platform: UNKNOWN
Requires-Python: >=3.5
Provides-Extra: all
Provides-Extra: docs
Provides-Extra: all
Provides-Extra: test

@@ -25,3 +25,2 @@ [build_sphinx]

description = The Astronomical Plotting Library in Python
long_description = The Astronomical Plotting Library in Python
author = Thomas Robitaille and Eli Bressert

@@ -35,3 +34,3 @@ author_email = thomas.robitaille@gmail.com, elibre@users.sourceforge.net

# version should be PEP440 compatible (https://www.python.org/dev/peps/pep-0440/)
version = 2.0rc2
version = 2.0

@@ -38,0 +37,0 @@ [options.extras_require]

@@ -125,3 +125,3 @@ #!/usr/bin/env python

setup(name=PACKAGENAME,
setup(name='APLpy',
version=VERSION,

@@ -128,0 +128,0 @@ description=DESCRIPTION,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

[![Build Status](https://travis-ci.org/aplpy/aplpy.svg?branch=master)](https://travis-ci.org/aplpy/aplpy)
[![CircleCI](https://circleci.com/gh/aplpy/aplpy/tree/master.svg?style=svg)](https://circleci.com/gh/aplpy/aplpy/tree/master)
[![codecov](https://codecov.io/gh/aplpy/aplpy/branch/master/graph/badge.svg)](https://codecov.io/gh/aplpy/aplpy)
[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://aplpy.readthedocs.io/en/latest/)
About
-----
APLpy (the Astronomical Plotting Library in Python) is a
Python module aimed at producing publication-quality plots
of astronomical imaging data in FITS format.
PyPI: https://pypi.python.org/pypi/APLpy
Website: http://aplpy.github.io
Documentation: http://aplpy.readthedocs.io
APLpy is released under an MIT open-source license.
Installing
----------
The following dependencies are required:
* [Numpy](http://www.numpy.org) 1.11 or later
* [Matplotlib](http://www.matplotlib.org) 2.0 or later
* [Astropy](http://www.astropy.org) 3.1 or later
* [reproject](http://reproject.readthedocs.org) 0.4 or later
and the following are optional:
* [PyAVM](http://astrofrog.github.io/pyavm/) 0.9.4 or later
* [pyregion](http://pyregion.readthedocs.org/) 2.0 or later
* [pillow](https://pypi.org/project/Pillow/) 4.0 or later
* [scikit-image](https://pypi.org/project/scikit-image/) 0.14 or later
You can install APLpy with:
pip install aplpy
If you want to install all optional dependencies, you can do:
pip install aplpy[all]

Sorry, the diff of this file is too big to display