What’s New in Photutils 1.4?#
New ApertureStats class#
A new 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 ApertureStats class
can calculate many properties, including statistics
like photutils.aperture.ApertureStats.min,
photutils.aperture.ApertureStats.max,
photutils.aperture.ApertureStats.mean,
photutils.aperture.ApertureStats.median,
photutils.aperture.ApertureStats.std,
photutils.aperture.ApertureStats.sum_aper_area,
and photutils.aperture.ApertureStats.sum. It
also can be used to calculate morphological properties
like photutils.aperture.ApertureStats.centroid,
photutils.aperture.ApertureStats.fwhm,
photutils.aperture.ApertureStats.semimajor_sigma,
photutils.aperture.ApertureStats.semiminor_sigma,
photutils.aperture.ApertureStats.orientation, and
photutils.aperture.ApertureStats.eccentricity.
The properties can be accessed using ApertureStats
attributes or output to an Astropy QTable using the
to_table() method.
Please see ApertureStats for the
complete list of properties that can be calculated and the
Aperture Statistics documentation for examples.
New clip keyword in BkgZoomInterpolator#
A clip keyword was added to the
BkgZoomInterpolator class, which is used
by Background2D.
By default, 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
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 detect_sources and
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 SegmentationImage and
SourceCatalog classes in the case of large
data arrays.
Other changes#
Please see the Changelog for the complete list of changes.