Photutils

Latest version: v2.1.0

Safety actively analyzes 706267 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 6

1.0.2

------------------

General
^^^^^^^

- ``photutils.background``

- Improved the performance of ``Background2D`` (e.g., by a factor
of ~4 with 2048x2048 input arrays when using the default interpolator).
[1103, 1108]

Bug Fixes
^^^^^^^^^

- ``photutils.background``

- Fixed a bug with ``Background2D`` where using ``BkgIDWInterpolator``
would give incorrect results. [1104]

- ``photutils.isophote``

- Corrected calculations of upper harmonics and their errors [1089]

- Fixed bug that caused an infinite loop when the sample extracted
from an image has zero length. [1129]

- Fixed a bug where the default ``fixed_parameters`` in
``EllipseSample.update()`` were not defined. [1139]

- ``photutils.psf``

- Fixed a bug where very incorrect PSF-fitting uncertainties could
be returned when the astropy fitter did not return fit
uncertainties. [1143]

- Changed the default ``recentering_func`` in ``EPSFBuilder``, to
avoid convergence issues. [1144]

- ``photutils.segmentation``

- Fixed an issue where negative Kron radius values could be returned,
which would cause an error when calculating Kron fluxes. [1132]

- Fixed an issue where an error was raised with
``SegmentationImage.remove_border_labels()`` with ``relabel=True``
when no segments remain. [1133]

1.0.1

------------------

Bug Fixes
^^^^^^^^^

- ``photutils.psf``

- Fixed checks on ``oversampling`` factors. [1086]

1.0.0

------------------

General
^^^^^^^

- The minimum required python version is 3.6. [952]

- The minimum required astropy version is 4.0. [1081]

- The minimum required numpy version is 1.17. [1079]

- Removed ``astropy-helpers`` and updated the package infrastructure
as described in Astropy APE 17. [915]

New Features
^^^^^^^^^^^^

- ``photutils.aperture``

- Added ``b_in`` as an optional ellipse annulus keyword. [1070]

- Added ``h_in`` as an optional rectangle annulus keyword. [1070]

- ``photutils.background``

- Added ``coverage_mask`` and ``fill_value`` keyword options to
``Background2D``. [1061]

- ``photutils.centroids``

- Added quadratic centroid estimator function
(``centroid_quadratic``). [1067]

- ``photutils.psf``

- Added the ability to use odd oversampling factors in
``EPSFBuilder``. [1076]

- ``photutils.segmentation``

- Added Kron radius, flux, flux error, and aperture to
``SourceProperties``. [1068]

- Added local background to ``SourceProperties``. [1075]

Bug Fixes
^^^^^^^^^

- ``photutils.isophote``

- Fixed a typo in the calculation of the ``b4`` higher-order
harmonic coefficient in ``build_ellipse_model``. [1052]

- Fixed a bug where ``build_ellipse_model`` falls into an infinite
loop when the pixel to fit is outside of the image. [1039]

- Fixed a bug where ``build_ellipse_model`` falls into an infinite
loop under certain image/parameters input combinations. [1056]

- ``photutils.psf``

- Fixed a bug in ``subtract_psf`` caused by using a fill_value of
np.nan with an integer input array. [1062]

- ``photutils.segmentation``

- Fixed a bug where ``source_properties`` would fail with unitless
``gwcs.wcs.WCS`` objects. [1020]

- ``photutils.utils``

- The ``effective_gain`` parameter in ``calc_total_error`` can now
be zero (or contain zero values). [1019]

API Changes
^^^^^^^^^^^

- ``photutils.aperture``

- Aperture pixel positions can no longer be shaped as 2xN. [953]

- Removed the deprecated ``units`` keyword in ``aperture_photometry``
and ``PixelAperture.do_photometry``. [953]

- ``PrimaryHDU``, ``ImageHDU``, and ``HDUList`` can no longer be
input to ``aperture_photometry``. [953]

- Removed the deprecated the Aperture ``mask_area`` method. [953]

- Removed the deprecated Aperture plot keywords ``ax`` and
``indices``. [953]

- ``photutils.background``

- Removed the deprecated ``ax`` keyword in
``Background2D.plot_meshes``. [953]

- ``Background2D`` keyword options can not be input as positional
arguments. [1061]

- ``photutils.centroids``

- ``centroid_1dg``, ``centroid_2dg``, ``gaussian1d_moments``,
``fit_2dgaussian``, and ``GaussianConst2D`` have been moved to a new
``photutils.centroids.gaussian`` module. [1064]

- Deprecated ``fit_2dgaussian`` and ``GaussianConst2D``. [1064]

- ``photutils.datasets``

- Removed the deprecated ``type`` keyword in ``make_noise_image``.
[953]

- Renamed the ``random_state`` keyword (deprecated) to
``seed`` in ``apply_poisson_noise``, ``make_noise_image``,
``make_random_models_table``, and ``make_random_gaussians_table``
functions. [1080]

- ``photutils.detection``

- Removed the deprecated ``snr`` keyword in ``detect_threshold``.
[953]

- ``photutils.psf``

- Added ``flux_residual_sigclip`` as an input parameter, allowing for
custom sigma clipping options in ``EPSFBuilder``. [984]

- Added ``extra_output_cols`` as a parameter to
``BasicPSFPhotometry``, ``IterativelySubtractedPSFPhotometry`` and
``DAOPhotPSFPhotometry``. [745]

- ``photutils.segmentation``

- Removed the deprecated ``SegmentationImage`` methods ``cmap`` and
``relabel``. [953]

- Removed the deprecated ``SourceProperties`` ``values`` and ``coords``
attributes. [953]

- Removed the deprecated ``xmin/ymin`` and ``xmax/ymax`` properties.
[953]

- Removed the deprecated ``snr`` and ``mask_value`` keywords in
``make_source_mask``. [953]

- Renamed the ``random_state`` keyword (deprecated) to ``seed`` in the
``make_cmap`` method. [1080]

- ``photutils.utils``

- Removed the deprecated ``random_cmap``, ``mask_to_mirrored_num``,
``get_version_info``, ``filter_data``, and ``std_blocksum``
functions. [953]

- Removed the deprecated ``wcs_helpers`` functions
``pixel_scale_angle_at_skycoord``, ``assert_angle_or_pixel``,
``assert_angle``, and ``pixel_to_icrs_coords``. [953]

- Deprecated the ``check_random_state`` function. [1080]

- Renamed the ``random_state`` keyword (deprecated) to ``seed`` in the
``make_random_cmap`` function. [1080]

0.7.2

------------------

Bug Fixes
^^^^^^^^^

- ``photutils.isophote``

- Fixed computation of upper harmonics ``a3``, ``b3``, ``a4``, and
``b4`` in the ellipse fitting algorithm. [1008]

- ``photutils.psf``

- Fix to algorithm in ``EPSFBuilder``, causing issues where ePSFs
failed to build. [974]

- Fix to ``IterativelySubtractedPSFPhotometry`` where an error could
be thrown when a ``Finder`` was passed which did not return
``None`` if no sources were found. [986]

- Fix to ``centroid_epsf`` where the wrong oversampling factor was
used along the y axis. [1002]

0.7.1

------------------

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

----------------

General
^^^^^^^

- Any WCS object that supports the `astropy shared interface for WCS
<https://docs.astropy.org/en/stable/wcs/wcsapi.html>`_ is now
supported. [899]

- Added a new ``photutils.__citation__`` and ``photutils.__bibtex__``
attributes which give a citation for photutils in bibtex format. [926]

New Features
^^^^^^^^^^^^

- ``photutils.aperture``

- Added parameter validation for all aperture classes. [846]

- Added ``from_float``, ``as_artist``, ``union`` and
``intersection`` methods to ``BoundingBox`` class. [851]

- Added ``shape`` and ``isscalar`` properties to Aperture objects.
[852]

- Significantly improved the performance (~10-20 times faster) of
aperture photometry, especially when using ``errors`` and
``Quantity`` inputs with many aperture positions. [861]

- ``aperture_photometry`` now supports ``NDData`` with
``StdDevUncertainty`` to input errors. [866]

- The ``mode`` keyword in the ``to_sky`` and ``to_pixel`` aperture
methods was removed to implement the shared WCS interface. All
WCS transforms now include distortions (if present). [899]

- ``photutils.datasets``

- Added ``make_gwcs`` function to create an example ``gwcs.wcs.WCS``
object. [871]

- ``photutils.isophote``

- Significantly improved the performance (~5 times faster) of
ellipse fitting. [826]

- Added the ability to individually fix the ellipse-fitting
parameters. [922]

- ``photutils.psf``

- Added new centroiding function ``centroid_epsf``. [816]

- ``photutils.segmentation``

- Significantly improved the performance of relabeling in
segmentation images (e.g., ``remove_labels``, ``keep_labels``).
[810]

- Added new ``background_area`` attribute to ``SegmentationImage``.
[825]

- Added new ``data_ma`` attribute to ``Segment``. [825]

- Added new ``SegmentationImage`` methods: ``find_index``,
``find_indices``, ``find_areas``, ``check_label``, ``keep_label``,
``remove_label``, and ``reassign_labels``. [825]

- Added ``__repr__`` and ``__str__`` methods to
``SegmentationImage``. [825]

- Added ``slices``, ``indices``, and ``filtered_data_cutout_ma``
attributes to ``SourceProperties``. [858]

- Added ``__repr__`` and ``__str__`` methods to ``SourceProperties``
and ``SourceCatalog``. [858]

- Significantly improved the performance of calculating the
``background_at_centroid`` property in ``SourceCatalog``. [863]

- The default output table columns (source properties) are defined
in a publicly-accessible variable called
``photutils.segmentation.properties.DEFAULT_COLUMNS``. [863]

- Added the ``gini`` source property representing the Gini
coefficient. [864]

- Cached (lazy) properties can now be reset in ``SegmentationImage``
subclasses. [916]

- Significantly improved the performance of ``deblend_sources``. It
is ~40-50% faster for large images (e.g., 4k x 4k) with a few
thousand of sources. [924]

- ``photutils.utils``

- Added ``NoDetectionsWarning`` class. [836]

Bug Fixes
^^^^^^^^^

- ``photutils.aperture``

- Fixed an issue where the ``ApertureMask.cutout`` method would drop
the data units when ``copy=True``. [842]

- Fixed a corner-case issue where aperture photometry would return
NaN for non-finite data values outside the aperture but within the
aperture bounding box. [843]

- Fixed an issue where the ``celestial_center`` column (for sky
apertures) would be a length-1 array containing a ``SkyCoord``
object instead of a length-1 ``SkyCoord`` object. [844]

- ``photutils.isophote``

- Fixed an issue where the linear fitting mode was not working.
[912]

- Fixed the radial gradient computation [934].

- ``photutils.psf``

- Fixed a bug in the ``EPSFStar`` ``register_epsf`` and
``compute_residual_image`` computations. [885]

- A ValueError is raised if ``aperture_radius`` is not input and
cannot be determined from the input ``psf_model``. [903]

- Fixed normalization of ePSF model, now correctly normalizing on
undersampled pixel grid. [817]

- ``photutils.segmentation``

- Fixed an issue where ``deblend_sources`` could fail for sources
with labels that are a power of 2 and greater than 255. [806]

- ``SourceProperties`` and ``source_properties`` will no longer
raise an exception if a source is completely masked. [822]

- Fixed an issue in ``SourceProperties`` and ``source_properties``
where inf values in the data array were not automatically masked.
[822]

- ``error`` and ``background`` arrays are now always masked
identically to the input ``data``. [822]

- Fixed the ``perimeter`` property to take into account the source
mask. [822]

- Fixed the ``background_at_centroid`` source property to use
bilinear interpolation. [822]

- Fixed ``SegmentationImage`` ``outline_segments`` to include
outlines along the image boundaries. [825]

- Fixed ``SegmentationImage.is_consecutive`` to return ``True`` only
if the labels are consecutive and start with label=1. [886]

- Fixed a bug in ``deblend_sources`` where sources could be
deblended too much when ``connectivity=8``. [890]

- Fixed a bug in ``deblend_sources`` where the ``contrast``
parameter had little effect if the original segment contained
three or more sources. [890]

- ``photutils.utils``

- Fixed a bug in ``filter_data`` where units were dropped for data
``Quantity`` objects. [872]

API Changes
^^^^^^^^^^^

- ``photutils.aperture``

- Deprecated inputting aperture pixel positions shaped as 2xN.
[847]

- Renamed the ``celestial_center`` column to ``sky_center`` in the
``aperture_photometry`` output table. [848]

- Aperture objects defined with a single (x, y) position (input as
1D) are now considered scalar objects, which can be checked with
the new ``isscalar`` Aperture property. [852]

- Non-scalar Aperture objects can now be indexed, sliced, and
iterated. [852]

- Scalar Aperture objects now return scalar ``positions`` and
``bounding_boxes`` properties and its ``to_mask`` method returns
an ``ApertureMask`` object instead of a length-1 list containing
an ``ApertureMask``. [852]

- Deprecated the Aperture ``mask_area`` method. [853]

- Aperture ``area`` is now an attribute instead of a method. [854]

- The Aperture plot keyword ``ax`` was deprecated and renamed to
``axes``. [854]

- Deprecated the ``units`` keyword in ``aperture_photometry``
and the ``PixelAperture.do_photometry`` method. [866, 861]

- Deprecated ``PrimaryHDU``, ``ImageHDU``, and ``HDUList`` inputs
to ``aperture_photometry``. [867]

- The ``aperture_photometry`` function moved to a new
``photutils.aperture.photometry`` module. [876]

- Renamed the ``bounding_boxes`` attribute for pixel-based apertures
to ``bbox`` for consistency. [896]

- Deprecated the ``BoundingBox`` ``as_patch`` method (instead use
``as_artist``). [851]

- ``photutils.background``

- The ``Background2D`` ``plot_meshes`` keyword ``ax`` was deprecated
and renamed to ``axes``. [854]

- ``photutils.datasets``

- The ``make_noise_image`` ``type`` keyword was deprecated and
renamed to ``distribution``. [877]

- ``photutils.detection``

- Removed deprecated ``subpixel`` keyword for ``find_peaks``. [835]

- ``DAOStarFinder``, ``IRAFStarFinder``, and ``find_peaks`` now return
``None`` if no source/peaks are found. Also, for this case a
``NoDetectionsWarning`` is issued. [836]

- Renamed the ``snr`` (deprecated) keyword to ``nsigma`` in
``detect_threshold``. [917]

- ``photutils.isophote``

- Isophote central values and intensity gradients are now returned
to the output table. [892]

- The ``EllipseSample`` ``update`` method now needs to know the
fix/fit state of each individual parameter. This can be passed to
it via a ``Geometry`` instance, e.g., ``update(geometry.fix)``.
[922]

- ``photutils.psf``

- ``FittableImageModel`` and subclasses now allow for different
``oversampling`` factors to be specified in the x and y
directions. [834]

- Removed ``pixel_scale`` keyword from ``EPSFStar``, ``EPSFBuilder``,
and ``EPSFModel``. [815]

- Added ``oversampling`` keyword to ``centroid_com``. [816]

- Removed deprecated ``Star``, ``Stars``, and ``LinkedStar``
classes. [894]

- Removed ``recentering_boxsize`` and ``center_accuracy`` keywords
and added ``norm_radius`` and ``shift_value`` keywords in
``EPSFBuilder``. [817]

- Added ``norm_radius`` and ``shift_value`` keywords to
``EPSFModel``. [817]

- ``photutils.segmentation``

- Removed deprecated ``SegmentationImage`` attributes
``data_masked``, ``max``, and ``is_sequential`` and methods
``area`` and ``relabel_sequential``. [825]

- Renamed ``SegmentationImage`` methods ``cmap`` (deprecated) to
``make_cmap`` and ``relabel`` (deprecated) to ``reassign_label``.
The new ``reassign_label`` method gains a ``relabel`` keyword.
[825]

- The ``SegmentationImage`` ``segments`` and ``slices`` attributes
now have the same length as ``labels`` (no ``None`` placeholders).
[825]

- ``detect_sources`` now returns ``None`` if no sources are found.
Also, for this case a ``NoDetectionsWarning`` is issued. [836]

- The ``SegmentationImage`` input ``data`` array must contain at
least one non-zero pixel and must not contain any non-finite values.
[836]

- A ``ValueError`` is raised if an empty list is input into
``SourceCatalog`` or no valid sources are defined in
``source_properties``. [836]

- Deprecated the ``values`` and ``coords`` attributes in
``SourceProperties``. [858]

- Deprecated the unused ``mask_value`` keyword in
``make_source_mask``. [858]

- The ``bbox`` property now returns a ``BoundingBox`` instance.
[863]

- The ``xmin/ymin`` and ``xmax/ymax`` properties have been
deprecated with the replacements having a ``bbox_`` prefix (e.g.,
``bbox_xmin``). [863]

- The ``orientation`` property is now returned as a ``Quantity``
instance in units of degrees. [863]

- Renamed the ``snr`` (deprecated) keyword to ``nsigma`` in
``make_source_mask``. [917]

- ``photutils.utils``

- Renamed ``random_cmap`` to ``make_random_cmap``. [825]

- Removed deprecated ``cutout_footprint`` function. [835]

- Deprecated the ``wcs_helpers`` functions
``pixel_scale_angle_at_skycoord``, ``assert_angle_or_pixel``,
``assert_angle``, and ``pixel_to_icrs_coords``. [846]

- Removed deprecated ``interpolate_masked_data`` function. [895]

- Deprecated the ``mask_to_mirrored_num`` function. [895]

- Deprecated the ``get_version_info``, ``filter_data``, and
``std_blocksum`` functions. [918]

Page 4 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.