Commit 208a10dc authored by Ole Streicher's avatar Ole Streicher

New upstream version 0.7.1

parent 44a9fdb1
0.7.1 (2019-10-09)
------------------
Bug Fixes
^^^^^^^^^
- ``photutils.psf``
- Fix to ``IterativelySubtractedPSFPhotometry`` where the residual
image was not initialized when ``bkg_estimator`` was not supplied.
[#942]
- ``photutils.segmentation``
- Fixed a labeling bug in ``deblend_sources``. [#961]
- Fixed an issue in ``source_properties`` when the input ``data``
is a ``Quantity`` array. [#963]
0.7 (2019-08-14)
----------------
......
Photutils is an `Astropy <http://www.astropy.org/>`_ affiliated
Photutils is an `Astropy <https://www.astropy.org/>`_ affiliated
package and we follow the `Astropy Community Code of Conduct
<http://www.astropy.org/code_of_conduct.html>`_.
<https://www.astropy.org/code_of_conduct.html>`_.
......@@ -19,14 +19,14 @@ 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>`_.
<https://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 other branch), 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>`_.
possible the `Astropy coding guidelines <https://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
......@@ -34,12 +34,12 @@ that you include the following:
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>`_.
tests, see the `Astropy testing guidelines <https://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>`_.
guidelines <https://docs.astropy.org/en/latest/development/docguide.html>`_.
- **Changelog entry**: if you are fixing a bug or adding new
functionality, you should add an entry to the ``CHANGES.rst`` file
......@@ -104,7 +104,7 @@ in the package.
**Code Quality**
* Are the `Astropy coding guidelines <http://docs.astropy.org/en/latest/development/codeguide.html>`_ followed?
* Are the `Astropy coding guidelines <https://docs.astropy.org/en/latest/development/codeguide.html>`_ followed?
* Are there dependencies other than the Astropy core, the Python
Standard Library, and NumPy?
......@@ -115,18 +115,18 @@ in the package.
**Testing**
* Are the `Astropy testing guidelines <http://docs.astropy.org/en/latest/development/testguide.html>`_ followed?
* Are the `Astropy testing guidelines <https://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?
* Are the tests that require an `optional dependency <https://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:
* Are the `Astropy documentation guidelines <https://docs.astropy.org/en/latest/development/docguide.html>`_ followed?
* Is there a `docstring <https://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?
......
Metadata-Version: 2.1
Name: photutils
Version: 0.7
Version: 0.7.1
Summary: An Astropy package for source detection and photometry
Home-page: https://github.com/astropy/photutils
Author: Photutils Developers
......@@ -114,5 +114,5 @@ Provides: photutils
Requires-Python: >=3.5
Description-Content-Type: text/x-rst
Provides-Extra: all
Provides-Extra: docs
Provides-Extra: test
Provides-Extra: docs
# Autogenerated by Astropy-affiliated package astropy_helpers's setup.py on 2019-08-09 21:33:24 UTC
# Autogenerated by Astropy-affiliated package astropy_helpers's setup.py on 2019-09-13 19:50:06 UTC
from __future__ import unicode_literals
import datetime
......@@ -13,7 +13,7 @@ bugfix = 1
version_info = (major, minor, bugfix)
release = True
timestamp = datetime.datetime(2019, 8, 9, 21, 33, 24)
timestamp = datetime.datetime(2019, 9, 13, 19, 50, 6)
debug = False
astropy_helpers_version = ""
This diff is collapsed.
......@@ -39,7 +39,7 @@ biased by the presence of real sources.
A slightly better method involves using statistics that are robust
against the presence of outliers, such as the biweight location for
the background level and biweight scale or `median absolute deviation
(MAD) <http://en.wikipedia.org/wiki/Median_absolute_deviation>`_ for
(MAD) <https://en.wikipedia.org/wiki/Median_absolute_deviation>`__ for
the background noise estimation. However, for most astronomical scenes
these methods will also be biased by the presence of astronomical
sources in the image.
......@@ -139,7 +139,7 @@ Of course, the source detection and masking procedure can be iterated
further. Even with one iteration we are within 0.02% of the true
background and 1.5% of the true background RMS.
.. _scipy: http://www.scipy.org/
.. _scipy: https://www.scipy.org/
2D Background and Noise Estimation
......@@ -183,7 +183,7 @@ The default is a `~photutils.background.SExtractorBackground`
instance. For this method, the background in each mesh is calculated
as ``(2.5 * median) - (1.5 * mean)``. However, if ``(mean - median) /
std > 0.3`` then the ``median`` is used instead (despite what the
`SExtractor <http://www.astromatic.net/software/sextractor>`_ User's
`SExtractor <https://www.astromatic.net/software/sextractor>`_ User's
Manual says, this is the method it always uses).
Likewise, the background RMS level in each mesh is calculated using
......
......@@ -82,8 +82,9 @@ exclude_patterns.append('psf_spec/*')
# be used globally.
import photutils
rst_epilog += """
.. _Photutils: high-level_API.html
rst_epilog = """
.. _Astropy: https://www.astropy.org/
.. _Photutils: index.html
"""
# -- Project information ------------------------------------------------------
......
......@@ -59,4 +59,4 @@ Reference/API
:no-heading:
.. _astropy-data: https://github.com/astropy/astropy-data/
.. _skymaker: http://www.astromatic.net/software/skymaker
.. _skymaker: https://www.astromatic.net/software/skymaker
......@@ -21,23 +21,23 @@ Detecting Stars
Photutils includes two widely-used tools that are used to detect stars
in an image, `DAOFIND`_ and IRAF's `starfind`_.
:class:`~photutils.DAOStarFinder` is a class that provides an
implementation of the `DAOFIND`_ algorithm (`Stetson 1987, PASP 99,
:class:`~photutils.detection.DAOStarFinder` is a class that provides
an implementation of the `DAOFIND`_ algorithm (`Stetson 1987, PASP 99,
191 <http://adsabs.harvard.edu/abs/1987PASP...99..191S>`_). It
searches images for local density maxima that have a peak amplitude
greater than a specified threshold (the threshold is applied to a
convolved image) and have a size and shape similar to a defined 2D
Gaussian kernel. :class:`~photutils.DAOStarFinder` also provides an
estimate of the objects' roundness and sharpness, whose lower and
upper bounds can be specified.
:class:`~photutils.IRAFStarFinder` is a class that implements IRAF's
`starfind`_ algorithm. It is fundamentally similar to
:class:`~photutils.DAOStarFinder`, but
:class:`~photutils.DAOStarFinder` can use an elliptical Gaussian
kernel. One other difference in :class:`~photutils.IRAFStarFinder` is
that it calculates the objects' centroid, roundness, and sharpness
using image moments.
Gaussian kernel. :class:`~photutils.detection.DAOStarFinder` also
provides an estimate of the objects' roundness and sharpness, whose
lower and upper bounds can be specified.
:class:`~photutils.detection.IRAFStarFinder` is a class that
implements IRAF's `starfind`_ algorithm. It is fundamentally similar
to :class:`~photutils.detection.DAOStarFinder`, but
:class:`~photutils.detection.DAOStarFinder` can use an elliptical
Gaussian kernel. One other difference in
:class:`~photutils.detection.IRAFStarFinder` is that it calculates the
objects' centroid, roundness, and sharpness using image moments.
As an example, let's load an image from the bundled datasets and
select a subset of the image. We will estimate the background and
......@@ -52,10 +52,11 @@ background noise using sigma-clipped statistics::
(3668.09661145823, 3649.0, 204.41388592022315)
Now we will subtract the background and use an instance of
:class:`~photutils.DAOStarFinder` to find the stars in the image that
have FWHMs of around 3 pixels and have peaks approximately 5-sigma
above the background. Running this class on the data yields an astropy
`~astropy.table.Table` containing the results of the star finder:
:class:`~photutils.detection.DAOStarFinder` to find the stars in the
image that have FWHMs of around 3 pixels and have peaks approximately
5-sigma above the background. Running this class on the data yields an
astropy `~astropy.table.Table` containing the results of the star
finder:
.. doctest-requires:: scipy
......@@ -120,10 +121,11 @@ Masking Regions
^^^^^^^^^^^^^^^
Regions of the input image can be masked by using the ``mask`` keyword
with the :class:`~photutils.DAOStarFinder` or
:class:`~photutils.IRAFStarFinder` instance. This simple examples
uses :class:`~photutils.DAOStarFinder` and masks two rectangular
regions. No sources will be detected in the masked regions:
with the :class:`~photutils.detection.DAOStarFinder` or
:class:`~photutils.detection.IRAFStarFinder` instance. This simple
examples uses :class:`~photutils.detection.DAOStarFinder` and masks
two rectangular regions. No sources will be detected in the masked
regions:
.. doctest-skip::
......@@ -260,5 +262,5 @@ Reference/API
:no-heading:
.. _DAOFIND: http://stsdas.stsci.edu/cgi-bin/gethelp.cgi?daofind
.. _starfind: http://stsdas.stsci.edu/cgi-bin/gethelp.cgi?starfind
.. _DAOFIND: https://iraf.net/irafhelp.php?val=daofind
.. _starfind: https://iraf.net/irafhelp.php?val=starfind
......@@ -315,7 +315,7 @@ Finally, let's show the constructed ePSF:
The :class:`~photutils.psf.EPSFModel` object is a subclass of
:class:`~photutils.psf.FittableImageModel`, thus it can be used as a
the PSF model for the `PSF-fitting machinery in Photutils
<http://photutils.readthedocs.io/en/latest/psf.html>`_ (i.e.
<https://photutils.readthedocs.io/en/latest/psf.html>`_ (i.e.
`~photutils.psf.BasicPSFPhotometry`,
`~photutils.psf.IterativelySubtractedPSFPhotometry`, or
`~photutils.psf.DAOPhotPSFPhotometry`).
......@@ -5,7 +5,7 @@ Introduction
------------
The `photutils.geometry` package contains low-level geometry functions
used mainly by `~photutils.aperture_photometry`.
used mainly by `~photutils.aperture.aperture_photometry`.
Reference/API
......
......@@ -57,9 +57,9 @@ detected sources are returned as an Astropy `~astropy.table.Table`:
Using the source locations (i.e. the ``xcentroid`` and ``ycentroid``
columns), we now define circular apertures centered at these positions
with a radius of 4 pixels and compute the sum of the pixel values
within the apertures. The :func:`~photutils.aperture_photometry`
function returns an Astropy `~astropy.table.QTable` with the results
of the photometry:
within the apertures. The
:func:`~photutils.aperture.aperture_photometry` function returns an
Astropy `~astropy.table.QTable` with the results of the photometry:
.. doctest-requires:: scipy
......
......@@ -87,7 +87,7 @@ Here we rename ``x_mean`` to ``x_0`` and ``y_mean`` to ``y_0``:
>>> starlist['y_mean'].name = 'y_0'
Now, let's find the stellar groups. We start by creating a
`~photutils.DAOGroup` object. Here we set its ``crit_separation``
`~photutils.psf.DAOGroup` object. Here we set its ``crit_separation``
parameter ``2.5 * fwhm``, where the stellar ``fwhm`` was defined above
when we created the stars as 2D Gaussians. In general one will need
to measure the FWHM of the stellar profiles.
......@@ -99,8 +99,8 @@ to measure the FWHM of the stellar profiles.
>>> fwhm = sigma_psf * gaussian_sigma_to_fwhm
>>> daogroup = DAOGroup(crit_separation=2.5*fwhm)
``daogroup`` is a `~photutils.DAOGroup` instance that can be used as a
calling function that receives as input a table of stars (e.g.
``daogroup`` is a `~photutils.psf.DAOGroup` instance that can be used
as a calling function that receives as input a table of stars (e.g.
``starlist``):
.. doctest-skip::
......@@ -220,7 +220,7 @@ than :class:`~photutils.psf.DAOGroup`.
Here's a simple example using :class:`~photutils.psf.DBSCANGroup` with
``min_samples=1`` and ``metric=euclidean``. With these parameters,
the result is identical to the `~photutils.psf.DAOGroup` algorithm.
Note that `scikit-learn <http://scikit-learn.org/>`_ must be installed
Note that `scikit-learn <https://scikit-learn.org/>`_ must be installed
to use :class:`~photutils.psf.DBSCANGroup`.
.. plot::
......
API Reference
=============
These are the functions and classes available in the top-level
``photutils`` namespace. Other functionality is available by
importing specific sub-packages (e.g. `photutils.utils`).
.. automodapi:: photutils
:no-heading:
......@@ -70,9 +70,9 @@ User Documentation
utils.rst
.. toctree::
:maxdepth: 1
:hidden:
high-level_API.rst
test_function.rst
.. note::
......
......@@ -9,7 +9,7 @@ Photutils has the following strict requirements:
* `Python <https://www.python.org/>`_ 3.5 or later
* `Numpy <https://www.numpy.org/>`_ 1.13 or later
* `Numpy <https://numpy.org/>`_ 1.13 or later
* `Astropy`_ 2.0 or later
......@@ -134,7 +134,7 @@ Testing an installed Photutils
==============================
The easiest way to test your installed version of Photutils is running
correctly is to use the :func:`photutils.test()` function:
correctly is to use the :func:`photutils.test` function:
.. doctest-skip::
......@@ -150,6 +150,6 @@ the `Photutils issue tracker
.. _pip: https://pip.pypa.io/en/latest/
.. _conda: https://conda.pydata.org/docs/
.. _conda: https://conda.io/en/latest/
.. _github: https://github.com/astropy/photutils
.. _Xcode: https://developer.apple.com/xcode/
......@@ -3,6 +3,7 @@ Elliptical Isophote Analysis (`photutils.isophote`)
Introduction
------------
The `~photutils.isophote` package provides tools to fit elliptical
isophotes to a galaxy image. The isophotes in the image are measured
using an iterative method described by `Jedrzejewski (1987; MNRAS 226,
......@@ -189,7 +190,7 @@ position as a function of the semimajor axis length:
We can build an elliptical model image from the
`~photutils.isophote.IsophoteList` object using the
:func:`~photutils.isophote.build_ellipse_model` function ( NOTE: this
function requires `scipy <http://www.scipy.org/>`_):
function requires `scipy <https://www.scipy.org/>`_):
.. doctest-requires:: scipy
......
......@@ -28,12 +28,13 @@ apparent). The convolution of the PSF and pixel response function, when
discretized onto the detector (i.e. a rectilinear CCD grid), is the effective
PSF (ePSF) or Point Response Function (PRF). (This latter terminology is the
definition used by `Spitzer
<http://irsa.ipac.caltech.edu/data/SPITZER/docs/dataanalysistools/tools/mopex/mopexusersguide/89/>`_.
In many cases the PSF/ePSF/PRF distinction is unimportant, and the ePSF/PRF are
simply called the "PSF", but the distinction can be critical when dealing
carefully with undersampled data or detectors with significant intra-pixel
sensitivity variations. For a more detailed description of this formalism, see
`Anderson & King 2000 <http://adsabs.harvard.edu/abs/2000PASP..112.1360A>`_.
<https://irsa.ipac.caltech.edu/data/SPITZER/docs/dataanalysistools/tools/mopex/mopexusersguide/89/>`_.
In many cases the PSF/ePSF/PRF distinction is unimportant, and the
ePSF/PRF are simply called the "PSF", but the distinction can be
critical when dealing carefully with undersampled data or detectors
with significant intra-pixel sensitivity variations. For a more
detailed description of this formalism, see `Anderson & King 2000
<http://adsabs.harvard.edu/abs/2000PASP..112.1360A>`_.
All this said, in colloquial usage "PSF photometry" sometimes refers to the more
general task of model-fitting photometry (with the effects of the PSF either
......@@ -52,12 +53,13 @@ an ePSF.
PSF Photometry
--------------
Photutils provides a modular set of tools to perform PSF photometry for
different science cases. These are implemented as separate classes to do
sub-tasks of PSF photometry. It also provides high-level classes that connect
these pieces together. In particular, it contains an implementation of the
DAOPHOT algorithm (`~photutils.psf.DAOPhotPSFPhotometry`) proposed by
`Stetson in his seminal paper <http://adsabs.harvard.edu/abs/1987PASP...99..191S>`_
Photutils provides a modular set of tools to perform PSF photometry
for different science cases. These are implemented as separate classes
to do sub-tasks of PSF photometry. It also provides high-level classes
that connect these pieces together. In particular, it contains an
implementation of the DAOPHOT algorithm
(`~photutils.psf.DAOPhotPSFPhotometry`) proposed by `Stetson in his
seminal paper <http://adsabs.harvard.edu/abs/1987PASP...99..191S>`_
for crowded-field stellar photometry.
The DAOPHOT algorithm consists in applying the loop FIND, GROUP, NSTAR,
......@@ -683,10 +685,10 @@ References
----------
`Spitzer PSF vs. PRF
<http://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/PRF_vs_PSF.pdf>`_
<https://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/PRF_vs_PSF.pdf>`_
`Kepler PSF calibration
<http://keplerscience.arc.nasa.gov/CalibrationPSF.shtml>`_
<https://keplerscience.arc.nasa.gov/CalibrationPSF.shtml>`_
`The Kepler Pixel Response Function
<http://adsabs.harvard.edu/abs/2010ApJ...713L..97B>`_
......@@ -694,11 +696,11 @@ References
`Stetson, Astronomical Society of the Pacific, Publications, (ISSN 0004-6280),
vol. 99, March 1987, p. 191-222. <http://adsabs.harvard.edu/abs/1987PASP...99..191S>`_
`Anderson & King, Astronomical Society of the Pacific, Publications,
Volume 112, Issue 776, pp. 1360-1382, Nov 2000
<http://adsabs.harvard.edu/abs/2000PASP..112.1360A>`_
Reference/API
-------------
......
......@@ -297,4 +297,4 @@ Reference/API
.. _Gordon et al. 2008: http://adsabs.harvard.edu/abs/2008ApJ...682..336G
.. _Aniano et al. 2011: http://adsabs.harvard.edu/abs/2011PASP..123.1218A
.. _Aniano et al. 2011: http://adsabs.harvard.edu/abs/2011PASP..123.1218A
......@@ -9,7 +9,7 @@ Introduction
Photutils includes a general-use function to detect sources (both
point-like and extended) in an image using a process called `image
segmentation <https://en.wikipedia.org/wiki/Image_segmentation>`_ in
the `computer vision <http://en.wikipedia.org/wiki/Computer_vision>`_
the `computer vision <https://en.wikipedia.org/wiki/Computer_vision>`_
field. After detecting sources using image segmentation, we can then
measure their photometry, centroids, and morphological properties by
using additional tools in Photutils.
......@@ -143,7 +143,7 @@ Source Deblending
In the example above, overlapping sources are detected as single
sources. Separating those sources requires a deblending procedure,
such as a multi-thresholding technique used by `SExtractor
<http://www.astromatic.net/software/sextractor>`_. Photutils provides
<https://www.astromatic.net/software/sextractor>`_. Photutils provides
a :func:`~photutils.segmentation.deblend_sources` function that
deblends sources uses a combination of multi-thresholding and
`watershed segmentation
......@@ -278,11 +278,12 @@ source segments represent the isophotal footprint of each source and
the resulting photometry is effectively isophotal photometry.
:func:`~photutils.segmentation.source_properties` returns a
:class:`~photutils.SourceCatalog` object, which acts in part like a
list of :class:`~photutils.segmentation.SourceProperties` objects, one
for each segmented source (or a specified subset of sources). An
Astropy `~astropy.table.QTable` of source properties can be generated
using the :meth:`~photutils.SourceCatalog.to_table` method. Please
:class:`~photutils.segmentation.SourceCatalog` object, which acts in
part like a list of :class:`~photutils.segmentation.SourceProperties`
objects, one for each segmented source (or a specified subset of
sources). An Astropy `~astropy.table.QTable` of source properties can
be generated using the
:meth:`~photutils.segmentation.SourceCatalog.to_table` method. Please
see :class:`~photutils.segmentation.SourceProperties` for the list of
the many properties that are calculated for each source. More
properties are likely to be added in the future.
......@@ -333,11 +334,11 @@ Now let's measure the properties of the detected sources defined in
the segmentation image using the simplest call to
:func:`~photutils.segmentation.source_properties`. The output
`~astropy.table.QTable` of source properties is generated by the
:class:`~photutils.SourceCatalog`
:meth:`~photutils.SourceCatalog.to_table` method. Each row in the
table represents a source. The columns represent the calculated
source properties. Note that the only a subset of the source
properties are shown below. Please see
:class:`~photutils.segmentation.SourceCatalog`
:meth:`~photutils.segmentation.SourceCatalog.to_table` method. Each
row in the table represents a source. The columns represent the
calculated source properties. Note that the only a subset of the
source properties are shown below. Please see
`~photutils.segmentation.SourceProperties` for the list of the many
properties that are calculated for each source:
......@@ -488,8 +489,8 @@ label numbers in the segmentation image:
75 301.86 239.25 None ... 0.47 -0.05 0.28 0.08
80 43.20 250.01 None ... 0.18 -0.08 0.34 0.11
By default, the :meth:`~photutils.SourceCatalog.to_table` method will
include most scalar-valued properties from
By default, the :meth:`~photutils.segmentation.SourceCatalog.to_table`
method will include most scalar-valued properties from
:class:`~photutils.segmentation.SourceProperties`, but a subset of
properties can also be specified (or excluded) in the
`~astropy.table.QTable` via the ``columns`` or ``exclude_columns``
......@@ -524,10 +525,11 @@ will be returned.
Background Properties
^^^^^^^^^^^^^^^^^^^^^
Like with :func:`~photutils.aperture_photometry`, the ``data`` array
that is input to :func:`~photutils.segmentation.source_properties`
should be background subtracted. If you input the background image
that was subtracted from the data into the ``background`` keyword of
Like with :func:`~photutils.aperture.aperture_photometry`, the
``data`` array that is input to
:func:`~photutils.segmentation.source_properties` should be background
subtracted. If you input the background image that was subtracted
from the data into the ``background`` keyword of
:func:`~photutils.segmentation.source_properties`, the background
properties for each source will also be calculated:
......@@ -645,4 +647,4 @@ Reference/API
:no-heading:
.. _SExtractor: http://www.astromatic.net/software/sextractor
.. _SExtractor: https://www.astromatic.net/software/sextractor
Photutils Test Function
=======================
.. autofunction:: photutils.test
......@@ -79,8 +79,8 @@ def _validate_inputs(data, error):
``data`` and ``error`` are converted to a `~numpy.ndarray`, if
necessary.
Used to parse inputs to `aperture_photometry` and
`PixelAperture.do_photometry`.
Used to parse inputs to `~photutils.aperture.aperture_photometry`
and `~photutils.aperture.PixelAperture.do_photometry`.
"""
data = np.asanyarray(data)
......@@ -103,8 +103,8 @@ def _handle_units(data, error, unit):
``error`` are returned as `~numpy.ndarray`. The returned ``unit``
represents the unit for both ``data`` and ``error``.
Used to parse inputs to `aperture_photometry` and
`PixelAperture.do_photometry`.
Used to parse inputs to `~photutils.aperture.aperture_photometry`
and `~photutils.aperture.PixelAperture.do_photometry`.
"""
if unit is not None:
......@@ -148,8 +148,8 @@ def _prepare_photometry_data(data, error, mask):
Error is converted to variance and masked values are set to zero in
the output data and variance arrays.
Used to parse inputs to `aperture_photometry` and
`PixelAperture.do_photometry`.
Used to parse inputs to `~photutils.aperture.aperture_photometry`
and `~photutils.aperture.PixelAperture.do_photometry`.
Parameters
----------
......
......@@ -290,12 +290,12 @@ class BoundingBox:
Parameters
----------
other : `~photutils.BoundingBox`
other : `BoundingBox`
The `BoundingBox` to join with this one.
Returns
-------
result : `~photutils.BoundingBox`
result : `BoundingBox`
A `BoundingBox` representing the union of the input
`BoundingBox` with this one.
"""
......@@ -318,12 +318,12 @@ class BoundingBox:
Parameters
----------
other : `~photutils.BoundingBox`
other : `BoundingBox`
The `BoundingBox` to intersect with this one.
Returns
-------
result : `~photutils.BoundingBox`
result : `BoundingBox`
A `BoundingBox` representing the intersection of the input
`BoundingBox` with this one.
"""
......
......@@ -63,10 +63,11 @@ class CircularMaskMixin:
Returns
-------
mask : `~photutils.ApertureMask` or list of `~photutils.ApertureMask`
mask : `~photutils.aperture.ApertureMask` or list of `~photutils.aperture.ApertureMask`
A mask for the aperture. If the aperture is scalar then a
single `~photutils.ApertureMask` is returned, otherwise a
list of `~photutils.ApertureMask` is returned.
single `~photutils.aperture.ApertureMask` is returned,
otherwise a list of `~photutils.aperture.ApertureMask` is
returned.
"""
use_exact, subpixels = self._translate_mask_mode(method, subpixels)
......
......@@ -170,9 +170,9 @@ class PixelAperture(Aperture):
"""
The minimal bounding box for the aperture.
If the aperture is scalar then a single `~photutils.BoundingBox`
is returned, otherwise a list of `~photutils.BoundingBox` is
returned.
If the aperture is scalar then a single
`~photutils.aperture.BoundingBox` is returned, otherwise a list
of `~photutils.aperture.BoundingBox` is returned.
"""
positions = np.atleast_2d(self.positions)
......@@ -320,10 +320,11 @@ class PixelAperture(Aperture):
Returns
-------
mask : `~photutils.ApertureMask` or list of `~photutils.ApertureMask`
mask : `~photutils.aperture.ApertureMask` or list of `~photutils.aperture.ApertureMask`
A mask for the aperture. If the aperture is scalar then a
single `~photutils.ApertureMask` is returned, otherwise a
list of `~photutils.ApertureMask` is returned.
single `~photutils.aperture.ApertureMask` is returned,
otherwise a list of `~photutils.aperture.ApertureMask` is
returned.
"""
raise NotImplementedError('Needs to be implemented in a subclass.')
......
......@@ -65,10 +65,11 @@ class EllipticalMaskMixin:
Returns
-------
mask : `~photutils.ApertureMask` or list of `~photutils.ApertureMask`
mask : `~photutils.aperture.ApertureMask` or list of `~photutils.aperture.ApertureMask`
A mask for the aperture. If the aperture is scalar then a
single `~photutils.ApertureMask` is returned, otherwise a
list of `~photutils.ApertureMask` is returned.
single `~photutils.aperture.ApertureMask` is returned,
otherwise a list of `~photutils.aperture.ApertureMask` is
returned.
"""
use_exact, subpixels = self._translate_mask_mode(method, subpixels)
......
......@@ -21,7 +21,7 @@ class ApertureMask:
truncated) array that is the direct output of one of the
low-level `photutils.geometry` functions.
bbox : `photutils.BoundingBox`
bbox : `photutils.aperture.BoundingBox`
The bounding box object defining the aperture minimal bounding
box.
"""
......
......@@ -44,10 +44,10 @@ def aperture_photometry(data, apertures, error=None, mask=None,
the same units. See the Notes section below for more
information about `~astropy.nddata.NDData` input.
apertures : `~photutils.Aperture` or list of `~photutils.Aperture`
apertures : `~photutils.aperture.Aperture` or list of `~photutils.aperture.Aperture`
The aperture(s) to use for the photometry. If ``apertures`` is
a list of `~photutils.Aperture` then they all must have the same
position(s).
a list of `~photutils.aperture.Aperture` then they all must have
the same position(s).
error : array_like or `~astropy.units.Quantity`, optional
The pixel-wise Gaussian 1-sigma errors of the input ``data``.
......
......@@ -66,10 +66,11 @@ class RectangularMaskMixin:
Returns
-------
mask : `~photutils.ApertureMask` or list of `~photutils.ApertureMask`
mask : `~photutils.aperture.ApertureMask` or list of `~photutils.aperture.ApertureMask`
A mask for the aperture. If the aperture is scalar then a
single `~photutils.ApertureMask` is returned, otherwise a
list of `~photutils.ApertureMask` is returned.
single `~photutils.aperture.ApertureMask` is returned,
otherwise a list of `~photutils.aperture.ApertureMask` is
returned.
"""
_, subpixels = self._translate_mask_mode(method, subpixels,
......
......@@ -340,7 +340,7 @@ class SExtractorBackground(BackgroundBase):
Despite what the `SExtractor`_ User's Manual says, this is the
method it *always* uses.
.. _SExtractor: http://www.astromatic.net/software/sextractor
.. _SExtractor: https://www.astromatic.net/software/sextractor
Parameters
----------
......@@ -496,7 +496,7 @@ class MADStdBackgroundRMS(BackgroundRMSBase):
"""
Class to calculate the background RMS in an array as using the
`median absolute deviation (MAD)
<http://en.wikipedia.org/wiki/Median_absolute_deviation>`_.
<https://en.wikipedia.org/wiki/Median_absolute_deviation>`_.
The standard deviation estimator is given by:
......
......@@ -71,7 +71,7 @@ class _StarFinderKernel:
References
----------
.. [1] http://en.wikipedia.org/wiki/Gaussian_function
.. [1] https://en.wikipedia.org/wiki/Gaussian_function
"""
def __init__(self, fwhm, ratio=1.0, theta=0.0, sigma_radius=1.5,
......@@ -225,7 +225,7 @@ class _DAOFindProperties:
calculate the source peak value, flux, and magnitude. The
default is 0.
.. _DAOFIND: http://stsdas.stsci.edu/cgi-bin/gethelp.cgi?daofind
.. _DAOFIND: https://iraf.net/irafhelp.php?val=daofind
"""
def __init__(self, star_cutout, kernel, sky=0.):
......@@ -623,8 +623,8 @@ def _find_stars(data, kernel, threshold_eff, min_separation=None,
A list of `_StarCutout` objects containing the image cutout for
each source.
.. _DAOFIND: http://stsdas.stsci.edu/cgi-bin/gethelp.cgi?daofind
.. _starfind: http://stsdas.stsci.edu/cgi-bin/gethelp.cgi?starfind
.. _DAOFIND: https://iraf.net/irafhelp.php?val=daofind
.. _starfind: https://iraf.net/irafhelp.php?val=starfind
"""
convolved_data = _filter_data(data, kernel.data, mode='constant',
......@@ -856,9 +856,9 @@ class DAOStarFinder(StarFinderBase):
References
----------
.. [1] Stetson, P. 1987; PASP 99, 191 (http://adsabs.harvard.edu/abs/1987PASP...99..191S)
.. [2] http://stsdas.stsci.edu/cgi-bin/gethelp.cgi?daofind
.. [2] https://iraf.net/irafhelp.php?val=daofind
.. _DAOFIND: http://stsdas.stsci.edu/cgi-bin/gethelp.cgi?daofind
.. _DAOFIND: https://iraf.net/irafhelp.php?val=daofind
"""
def __init__(self, threshold, fwhm, ratio=1.0, theta=0.0,
......@@ -1086,9 +1086,9 @@ class IRAFStarFinder(StarFinderBase):
References
----------
.. [1] http://stsdas.stsci.edu/cgi-bin/gethelp.cgi?starfind
.. [1] https://iraf.net/irafhelp.php?val=starfind
.. _starfind: http://stsdas.stsci.edu/cgi-bin/gethelp.cgi?starfind
.. _starfind: https://iraf.net/irafhelp.php?val=starfind