.. doctest-skip-all

****************************
What's New in Photutils 1.4?
****************************

.. contents::
   :local:
   :depth: 2


New ApertureStats class
=======================

A new :class:`~photutils.aperture.ApertureStats` class was added. This
class can be used to compute statistics of unmasked pixel within an
aperture. It can be used to create a catalog of properties, including
local-background subtracted aperture photometry with the "exact",
"center", or "subpixel" method, for sources.

The :class:`~photutils.aperture.ApertureStats` class
can calculate many properties, including statistics
like :attr:`~photutils.aperture.ApertureStats.min`,
:attr:`~photutils.aperture.ApertureStats.max`,
:attr:`~photutils.aperture.ApertureStats.mean`,
:attr:`~photutils.aperture.ApertureStats.median`,
:attr:`~photutils.aperture.ApertureStats.std`,
:attr:`~photutils.aperture.ApertureStats.sum_aper_area`,
and :attr:`~photutils.aperture.ApertureStats.sum`. It
also can be used to calculate morphological properties
like :attr:`~photutils.aperture.ApertureStats.centroid`,
:attr:`~photutils.aperture.ApertureStats.fwhm`,
:attr:`~photutils.aperture.ApertureStats.semimajor_sigma`,
:attr:`~photutils.aperture.ApertureStats.semiminor_sigma`,
:attr:`~photutils.aperture.ApertureStats.orientation`, and
:attr:`~photutils.aperture.ApertureStats.eccentricity`.

The properties can be accessed using `~photutils.aperture.ApertureStats`
attributes or output to an Astropy `~astropy.table.QTable` using the
:meth:`~photutils.aperture.ApertureStats.to_table` method.

Please see :class:`~photutils.aperture.ApertureStats` for the
complete list of properties that can be calculated and the
:ref:`photutils-aperture-stats` documentation for examples.

New clip keyword in BkgZoomInterpolator
=======================================

A ``clip`` keyword was added to the
:class:`~photutils.background.BkgZoomInterpolator` class, which is used
by :class:`~photutils.background.Background2D`.

By default, :class:`~photutils.background.BkgZoomInterpolator` sets
``clip=True`` to prevent the interpolation from producing values outside
the given input range. If backwards-compatiblity is needed with older
Photutils versions, set ``clip=False``.

Segmentation Performance Improvements
=====================================

A ``convolved_data`` keyword was added to the
:class:`~photutils.segmentation.SourceCatalog` class that allows
the convolved image to be directly input instead of using
the ``kernel`` keyword. Convolved data can also be directly
input to the `~photutils.segmentation.detect_sources` and
`~photutils.segmentation.deblend_sources` functions (using the ``data``
parameter) instead of using the ``kernel`` keyword. For performance,
it is strongly recommended that the user first convolve their data, if
desired, and then input the convolved data to each of these segmentation
functions. Doing so improves the overall performance by omitting extra
convolution steps within each function or class.

Significant improvements were also made to the performance of
the :class:`~photutils.segmentation.SegmentationImage` and
`~photutils.segmentation.SourceCatalog` classes in the case of large
data arrays.

Other changes
=============

Please see the :ref:`changelog` for the complete list of changes.
