Photutils

Latest version: v2.2.0

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

Scan your dependencies

Page 2 of 6

1.13.0

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

General
^^^^^^^

- ``scikit-learn`` has been removed as an optional dependency. [1774]

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

- ``photutils.datasets``

- Added a ``make_model_image`` function for generating simulated images
with model sources. This function has more options
and is significantly faster than the now-deprecated
``make_model_sources_image`` function. [1759, 1790]

- Added a ``make_model_params`` function to make a table of randomly
generated model positions, fluxes, or other parameters for simulated
sources. [1766, 1796]

- ``photutils.detection``

- The ``find_peaks`` function now supports input arrays with units.
[1743]

- The ``Table`` returned from ``find_peaks`` now has an ``id`` column
that contains unique integer IDs for each peak. [1743]

- The ``DAOStarFinder``, ``IRAFStarFinder``, and ``StarFinder``
classes now support input arrays with units. [1746]

- ``photutils.profiles``

- Added an ``unnormalize`` method to ``RadialProfile`` and
``CurveOfGrowth`` to return the profile to the state before any
``normalize`` calls were run. [1732]

- Added ``calc_ee_from_radius`` and ``calc_radius_from_ee`` methods to
``CurveOfGrowth``. [1733]

- ``photutils.psf``

- Added an ``include_localbkg`` keyword to the ``IterativePSFPhotometry``
``make_model_image`` and ``make_residual_image`` methods. [1756]

- Added "x_fit", "xfit", "y_fit", "yfit", "flux_fit", and "fluxfit" as
allowed column names in the ``init_params`` table input to the PSF
photometry objects. [1765]

- Added a ``make_psf_model_image`` function to generate a simulated
image from PSF models. [1785, 1796]

- ``PSFPhotometry`` now has a new ``fit_params`` attribute containing
a table of the fit model parameters and errors. [1789]

- The ``PSFPhotometry`` and ``IterativePSFPhotometry`` ``init_params``
table now allows the user to input columns for model parameters
other than x, y, and flux. The column names must match the parameter
names in the PSF model. They can also be suffixed with either the
"_init" or "_fit" suffix. [1793]

Bug Fixes
^^^^^^^^^

- ``photutils.aperture``

- Fixed an issue in ``ApertureStats`` where in very rare cases the
``covariance`` calculation could take a long time. [1788]

- ``photutils.background``

- No longer warn about NaNs in the data if those NaNs are masked in
``coverage_mask`` passed to ``Background2D``. [1729]

- ``photutils.psf``

- Fixed an issue where ``IterativePSFPhotometry`` would fail if the
input data was a ``Quantity`` array. [1746]

- Fixed the ``IntegratedGaussianPRF`` class ``bounding_box`` limits to
always be symmetric. [1754]

- Fixed an issue where ``IterativePSFPhotometry`` could sometimes
issue a warning when merging tables if ``mode='all'``. [1761]

- Fixed a bug where the first matching column in the ``init_params``
table was not used in ``PSFPhotometry`` and
``IterativePSFPhotometry``. [1765]

- Fixed an issue where ``IterativePSFPhotometry`` could sometimes
raise an error about non-overlapping data. [1778]

- Fixed an issue with unit handling in ``PSFPhotometry`` and
``IterativePSFPhotometry``. [1792]

- Fixed an issue in ``IterativePSFPhotometry`` where the
``fit_results`` attribute was not cleared between repeated calls.
[1793]

- ``photutils.segmentation``

- Fixed an issue in ``SourceCatalog`` where in very rare cases the
``covariance`` calculation could take a long time. [1788]

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

- The ``photutils.test`` function has been removed. Instead use the
``pytest --pyargs photutils`` command. [1725]

- ``photutils.datasets``

- The ``photutils.datasets`` subpackage has been reorganized and
the ``make`` module has been deprecated. Instead of importing
functions from ``photutils.datasets.make``, import functions from
``photutils.datasets``. [1726]

- The ``make_model_sources_image`` function has been deprecated in
favor of the new ``make_model_image`` function. The new function
has more options and is significantly faster. [1759]

- The randomly-generated optional noise in the simulated example images
``make_4gaussians_image`` and ``make_100gaussians_image`` is now
slightly different. The noise sigma is the same, but the pixel
values differ. [1760]

- The ``make_gaussian_prf_sources_image`` function is now
deprecated. Use the ``make_model_psf_image`` function or the new
``make_model_image`` function instead. [1762]

- The ``make_gaussian_sources_table`` function now includes an "id"
column and always returns both ``'flux'`` and ``'amplitude'`` columns.
[1763]

- The ``make_model_sources_table`` function now includes an "id"
column. [1764]

- The ``make_gaussian_sources_table`` function is now deprecated.
Use the ``make_model_sources_table`` function instead. [1764]

- The ``make_test_psf_data`` function is now deprecated. Use the new
``make_model_psf_image`` function instead. [1785]

- ``photutils.detection``

- The ``sky`` keyword in ``DAOStarFinder`` and ``IRAFStarFinder`` is
now deprecated and will be removed in a future version. [1747]

- Sources that have non-finite properties (e.g., centroid, roundness,
sharpness, etc.) are automatically excluded from the output table in
``DAOStarFinder``, ``IRAFStarFinder``, and ``StarFinder``. [1750]

- ``photutils.psf``

- ``PSFPhotometry`` and ``IterativePSFPhotometry`` now raise a
``ValueError`` if the input ``psf_model`` is not two-dimensional
with ``n_inputs=2`` and ``n_outputs=1``. [1741]

- The ``IntegratedGaussianPRF`` class ``bounding_box`` is now a method
instead of an attribute for consistency with Astropy models. The
method has a ``factor`` keyword to scale the bounding box. The
default scale factor is 5.5 times ``sigma``. [1754]

- The ``IterativePSFPhotometry`` ``make_model_image`` and
``make_residual_image`` methods no longer include the local
background by default. This is a backwards-incompatible change. If
the previous behavior is desired, set ``include_localbkg=True``.
[1756]

- ``IterativePSFPhotometry`` will now only issue warnings after
all iterations are completed. [1767]

- The ``IterativePSFPhotometry`` ``psfphot`` attribute has been
removed. Instead, use the ``fit_results`` attribute, which contains
a list of ``PSFPhotometry`` instances for each fit iteration.
[1771]

- The ``group_size`` column has been moved to come immediately after
the ``group_id`` column in the output table from ``PSFPhotometry``
and ``IterativePSFPhotometry``. [1772]

- The ``PSFPhotometry`` ``init_params`` table was moved from the
``fit_results`` dictionary to an attribute. [1773]

- Removed ``local_bkg``, ``psfcenter_indices``, ``fit_residuals``,
``npixfit``, and ``nmodels`` keys from the ``PSFPhotometry``
``fit_results`` dictionary. [1773]

- Removed the deprecated ``BasicPSFPhotometry``,
``IterativelySubtractedPSFPhotometry``, ``DAOPhotPSFPhotometry``,
``DAOGroup``, ``DBSCANGroup``, and ``GroupStarsBase``, and
``NonNormalizable`` classes and the ``prepare_psf_model``,
``get_grouped_psf_model``, and ``subtract_psf`` functions. [1774]

- A ``ValueError`` is now raised if the shape of the ``error`` array
does not match the ``data`` array when calling the PSF-fitting
classes. [1777]

- The ``fit_param_errs`` key was removed from the ``PSFPhotometry``
``fit_results`` dictionary. The fit parameter errors are now stored
in the ``fit_params`` table. [1789]

- The ``cfit`` column in the ``PSFPhotometry`` and
``IterativePSFPhotometry`` result table will now be NaN for sources
whose initial central pixel is masked. [1789]

1.12.0

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

General
^^^^^^^

- The minimum required Python is now 3.10. [1719]

- The minimum required NumPy is now 1.23. [1719]

- The minimum required SciPy is now 1.8. [1719]

- The minimum required scikit-image is now 0.20. [1719]

- The minimum required scikit-learn is now 1.1. [1719]

- The minimum required pytest-astropy is now 0.11. [1719]

- The minimum required sphinx-astropy is now 1.9. [1719]

- NumPy 2.0 is supported.

Bug Fixes
^^^^^^^^^

- ``photutils.background``

- No longer warn about NaNs in the data if those NaNs are masked in
``mask`` passed to ``Background2D``. [1712]

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

- ``photutils.utils``

- The default value for the ``ImageDepth`` ``mask_pad`` keyword is now
set to 0. [1714]

1.11.0

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

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

- ``photutils.psf``

- An ``init_params`` table is now included in the ``PSFPhotometry``
``fit_results`` dictionary. [1681]

- Added an ``include_localbkg`` keyword to the ``PSFPhotometry``
``make_model_image`` and ``make_residual_image`` methods. [1691]

- Significantly reduced the memory usage of PSF photometry when using
a ``GriddedPSFModel`` PSF model. [1679]

- Added a ``mode`` keyword to ``IterativePSFPhotometry`` for
controlling the fitting mode. [1708]

- ``photutils.datasets``

- Improved the performance of ``make_test_psf_data`` when generating
random coordinates with a minimum separation. [1668]

- ``photutils.segmentation``

- The ``SourceFinder`` ``npixels`` keyword can now be a tuple
corresponding to the values used for the source finder and source
deblender, respectively. [1688]

- ``photutils.utils``

- Improved the performance of ``ImageDepth`` when generating
random coordinates with a minimum separation. [1668]

Bug Fixes
^^^^^^^^^

- ``photutils.psf``

- Fixed an issue where PSF models produced by ``make_psf_model`` would
raise an error with ``PSFPhotometry`` if the fit did not converge.
[1672]

- Fixed an issue where ``GriddedPSFModel`` fixed model parameters were
not respected when copying the model or fitting with the PSF
photometry classes. [1679]

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

- ``photutils.aperture``

- ``PixelAperture`` instances now raise an informative error message
when ``positions`` is input as a ``zip`` object containing Astropy
``Quantity`` objects. [1682]

- ``photutils.psf``

- The ``GridddedPSFModel`` string representations now include the
model ``flux``, ``x_0``, and ``y_0`` parameters. [1680]

- The ``PSFPhotometry`` ``make_model_image`` and ``make_residual_image``
methods no longer include the local background by default. This is a
backwards-incompatible change. If the previous behavior is desired,
set ``include_localbkg=True``. [1703]

- The PSF photometry ``finder_results`` attribute is now returned as a
``QTable`` instead of a list of ``QTable``. [1704]

- Deprecated the ``NonNormalizable`` custom warning class in favor of
``AstropyUserWarning``. [1710]

- ``photutils.segmentation``

- The ``SourceCatalog`` ``get_label`` and ``get_labels`` methods now
raise a ``ValueError`` if any of the input labels are invalid. [1694]

1.10.0

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

General
^^^^^^^

- The minimum required Astropy is now 5.1. [1627]

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

- ``photutils.datasets``

- Added a ``border_size`` keyword to ``make_test_psf_data``. [1665]

- Improved the generation of random PSF positions in
``make_test_psf_data``. [1665]

- ``photutils.detection``

- Added a ``min_separation`` keyword to ``DAOStarFinder`` and
``IRAFStarFinder``. [1663]

- ``photutils.morphology``

- Added a ``wcs`` keyword to ``data_properties``. [1648]

- ``photutils.psf``

- The ``GriddedPSFModel`` ``plot_grid`` method now returns a
``matplotlib.figure.Figure`` object. [1653]

- Added the ability for the ``GriddedPSFModel`` ``read`` method to
read FITS files generated by WebbPSF. [1654]

- Added "flux_0" and "flux0" as allowed flux column names in the
``init_params`` table input to the PSF photometry objects. [1656]

- PSF models output from ``prepare_psf_model`` can now be input into
the PSF photometry classes. [1657]

- Added ``make_psf_model`` function for making a PSF model from a
2D Astropy model. Compound models are also supported. [1658]

- The ``GriddedPSFModel`` oversampling can now be different in the x
and y directions. The ``oversampling`` attribute is now stored as
a 1D ``numpy.ndarray`` with two elements. [1664]

- ``photutils.segmentation``

- The ``SegmentationImage`` ``make_source_mask`` method now uses a
much faster implementation of binary dilation. [1638]

- Added a ``scale`` keyword to the ``SegmentationImage.to_patches()``
method to scale the sizes of the polygon patches. [1641, 1646]

- Improved the ``SegmentationImage`` ``imshow`` method to ensure that
labels are plotted with unique colors. [1649]

- Added a ``imshow_map`` method to ``SegmentationImage`` for plotting
segmentation images with a small number of non-consecutive labels.
[1649]

- Added a ``reset_cmap`` method to ``SegmentationImage`` for resetting
the colormap to a new random colormap. [1649]

- ``photutils.utils``

- Improved the generation of random aperture positions in
``ImageDepth``. [1666]

Bug Fixes
^^^^^^^^^

- ``photutils.aperture``

- Fixed an issue where the aperture ``plot`` method ``**kwargs`` were
not reset to the default values when called multiple times. [1655]

- ``photutils.psf``

- Fixed a bug where ``SourceGrouper`` would fail if only one source
was input. [1617]

- Fixed a bug in ``GriddedPSFModel`` ``plot_grid`` where the grid
could be plotted incorrectly if the input ``xygrid`` was not sorted
in y then x order. [1661]

- ``photutils.segmentation``

- Fixed an issue where ``deblend_sources`` and ``SourceFinder`` would
raise an error if the ``contrast`` keyword was set to 1 (meaning no
deblending). [1636]

- Fixed an issue where the vertices of the ``SegmentationImage``
``polygons`` were shifted by 0.5 pixels in both x and y. [1646]

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

- The metadata in output tables now contains a timestamp. [1640]

- The order of the metadata in a table is now preserved when writing to
a file. [1640]

- ``photutils.psf``

- Deprecated the ``prepare_psf_model`` function. Use the new
``make_psf_model`` function instead. [1658]

- The ``GriddedPSFModel`` now stores the ePSF grid such that it is
first sorted by y then by x. As a result, the order of the ``data``
and ``xygrid`` attributes may be different. [1661]

- The ``oversampling`` attribute is now stored as a 1D
``numpy.ndarray`` with two elements. [1664]

- A ``ValueError`` is raised if ``GriddedPSFModel`` is called with x
and y arrays that have more than 2 dimensions. [1662]

- ``photutils.segmentation``

- Removed the deprecated ``kernel`` keyword from ``SourceCatalog``.
[1613]

1.9.0

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

General
^^^^^^^

- The minimum required Python is now 3.9. [1569]

- The minimum required NumPy is now 1.22. [1572]

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

- ``photutils.background``

- Added ``LocalBackground`` class for computing local backgrounds in a
circular annulus aperture. [1556]

- ``photutils.datasets``

- Added new ``make_test_psf_data`` function. [1558, 1582, 1585]

- ``photutils.psf``

- Propagate measurement uncertainties in PSF fitting. [1543]

- Added new ``PSFPhotometry`` and ``IterativePSFPhotometry`` classes
for performing PSF-fitting photometry. [1558, 1559, 1563, 1566,
1567, 1581, 1586, 1590, 1594, 1603, 1604]

- Added a new ``SourceGrouper`` class. [1558, 1605]

- Added a ``GriddedPSFModel`` ``fill_value`` attribute. [1583]

- Added a ``grid_from_epsfs`` function to make a ``GriddedPSFModel``
from ePSFs. [1596]

- Added a ``read`` method to ``GriddedPSFModel`` for reading "STDPSF"
FITS files containing grids of ePSF models. [1557]

- Added a ``plot_grid`` method to ``GriddedPSFModel`` for plotting
ePSF grids. [1557]

- Added a ``STDPSFGrid`` class for reading "STDPSF" FITS files
containing grids of ePSF models and plotting the ePSF grids. [1557]


Bug Fixes
^^^^^^^^^

- ``photutils.aperture``

- Fixed a bug in the validation of ``PixelAperture`` positions. [1553]

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

- ``photutils.psf``

- Deprecated the PSF photometry classes ``BasicPSFPhotometry``,
``IterativelySubtractedPSFPhotometry``, and
``DAOPhotPSFPhotometry``. Use the new ``PSFPhotometry`` or
``IterativePSFPhotometry`` class instead. [1578]

- Deprecated the ``DAOGroup``, ``DBSCANGroup``, and ``GroupStarsBase``
classes. Use the new ``SourceGrouper`` class instead. [1578]

- Deprecated the ``get_grouped_psf_model`` and ``subtract_psf``
function. [1578]

1.8.0

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

General
^^^^^^^

- The minimum required Numpy is now 1.21. [1528]

- The minimum required Scipy is now 1.7.0. [1528]

- The minimum required Matplotlib is now 3.5.0. [1528]

- The minimum required scikit-image is now 0.19.0. [1528]

- The minimum required gwcs is now 0.18. [1528]

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

- ``photutils.profiles``

- The ``RadialProfile`` and ``CurveOfGrowth`` radial bins can now be
directly input, which also allows for non-uniform radial spacing.
[1540]

Bug Fixes
^^^^^^^^^

- ``photutils.psf``

- Fixed an issue with the local model cache in ``GriddedPSFModel``,
significantly improving performance. [1536]

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

- Removed the deprecated ``axes`` keyword in favor of ``ax`` for
consistency with other packages. [1523]

- ``photutils.aperture``

- Removed the ``ApertureStats`` ``unpack_nddata`` method. [1537]

- ``photutils.profiles``

- The API for defining the radial bins for the ``RadialProfile`` and
``CurveOfGrowth`` classes was changed. While the new API allows for
more flexibility, unfortunately, it is not backwards-compatible.
[1540]

- ``photutils.segmentation``

- Removed the deprecated ``kernel`` keyword from ``detect_sources``
and ``deblend_sources``. [1524]

- Deprecated the ``kernel`` keyword in ``SourceCatalog``. [1525]

- Removed the deprecated ``outline_segments`` method from
``SegmentationImage``. [1526]

- The ``SourceCatalog`` ``kron_params`` attribute is no longer
returned as a ``ndarray``. It is returned as a ``tuple``. [1531]

Page 2 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.