Commit 8c6c3b27 authored by Ole Streicher's avatar Ole Streicher

New upstream version 0.4

parent 12050ae9
0.3.2 (2017-03-31)
------------------
0.4 (2017-10-30)
----------------
General
^^^^^^^
- Fixed file permissions in the released source distribution.
- Dropped python 3.3 support. [#542]
- Dropped numpy 1.8 support. Minimal required version is now numpy
1.9. [#542]
- Dropped support for astropy 1.x versions. Minimal required version
is now astropy 2.0. [#575]
- Dropped scipy 0.15 support. Minimal required version is now scipy
0.16. [#576]
- Explicitly require six as dependency. [#601]
New Features
^^^^^^^^^^^^
- ``photutils.aperture``
- Added ``BoundingBox`` class, used when defining apertures. [#481]
- Apertures now have ``__repr__`` and ``__str__`` defined. [#493]
- Improved plotting of annulus apertures using Bezier curves. [#494]
- Rectangular apertures now use the true minimal bounding box. [#507]
- Elliptical apertures now use the true minimal bounding box. [#508]
- Added a ``to_sky`` method for pixel apertures. [#512]
- ``photutils.background``
- Mesh rejection now also applies to pixels that are masked during
sigma clipping. [#544]
- ``photutils.datasets``
- Added new ``make_wcs`` and ``make_imagehdu`` functions. [#527]
- Added new ``show_progress`` keyword to the ``load_*`` functions.
[#590]
- ``photutils.isophote``
- Added a new ``photutils.isophote`` subpackage to provide tools to
fit elliptical isophotes to a galaxy image. [#532, #603]
- ``photutils.segmentation``
- Added a ``cmap`` method to ``SegmentationImage`` to generate a
random matplotlib colormap. [#513]
- Added ``sky_centroid`` and ``sky_centroid_icrs`` source
properties. [#592]
- Added new source properties representing the sky coordinates of
the bounding box corner vertices (``sky_bbox_ll``, ``sky_bbox_ul``
``sky_bbox_lr``, and ``sky_bbox_ur``). [#592]
- Added new ``SourceCatalog`` class to hold the list of
``SourceProperties``. [#608]
- The ``properties_table`` function is now deprecated. Use the
``SourceCatalog.to_table()`` method instead. [#608]
- ``phtotutils.psf``
- Uncertainties on fitted parameters are added to the final table. [#516]
- Fitted results of any free parameter are added to the final table. [#471]
API changes
^^^^^^^^^^^
- ``photutils.aperture``
- The ``ApertureMask`` ``apply()`` method has been renamed to
``multiply()``. [#481].
- The ``ApertureMask`` input parameter was renamed from ``mask`` to
``data``. [#548]
- Removed the ``pixelwise_errors`` keyword from
``aperture_photometry``. [#489]
- ``photutils.background``
- The ``Background2D`` keywords ``exclude_mesh_method`` and
``exclude_mesh_percentile`` were removed in favor of a single
keyword called ``exclude_percentile``. [#544]
- Renamed ``BiweightMidvarianceBackgroundRMS`` to
``BiweightScaleBackgroundRMS``. [#547]
- Removed the ``SigmaClip`` class. ``astropy.stats.SigmaClip`` is
a direct replacement. [#569]
- ``photutils.datasets``
- The ``make_poission_noise`` function was renamed to
``apply_poisson_noise``. [#527]
- The ``make_random_gaussians`` function was renamed to
``make_random_gaussians_table``. The parameter ranges
must now be input as a dictionary. [#527]
- The ``make_gaussian_sources`` function was renamed to
``make_gaussian_sources_image``. [#527]
- The ``make_random_models`` function was renamed to
``make_random_models_table``. [#527]
- The ``make_model_sources`` function was renamed to
``make_model_sources_image``. [#527]
- The ``unit``, ``hdu``, ``wcs``, and ``wcsheader`` keywords in
``photutils.datasets`` functions were removed. [#527]
- ``'photutils-datasets'`` was added as an optional ``location`` in
the ``get_path`` function. This option is used as a fallback in
case the ``'remote'`` location (astropy data server) fails.
[#589]
- ``photutils.detection``
- The ``daofind`` and ``irafstarfinder`` functions were removed.
[#588]
- ``photutils.psf``
- ``IterativelySubtractedPSFPhotometry`` issues a "no sources
detected" warning only on the first iteration, if applicable.
[#566]
- ``photutils.segmentation``
- The ``'icrs_centroid'``, ``'ra_icrs_centroid'``, and
``'dec_icrs_centroid'`` source properties are deprecated and are no
longer default columns returned by ``properties_table``. [#592]
- The ``properties_table`` function now returns a ``QTable``. [#592]
- ``photutils.utils``
- The ``background_color`` keyword was removed from the
``random_cmap`` function. [#528]
- Deprecated unused ``interpolate_masked_data()``. [#526, #611]
Bug Fixes
^^^^^^^^^
- ``photutils.segmentation``
- Fixed ``deblend_sources`` so that it correctly deblends multiple
sources. [#572]
- Fixed a bug in calculation of the ``sky_centroid_icrs`` (and
deprecated ``icrs_centroid``) property where the incorrect pixel
origin was being passed. [#592]
- ``photutils.utils``
- Added a check that ``data`` and ``bkg_error`` have the same units
in ``calc_total_error``. [#537]
0.3.1 (2017-03-02)
0.3.1 (unreleased)
------------------
General
......
Photutils is an `Astropy <http://www.astropy.org/>`_ affiliated
package and we follow the `Astropy Community Code of Conduct
<http://www.astropy.org/code_of_conduct.html>`_.
Contributing to Photutils
=========================
Reporting Issues
----------------
When opening an issue to report a problem, please try and provide a
minimal code example that reproduces the issue. Also please include
details of the operating system and the Python, Numpy, Astropy, and
Photutils versions you are using.
Contributing code
-----------------
So you're interested in contributing code to Photutils? Excellent!
Most contributions to Photutils are done via pull requests from GitHub
users' forks of the `Photutils repository
<https://github.com/astropy/photutils>`_. If you're new to this style
of development, you'll want to read over the `Astropy development
workflow
<http://docs.astropy.org/en/latest/development/workflow/development_workflow.html>`_).
Once you open a pull request (which should be opened against the
``master`` branch, not against any of the other branches), please make
sure that you include the following:
- **Code**: the code you are adding, which should follow as much as
possible the `Astropy coding guidelines <http://docs.astropy.org/en/latest/development/codeguide.html>`_.
- **Tests**: these are either tests to ensure code that previously
failed now works (regression tests) or tests that cover as much as
possible of the new functionality to make sure it doesn't break in
future. The tests are also used to ensure consistent results on all
platforms, since we run these tests on many
platforms/configurations. For more information about how to write
tests, see the `Astropy testing guidelines <http://docs.astropy.org/en/latest/development/testguide.html>`_.
- **Documentation**: if you are adding new functionality, be sure to
include a description in the main documentation (in ``docs/``). For
more information, please see the detailed `Astropy documentation
guidelines <http://docs.astropy.org/en/latest/development/docguide.html>`_.
- **Changelog entry**: whether you are fixing a bug or adding new
functionality, you should add an entry to the ``CHANGES.rst`` file
that includes the PR number and if possible the issue number (if you
are opening a pull request you may not know this yet, but you can
add it once the pull request is open). If you're not sure where to
put the changelog entry, wait until a maintainer has reviewed your
PR and assigned it to a milestone.
You do not need to include a changelog entry for fixes to bugs
introduced in the developer version and therefore are not present in
the stable releases. In general you do not need to include a
changelog entry for minor documentation or test updates. Only
user-visible changes (new features/API changes, fixed issues) need
to be mentioned. If in doubt ask the core maintainer reviewing your
changes.
Other Tips
----------
- To prevent the automated tests from running you can add ``[ci
skip]`` to your commit message. This is useful if your PR is a work
in progress and you are not yet ready for the tests to run. For
example:
$ git commit -m "WIP widget [ci skip]"
- If you already made the commit without including this string, you can edit
your existing commit message by running:
$ git commit --amend
- To skip only the AppVeyor (Windows) CI builds you can use ``[skip
appveyor]``, and to skip testing on Travis CI use ``[skip travis]``.
- If your commit makes substantial changes to the documentation, but no code
changes, the you can use ``[docs only]``, that will skip all but the
documentation building jobs on Travis.
- When contributing trivial documentation fixes (i.e. fixes to typos,
spelling, grammar) that do not contain any special markup and are
not associated with code changes, please include the string ``[docs
only]`` in your commit message.
$ git commit -m "Fixed typo [docs only]"
Checklist for Contributed Code
------------------------------
A pull request for a new feature will be reviewed to see if it meets the
following requirements. For any pull request, a Photutils maintainer can
help to make sure that the pull request meets the requirements for inclusion
in the package.
**Scientific Quality**
(when applicable)
* Is the submission relevant to this package?
* Are references included to the original source for the algorithm?
* Does the code perform as expected?
* Has the code been tested against previously existing implementations?
**Code Quality**
* Are the `Astropy coding guidelines <http://docs.astropy.org/en/latest/development/codeguide.html>`_ followed?
* Is the code compatible with Python 2.7 and >=3.4?
* Are there dependencies other than the Astropy core, the Python
Standard Library, and NumPy 1.9.0 or later?
- Is the package importable even if the C-extensions are not built?
- Are additional dependencies handled appropriately?
- Do functions and classes that require additional dependencies raise
an `ImportError` if they are not present?
**Testing**
* Are the `Astropy testing guidelines <http://docs.astropy.org/en/latest/development/testguide.html>`_ followed?
* Are the inputs to the functions and classes sufficiently tested?
* Are there tests for any exceptions raised?
* Are there tests for the expected performance?
* Are the sources for the tests documented?
* Are the tests that require an `optional dependency <http://docs.astropy.org/en/latest/development/testguide.html#tests-requiring-optional-dependencies>`_ marked as such?
* Does "``python setup.py test``" run without failures?
**Documentation**
* Are the `Astropy documentation guidelines <http://docs.astropy.org/en/latest/development/docguide.html>`_ followed?
* Is there a `docstring <http://docs.astropy.org/en/latest/development/docrules.html>`_ in the functions and classes describing:
- What the code does?
- The format of the inputs of the function or class?
- The format of the outputs of the function or class?
- References to the original algorithms?
- Any exceptions which are raised?
- An example of running the code?
* Is there any information needed to be added to the docs to describe the function or class?
* Does the documentation build without errors or warnings?
**License**
* Is the astropy license included at the top of the file?
* Are there any conflicts with this code and existing codes?
**Photutils requirements**
* Do all the Travis CI, AppVeyor, and CircleCI tests pass?
* If applicable, has an entry been added into the changelog?
* Can you checkout the pull request and repeat the examples and tests?
Copyright (c) 2011-2017, Photutils developers
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Photutils Team nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Metadata-Version: 1.1
Name: photutils
Version: 0.3.2
Version: 0.4
Summary: An Astropy package for photometry
Home-page: http://photutils.readthedocs.io/
Author: The Photutils Developers
Author-email: astropy.team@gmail.com
Author-email: photutils.team@gmail.com
License: BSD
Description-Content-Type: UNKNOWN
Description:
* Code: https://github.com/astropy/photutils
* Docs: https://photutils.readthedocs.io/
......
......@@ -54,7 +54,7 @@ Citing Photutils
----------------
.. image:: https://zenodo.org/badge/2640766.svg
:target: https://zenodo.org/badge/latestdoi/2640766
:target: https://zenodo.org/badge/latestdoi/2640766
If you use Photutils, please cite the package via its Zenodo record.
......@@ -62,7 +62,7 @@ If you use Photutils, please cite the package via its Zenodo record.
License
-------
Photutils is licensed under a 3-clause BSD style license (see the
``licenses/LICENSE.rst`` file).
Photutils is licensed under a 3-clause BSD style license. Please see
the ``LICENSE.rst`` file.
.. _AstroPy: http://www.astropy.org/
......@@ -91,13 +91,24 @@ except:
use_setuptools()
# typing as a dependency for 1.6.1+ Sphinx causes issues when imported after
# initializing submodule with ah_boostrap.py
# See discussion and references in
# https://github.com/astropy/astropy-helpers/issues/302
try:
import typing # noqa
except ImportError:
pass
# Note: The following import is required as a workaround to
# https://github.com/astropy/astropy-helpers/issues/89; if we don't import this
# module now, it will get cleaned up after `run_setup` is called, but that will
# later cause the TemporaryDirectory class defined in it to stop working when
# used later on by setuptools
try:
import setuptools.py31compat
import setuptools.py31compat # noqa
except ImportError:
pass
......@@ -702,7 +713,7 @@ class _Bootstrapper(object):
if self.offline:
cmd.append('--no-fetch')
elif status == 'U':
raise _AHBoostrapSystemExit(
raise _AHBootstrapSystemExit(
'Error: Submodule {0} contains unresolved merge conflicts. '
'Please complete or abandon any changes in the submodule so that '
'it is in a usable state, then try again.'.format(submodule))
......@@ -763,7 +774,7 @@ def run_cmd(cmd):
msg = 'Command not found: `{0}`'.format(' '.join(cmd))
raise _CommandNotFound(msg, cmd)
else:
raise _AHBoostrapSystemExit(
raise _AHBootstrapSystemExit(
'An unexpected error occurred when running the '
'`{0}` command:\n{1}'.format(' '.join(cmd), str(e)))
......@@ -878,46 +889,6 @@ class _AHBootstrapSystemExit(SystemExit):
super(_AHBootstrapSystemExit, self).__init__(msg, *args[1:])
if sys.version_info[:2] < (2, 7):
# In Python 2.6 the distutils log does not log warnings, errors, etc. to
# stderr so we have to wrap it to ensure consistency at least in this
# module
import distutils
class log(object):
def __getattr__(self, attr):
return getattr(distutils.log, attr)
def warn(self, msg, *args):
self._log_to_stderr(distutils.log.WARN, msg, *args)
def error(self, msg):
self._log_to_stderr(distutils.log.ERROR, msg, *args)
def fatal(self, msg):
self._log_to_stderr(distutils.log.FATAL, msg, *args)
def log(self, level, msg, *args):
if level in (distutils.log.WARN, distutils.log.ERROR,
distutils.log.FATAL):
self._log_to_stderr(level, msg, *args)
else:
distutils.log.log(level, msg, *args)
def _log_to_stderr(self, level, msg, *args):
# This is the only truly 'public' way to get the current threshold
# of the log
current_threshold = distutils.log.set_threshold(distutils.log.WARN)
distutils.log.set_threshold(current_threshold)
if level >= current_threshold:
if args:
msg = msg % args
sys.stderr.write('%s\n' % msg)
sys.stderr.flush()
log = log()
BOOTSTRAPPER = _Bootstrapper.main()
......
astropy-helpers Changelog
=========================
*************************
2.0.2 (2017-10-13)
------------------
- Added new helper function add_openmp_flags_if_available that can add
OpenMP compilation flags to a C/Cython extension if needed. [#346]
- Update numpydoc to v0.7. [#343]
- The function ``get_git_devstr`` now returns ``'0'`` instead of ``None`` when
no git repository is present. This allows generation of development version
strings that are in a format that ``setuptools`` expects (e.g. "1.1.3.dev0"
instead of "1.1.3.dev"). [#330]
- It is now possible to override generated timestamps to make builds
reproducible by setting the ``SOURCE_DATE_EPOCH`` environment variable [#341]
- Mark Sphinx extensions as parallel-safe. [#344]
- Switch to using mathjax instead of imgmath for local builds. [#342]
- Deprecate ``exclude`` parameter of various functions in setup_helpers since
it could not work as intended. Add new function ``add_exclude_packages`` to
provide intended behavior. [#331]
- Allow custom Sphinx doctest extension to recognize and process standard
doctest directives ``testsetup`` and ``doctest``. [#335]
2.0.1 (2017-07-28)
------------------
- Fix compatibility with Sphinx <1.5. [#326]
2.0 (2017-07-06)
----------------
- Add support for package that lies in a subdirectory. [#249]
- Removing ``compat.subprocess``. [#298]
- Python 3.3 is no longer supported. [#300]
- The 'automodapi' Sphinx extension (and associated dependencies) has now
been moved to a standalone package which can be found at
https://github.com/astropy/sphinx-automodapi - this is now bundled in
astropy-helpers under astropy_helpers.extern.automodapi for
convenience. Version shipped with astropy-helpers is v0.6.
[#278, #303, #309, #323]
- The ``numpydoc`` Sphinx extension has now been moved to
``astropy_helpers.extern``. [#278]
- Fix ``build_docs`` error catching, so it doesn't hide Sphinx errors. [#292]
- Fix compatibility with Sphinx 1.6. [#318]
- Updating ez_setup.py to the last version before it's removal. [#321]
1.3.1 (2017-03-18)
------------------
......@@ -57,7 +116,7 @@ astropy-helpers Changelog
------------------
- Fixed crash in build with ``AttributeError: cython_create_listing`` with
older versions of setuptools. [#209]
older versions of setuptools. [#209, #210]
1.1 (2015-12-10)
......@@ -123,7 +182,7 @@ astropy-helpers Changelog
------------------
- Fixed issue with the sphinx documentation css where the line numbers for code
blocks were not aligned with the code. [#179]
blocks were not aligned with the code. [#179, #180]
- Fixed crash that could occur when trying to build Cython extension modules
when Cython isn't installed. Normally this still results in a failed build,
......@@ -134,11 +193,11 @@ astropy-helpers Changelog
found. [#182]
- Quieted warnings about deprecated Numpy API in Cython extensions, when
building Cython extensions against Numpy >= 1.7. [#183]
building Cython extensions against Numpy >= 1.7. [#183, #186]
- Improved support for py.test >= 2.7--running the ``./setup.py test`` command
now copies all doc pages into the temporary test directory as well, so that
all test files have a "common root directory". [#189]
all test files have a "common root directory". [#189, #190]
1.0.3 (2015-07-22)
......@@ -274,15 +333,15 @@ astropy-helpers Changelog
- Fixed an issue on Python 3 where importing a package using astropy-helper's
generated version.py module would crash when the current working directory
is an empty git repository. [#114]
is an empty git repository. [#114, #137]
- Fixed an issue where the "revision count" appended to .dev versions by
the generated version.py did not accurately reflect the revision count for
the package it belongs to, and could be invalid if the current working
directory is an unrelated git repository. [#107]
directory is an unrelated git repository. [#107, #137]
- Likewise, fixed a confusing warning message that could occur in the same
circumstances as the above issue. [#121]
circumstances as the above issue. [#121, #137]
0.4.4 (2014-12-31)
......
......@@ -11,6 +11,21 @@ leverage this work. The motivation behind this package and details of its
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
......
......@@ -91,13 +91,24 @@ except:
use_setuptools()
# typing as a dependency for 1.6.1+ Sphinx causes issues when imported after
# initializing submodule with ah_boostrap.py
# See discussion and references in
# https://github.com/astropy/astropy-helpers/issues/302
try:
import typing # noqa
except ImportError:
pass
# Note: The following import is required as a workaround to
# https://github.com/astropy/astropy-helpers/issues/89; if we don't import this
# module now, it will get cleaned up after `run_setup` is called, but that will
# later cause the TemporaryDirectory class defined in it to stop working when
# used later on by setuptools
try:
import setuptools.py31compat
import setuptools.py31compat # noqa
except ImportError:
pass
......@@ -702,7 +713,7 @@ class _Bootstrapper(object):
if self.offline:
cmd.append('--no-fetch')
elif status == 'U':
raise _AHBoostrapSystemExit(
raise _AHBootstrapSystemExit(
'Error: Submodule {0} contains unresolved merge conflicts. '
'Please complete or abandon any changes in the submodule so that '
'it is in a usable state, then try again.'.format(submodule))
......@@ -763,7 +774,7 @@ def run_cmd(cmd):
msg = 'Command not found: `{0}`'.format(' '.join(cmd))
raise _CommandNotFound(msg, cmd)
else:
raise _AHBoostrapSystemExit(
raise _AHBootstrapSystemExit(
'An unexpected error occurred when running the '
'`{0}` command:\n{1}'.format(' '.join(cmd), str(e)))