- Due to an upstream bug in
bottleneck
withfloat32
arrays,bottleneck
nan-functions are now used internally only forfloat64
arrays. Performance may be impacted for computations involving arrays with dtype other thanfloat64
. Affected functions are used in theaperture
,background
,detection
,profiles
,psf
, andsegmentation
subpackages. This change has no impact ifbottleneck
is not installed. photutils.background
- Fixed a bug in
Background2D
where an error would be raised when using theBkgIDWInterpolator
interpolator when any mesh was excluded, e.g., due to an input mask. [#1940]
- Fixed a bug in
photutils.detection
- Fixed a bug in the star finders (
DAOStarFinder
,IRAFStarFinder
, andStarFinder
) whenexclude_border=True
. Also, fixed an issue withexclude_border=True
where if all sources were in the border region then an error would be raised. [#1943]
- Fixed a bug in the star finders (
photutils.background
- Fixed a bug in
SExtractorBackground
where the dimensionality of the returned value would not be preserved if the output was a single value. [#1934] - Fixed an issue in
Background2D
where if thebox_size
equals the input array shape the input data array could be modified. [#1935]
- Fixed a bug in
- The
regions
package is now an optional dependency. [#1813] - The minimum required Astropy is now 5.3. [#1839]
- SciPy is now a required dependency. [#1880]
- The minimum required SciPy is now 1.10. [#1880]
- The minimum required NumPy is now 1.24. [#1881]
- The minimum required Matplotlib is now 3.7. [#1881]
- The minimum required GWCS is now 0.19. [#1881]
- Importing tools from all subpackages now requires including the
subpackage name. Also, PSF matching tools must now be imported from
photutils.psf.matching
instead ofphotutils.psf
. [#1879, #1904]
photutils.aperture
- The metadata in the tables generated by
aperture_photometry
andApertureStats
now include the aperture name and shape parameters. [#1849] aperture_photometry
andApertureStats
now accept supportedregions.Region
objects, i.e., those corresponding to circular, elliptical, and rectangular apertures. [#1813, #1852]- A new
region_to_aperture
convenience function has been added to convert supportedregions.Region
objects toAperture
objects. [#1813, #1852]
- The metadata in the tables generated by
photutils.background
- The
Background2D
class has been refactored to significantly reduce its memory usage. In some cases, it is also significantly faster. [#1870, #1872, #1873] - A new
npixels_mesh
property was added toBackground2D
that gives a 2D array of the number of pixels used to compute the statistics in the low-resolution grid. [#1870] - A new
npixels_map
property was added toBackground2D
that gives a 2D array of the number of pixels used to compute the statistics in each mesh, resized to the shape of the input data. [#1871]
- The
photutils.centroids
Quantity
arrays can now be input tocentroid_1dg
andcentroid_2dg
. [#1861]
photutils.datasets
- Added a new
params_table_to_models
function to create a list of models from a table of model parameters. [#1896]
- Added a new
photutils.psf
- Added new
xy_bounds
keyword toPSFPhotometry
andIterativePSFPhotometry
to allow one to bound the x and y model parameters during the fitting. [#1805] - The
extract_stars
function can now acceptNDData
inputs with uncertainty types other thanweights
. [#1821] - Added new
GaussianPSF
,CircularGaussianPSF
,GaussianPRF
,CircularGaussianPRF
, andMoffatPSF
PSF model classes. [#1838, #1898, #1918] - Added new
AiryDiskPSF
PSF model class. [#1843, #1918] - Added new
CircularGaussianSigmaPRF
PSF model class. [#1845, #1918] - The
IntegratedGaussianPRF
model now supports units. [#1838] - A new
results
attribute was added toPSFPhotometry
to store the returned table of fit results. [#1858] - Added new
fit_fwhm
convenience function to estimate the FWHM of one or more sources in an image by fitting a circular 2D Gaussian PSF model. [#1859, #1887, #1899, #1918] - Added new
fit_2dgaussian
convenience function to fit a circular 2D Gaussian PSF to one or more sources in an image. [#1859, #1887, #1899] - Added new
ImagePSF
model class to represent a PSF model as an image. [#1890] - The
GriddedPSFModel
model now has abounding_box
method to return the bounding box of the model. [#1891] - The
GriddedPSFModel
class has been refactored to significantly improve its performance. In typical PSF photometry use cases, it is now about 4 times faster than previous versions. [#1903]
- Added new
photutils.segmentation
- Reduced the memory usage and improved the performance of source
deblending with
deblend_sources
andSourceFinder
. [#1924, #1925, #1926] - Improved the accuracy of the progress bar in
deblend_sources
andSourceFinder
when using multiprocessing. Also added the source ID label number to the progress bar. [#1925, 1926]
- Reduced the memory usage and improved the performance of source
deblending with
photutils.aperture
- Fixed a bug checking that the
subpixels
keyword is a strictly positive integer. [#1816]
- Fixed a bug checking that the
photutils.datasets
- Fixed an issue in
make_model_image
where if thebbox_factor
was input and the model bounding box did not have afactor
keyword then an error would be raised. [#1921]
- Fixed an issue in
photutils.detection
- Fixed an issue where
DAOStarFinder
would not return any sources if the inputthreshold
was set to zero due to theflux
being non-finite. [#1882]
- Fixed an issue where
photutils.isophote
- Fixed a bug in
build_ellipse_model
where ifhigh_harmonics=True
, the harmonics were not correctly added to the model. [#1810]
- Fixed a bug in
photutils.psf
- Fixed a bug in
make_psf_model
where if the input model had amplitude units, an error would be raised. [#1894]
- Fixed a bug in
- The
sklearn
version information has been removed from the meta attribute in output tables.sklearn
was removed as an optional dependency in 1.13.0. [#1807] photutils.background
- The
Background2D
background_mesh
andbackground_rms_mesh
properties will have units if the input data has units. [#1870] - The
Background2D
edge_method
keyword is now deprecated. Whenedge_method
is eventually removed, the'pad'
option will always be used. [#1870] - The
Background2D
background_mesh_masked
,background_rms_mesh_masked
, andmesh_nmasked
properties are now deprecated. [#1870] - To reduce memory usage,
Background2D
no longer keeps a cached copy of the returnedbackground
andbackground_rms
properties. [#1870] - The
Background2D
data
,mask
,total_mask
,nboxes
,box_npixels
, andnboxes_tot
attributes have been removed. [#1870] - The
BkgZoomInterpolator
grid_mode
keyword is now deprecated. Whengrid_mode
is eventually removed, the True option will always be used. [#1870] - The
Background2D
background
,background_rms
,background_mesh
, andbackground_rms_mesh
properties now have the samedtype
as the input data. [#1922]
- The
photutils.centroids
- For consistency with other fitting functions (including PSF
fitting), the
centroid_1dg
andcentroid_2dg
functions now fit only a 1D or 2D Gaussian model, respectively, excluding any constant component. The input data are required to be background-subtracted. [#1861] - The fitter used in
centroid_1dg
andcentroid_2dg
was changed fromLevMarLSQFitter
toTRFLSQFitter
.LevMarLSQFitter
uses the legacy SciPy functionscipy.optimize.leastsq
, which is no longer recommended. [#1917]
- For consistency with other fitting functions (including PSF
fitting), the
photutils.datasets
- The deprecated
make
module has been removed. Instead of importing functions fromphotutils.datasets.make
, import functions fromphotutils.datasets
. [#1884] - The deprecated
make_model_sources_image
,make_gaussian_prf_sources_image
,make_gaussian_sources_table
,make_test_psf_data
,make_random_gaussians_table
, andmake_imagehdu
functions have been removed. [#1884]
- The deprecated
photutils.detection
- The deprecated
sky
keyword inDAOStarFinder
andIRAFStarFinder
has been removed. Also, there will no longer be asky
column in the output table. [#1884] - The
DAOStarFinder
flux
andmag
columns were changed to give sensible values. Previously, theflux
value was defined by the original DAOFIND algorithm as a measure of the intensity ratio of the amplitude of the best fitting Gaussian function at the object position to the detection threshold. Adaofind_mag
column was added for comparison to the original IRAF DAOFIND algorithm. [#1885]
- The deprecated
photutils.isophote
- The
build_ellipse_model
function now raises aValueError
if the inputisolist
is empty. [#1809]
- The
photutils.profiles
- The fitter used in
RadialProfile
to fit the profile with a Gaussian was changed fromLevMarLSQFitter
toTRFLSQFitter
.LevMarLSQFitter
uses the legacy SciPy functionscipy.optimize.leastsq
, which is no longer recommended. [#1899]
- The fitter used in
photutils.psf
- The
IntegratedGaussianPRF
class now must be initialized using keyword-only arguments. [#1838] - The
IntegratedGaussianPRF
class has been moved to the newfunctional_models
module. [#1838] - The
models
andgriddedpsfmodel
modules have been renamed toimage_models
andgridded_models
, respectively. [#1838] - The
IntegratedGaussianPRF
model class has been renamed toCircularGaussianPRF
.IntegratedGaussianPRF
is now deprecated. [#1845] - Some PSF tools have moved to new modules. The
PRFAdapter
class and themake_psf_model
andgrid_from_epsfs
functions have been moved to the newmodel_helpers
module. Themake_psf_model_image
function has been moved to the newsimulations
module. It is recommended that all of these tools be imported fromphotutils.psf
without using the submodule name. [#1854, #1901] - The
PSFPhotometry
fit_results
attribute has been renamed tofit_info
.fit_results
is now deprecated. [#1858] - The
PRFAdapter
class has been deprecated. Instead, use aImagePSF
model derived from thediscretize_model
function inastropy.convolution
. [#1865] - The
FittableImageModel
andEPSFModel
classes have been deprecated. Instead, use the newImagePSF
model class. [#1890] - The default fitter for
PSFPhotometry
,IterativePSFPhotometry
, andEPSFFitter
was changed fromLevMarLSQFitter
toTRFLSQFitter
.LevMarLSQFitter
uses the legacy SciPy functionscipy.optimize.leastsq
, which is no longer recommended. [#1899] psf_shape
is now an optional keyword in themake_model_image
andmake_residual_image
methods ofPSFPhotometry
andIterativePSFPhotometry
. The value defaults to using the model bounding box to define the shape and is required only if the PSF model does not have a bounding box attribute. [#1921]
- The
photutils.psf.matching
- PSF matching tools must now be imported from
photutils.psf.matching
instead ofphotutils.psf
. [#1904]
- PSF matching tools must now be imported from
photutils.segmentation
- The
SegmentationImage
relabel_consecutive
,resassign_label(s)
,keep_label(s)
,remove_label(s)
,remove_border_labels
, andremove_masked_labels
methods now keep the original dtype of the segmentation image instead of always changing it toint
(int64
). [#1878, #1923] - The
detect_sources
anddeblend_sources
functions now return aSegmentationImage
instance whose data dtype isnp.int32
instead ofint
(int64
) unless more than (2**32 - 1) labels are needed. [#1878]
- The
scikit-learn
has been removed as an optional dependency. [#1774]
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-deprecatedmake_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]
- Added a
photutils.detection
- The
find_peaks
function now supports input arrays with units. [#1743] - The
Table
returned fromfind_peaks
now has anid
column that contains unique integer IDs for each peak. [#1743] - The
DAOStarFinder
,IRAFStarFinder
, andStarFinder
classes now support input arrays with units. [#1746]
- The
photutils.profiles
- Added an
unnormalize
method toRadialProfile
andCurveOfGrowth
to return the profile to the state before anynormalize
calls were run. [#1732] - Added
calc_ee_from_radius
andcalc_radius_from_ee
methods toCurveOfGrowth
. [#1733]
- Added an
photutils.psf
- Added an
include_localbkg
keyword to theIterativePSFPhotometry
make_model_image
andmake_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 newfit_params
attribute containing a table of the fit model parameters and errors. [#1789]- The
PSFPhotometry
andIterativePSFPhotometry
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]
- Added an
photutils.aperture
- Fixed an issue in
ApertureStats
where in very rare cases thecovariance
calculation could take a long time. [#1788]
- Fixed an issue in
photutils.background
- No longer warn about NaNs in the data if those NaNs are masked in
coverage_mask
passed toBackground2D
. [#1729]
- No longer warn about NaNs in the data if those NaNs are masked in
photutils.psf
- Fixed an issue where
IterativePSFPhotometry
would fail if the input data was aQuantity
array. [#1746] - Fixed the
IntegratedGaussianPRF
classbounding_box
limits to always be symmetric. [#1754] - Fixed an issue where
IterativePSFPhotometry
could sometimes issue a warning when merging tables ifmode='all'
. [#1761] - Fixed a bug where the first matching column in the
init_params
table was not used inPSFPhotometry
andIterativePSFPhotometry
. [#1765] - Fixed an issue where
IterativePSFPhotometry
could sometimes raise an error about non-overlapping data. [#1778] - Fixed an issue with unit handling in
PSFPhotometry
andIterativePSFPhotometry
. [#1792] - Fixed an issue in
IterativePSFPhotometry
where thefit_results
attribute was not cleared between repeated calls. [#1793]
- Fixed an issue where
photutils.segmentation
- Fixed an issue in
SourceCatalog
where in very rare cases thecovariance
calculation could take a long time. [#1788]
- Fixed an issue in
- The
photutils.test
function has been removed. Instead use thepytest --pyargs photutils
command. [#1725] photutils.datasets
- The
photutils.datasets
subpackage has been reorganized and themake
module has been deprecated. Instead of importing functions fromphotutils.datasets.make
, import functions fromphotutils.datasets
. [#1726] - The
make_model_sources_image
function has been deprecated in favor of the newmake_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
andmake_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 themake_model_psf_image
function or the newmake_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 themake_model_sources_table
function instead. [#1764] - The
make_test_psf_data
function is now deprecated. Use the newmake_model_psf_image
function instead. [#1785]
- The
photutils.detection
- The
sky
keyword inDAOStarFinder
andIRAFStarFinder
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
, andStarFinder
. [#1750]
- The
photutils.psf
PSFPhotometry
andIterativePSFPhotometry
now raise aValueError
if the inputpsf_model
is not two-dimensional withn_inputs=2
andn_outputs=1
. [#1741]- The
IntegratedGaussianPRF
classbounding_box
is now a method instead of an attribute for consistency with Astropy models. The method has afactor
keyword to scale the bounding box. The default scale factor is 5.5 timessigma
. [#1754] - The
IterativePSFPhotometry
make_model_image
andmake_residual_image
methods no longer include the local background by default. This is a backwards-incompatible change. If the previous behavior is desired, setinclude_localbkg=True
. [#1756] IterativePSFPhotometry
will now only issue warnings after all iterations are completed. [#1767]- The
IterativePSFPhotometry
psfphot
attribute has been removed. Instead, use thefit_results
attribute, which contains a list ofPSFPhotometry
instances for each fit iteration. [#1771] - The
group_size
column has been moved to come immediately after thegroup_id
column in the output table fromPSFPhotometry
andIterativePSFPhotometry
. [#1772] - The
PSFPhotometry
init_params
table was moved from thefit_results
dictionary to an attribute. [#1773] - Removed
local_bkg
,psfcenter_indices
,fit_residuals
,npixfit
, andnmodels
keys from thePSFPhotometry
fit_results
dictionary. [#1773] - Removed the deprecated
BasicPSFPhotometry
,IterativelySubtractedPSFPhotometry
,DAOPhotPSFPhotometry
,DAOGroup
,DBSCANGroup
, andGroupStarsBase
, andNonNormalizable
classes and theprepare_psf_model
,get_grouped_psf_model
, andsubtract_psf
functions. [#1774] - A
ValueError
is now raised if the shape of theerror
array does not match thedata
array when calling the PSF-fitting classes. [#1777] - The
fit_param_errs
key was removed from thePSFPhotometry
fit_results
dictionary. The fit parameter errors are now stored in thefit_params
table. [#1789] - The
cfit
column in thePSFPhotometry
andIterativePSFPhotometry
result table will now be NaN for sources whose initial central pixel is masked. [#1789]
- 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.
photutils.background
- No longer warn about NaNs in the data if those NaNs are masked in
mask
passed toBackground2D
. [#1712]
- No longer warn about NaNs in the data if those NaNs are masked in
photutils.utils
- The default value for the
ImageDepth
mask_pad
keyword is now set to 0. [#1714]
- The default value for the
photutils.psf
- An
init_params
table is now included in thePSFPhotometry
fit_results
dictionary. [#1681] - Added an
include_localbkg
keyword to thePSFPhotometry
make_model_image
andmake_residual_image
methods. [#1691] - Significantly reduced the memory usage of PSF photometry when using
a
GriddedPSFModel
PSF model. [#1679] - Added a
mode
keyword toIterativePSFPhotometry
for controlling the fitting mode. [#1708]
- An
photutils.datasets
- Improved the performance of
make_test_psf_data
when generating random coordinates with a minimum separation. [#1668]
- Improved the performance of
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]
- The
photutils.utils
- Improved the performance of
ImageDepth
when generating random coordinates with a minimum separation. [#1668]
- Improved the performance of
photutils.psf
- Fixed an issue where PSF models produced by
make_psf_model
would raise an error withPSFPhotometry
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]
- Fixed an issue where PSF models produced by
photutils.aperture
PixelAperture
instances now raise an informative error message whenpositions
is input as azip
object containing AstropyQuantity
objects. [#1682]
photutils.psf
- The
GridddedPSFModel
string representations now include the modelflux
,x_0
, andy_0
parameters. [#1680] - The
PSFPhotometry
make_model_image
andmake_residual_image
methods no longer include the local background by default. This is a backwards-incompatible change. If the previous behavior is desired, setinclude_localbkg=True
. [#1703] - The PSF photometry
finder_results
attribute is now returned as aQTable
instead of a list ofQTable
. [#1704] - Deprecated the
NonNormalizable
custom warning class in favor ofAstropyUserWarning
. [#1710]
- The
photutils.segmentation
- The
SourceCatalog
get_label
andget_labels
methods now raise aValueError
if any of the input labels are invalid. [#1694]
- The
- The minimum required Astropy is now 5.1. [#1627]
photutils.datasets
- Added a
border_size
keyword tomake_test_psf_data
. [#1665] - Improved the generation of random PSF positions in
make_test_psf_data
. [#1665]
- Added a
photutils.detection
- Added a
min_separation
keyword toDAOStarFinder
andIRAFStarFinder
. [#1663]
- Added a
photutils.morphology
- Added a
wcs
keyword todata_properties
. [#1648]
- Added a
photutils.psf
- The
GriddedPSFModel
plot_grid
method now returns amatplotlib.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. Theoversampling
attribute is now stored as a 1Dnumpy.ndarray
with two elements. [#1664]
- The
photutils.segmentation
- The
SegmentationImage
make_source_mask
method now uses a much faster implementation of binary dilation. [#1638] - Added a
scale
keyword to theSegmentationImage.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 toSegmentationImage
for plotting segmentation images with a small number of non-consecutive labels. [#1649] - Added a
reset_cmap
method toSegmentationImage
for resetting the colormap to a new random colormap. [#1649]
- The
photutils.utils
- Improved the generation of random aperture positions in
ImageDepth
. [#1666]
- Improved the generation of random aperture positions in
photutils.aperture
- Fixed an issue where the aperture
plot
method**kwargs
were not reset to the default values when called multiple times. [#1655]
- Fixed an issue where the aperture
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 inputxygrid
was not sorted in y then x order. [#1661]
- Fixed a bug where
photutils.segmentation
- Fixed an issue where
deblend_sources
andSourceFinder
would raise an error if thecontrast
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]
- Fixed an issue where
- 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 newmake_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 thedata
andxygrid
attributes may be different. [#1661] - The
oversampling
attribute is now stored as a 1Dnumpy.ndarray
with two elements. [#1664] - A
ValueError
is raised ifGriddedPSFModel
is called with x and y arrays that have more than 2 dimensions. [#1662]
- Deprecated the
photutils.segmentation
- Removed the deprecated
kernel
keyword fromSourceCatalog
. [#1613]
- Removed the deprecated
- The minimum required Python is now 3.9. [#1569]
- The minimum required NumPy is now 1.22. [#1572]
photutils.background
- Added
LocalBackground
class for computing local backgrounds in a circular annulus aperture. [#1556]
- Added
photutils.datasets
- Added new
make_test_psf_data
function. [#1558, #1582, #1585]
- Added new
photutils.psf
- Propagate measurement uncertainties in PSF fitting. [#1543]
- Added new
PSFPhotometry
andIterativePSFPhotometry
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 aGriddedPSFModel
from ePSFs. [#1596] - Added a
read
method toGriddedPSFModel
for reading "STDPSF" FITS files containing grids of ePSF models. [#1557] - Added a
plot_grid
method toGriddedPSFModel
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]
photutils.aperture
- Fixed a bug in the validation of
PixelAperture
positions. [#1553]
- Fixed a bug in the validation of
photutils.psf
- Deprecated the PSF photometry classes
BasicPSFPhotometry
,IterativelySubtractedPSFPhotometry
, andDAOPhotPSFPhotometry
. Use the newPSFPhotometry
orIterativePSFPhotometry
class instead. [#1578] - Deprecated the
DAOGroup
,DBSCANGroup
, andGroupStarsBase
classes. Use the newSourceGrouper
class instead. [#1578] - Deprecated the
get_grouped_psf_model
andsubtract_psf
function. [#1578]
- Deprecated the PSF photometry classes
- 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]
photutils.profiles
- The
RadialProfile
andCurveOfGrowth
radial bins can now be directly input, which also allows for non-uniform radial spacing. [#1540]
- The
photutils.psf
- Fixed an issue with the local model cache in
GriddedPSFModel
, significantly improving performance. [#1536]
- Fixed an issue with the local model cache in
- Removed the deprecated
axes
keyword in favor ofax
for consistency with other packages. [#1523] photutils.aperture
- Removed the
ApertureStats
unpack_nddata
method. [#1537]
- Removed the
photutils.profiles
- The API for defining the radial bins for the
RadialProfile
andCurveOfGrowth
classes was changed. While the new API allows for more flexibility, unfortunately, it is not backwards-compatible. [#1540]
- The API for defining the radial bins for the
photutils.segmentation
- Removed the deprecated
kernel
keyword fromdetect_sources
anddeblend_sources
. [#1524] - Deprecated the
kernel
keyword inSourceCatalog
. [#1525] - Removed the deprecated
outline_segments
method fromSegmentationImage
. [#1526] - The
SourceCatalog
kron_params
attribute is no longer returned as andarray
. It is returned as atuple
. [#1531]
- Removed the deprecated
- The
rasterio
andshapely
packages are now optional dependencies. [#1509]
photutils.aperture
- Significantly improved the performance of
aperture_photometry
and thePixelAperture
do_photometry
method for large arrays. [#1485] - Significantly improved the performance of the
PixelAperture
area_overlap
method, especially for large arrays. [#1490]
- Significantly improved the performance of
photutils.profiles
- Added a new
profiles
subpackage containingRadialProfile
andCurveOfGrowth
classes. [#1494, #1496, #1498, #1499]
- Added a new
photutils.psf
- Significantly improved the performance of evaluating and fitting
GriddedPSFModel
instances. [#1503]
- Significantly improved the performance of evaluating and fitting
photutils.segmentation
- Added a
size
keyword to theSegmentationImage
make_source_mask
method. [#1506] - Significantly improved the performance of
SegmentationImage
make_source_mask
when using square footprints for source dilation. [#1506] - Added the
polygons
property andto_patches
andplot_patches
methods toSegmentationImage
. [#1509] - Added
polygon
keyword to theSegment
class. [#1509]
- Added a
photutils.centroids
- Fixed an issue where
centroid_quadratic
would sometimes fail if the input data contained NaNs. [#1495]
- Fixed an issue where
photutils.detection
- Fixed an issue with the starfinders (
DAOStarFinder
,IRAFStarFinder
, andStarFinder
) where an exception was raised ifexclude_border=True
and there were no detections. [#1512].
- Fixed an issue with the starfinders (
photutils.isophote
- Fixed a bug where the upper harmonics (a3, a4, b3, and b4) had the incorrect sign. [#1501]
- Fixed a bug in the calculation of the upper harmonic errors (a3_err, a4_err, b3_err, and b4_err). [#1501].
photutils.psf
- Fixed an issue where the PSF-photometry progress bar was not shown. [#1517]
- Fixed an issue where all PSF uncertainties were excluded if the last star group had no covariance matrix. [#1519]
photutils.utils
- Fixed a bug in the calculation of
ImageCutout
xyorigin
when using the'partial'
mode when the cutout extended beyond the right or top edge. [#1508]
- Fixed a bug in the calculation of
photutils.aperture
- The
ApertureStats
local_bkg
keyword can now be broadcast for apertures with multiple positions. [#1504]
- The
photutils.centroids
- The
centroid_sources
function will now raise an error if the cutout mask contains allTrue
values. [#1516]
- The
photutils.datasets
- Removed the deprecated
load_fermi_image
function. [#1479]
- Removed the deprecated
photutils.psf
- Removed the deprecated
sandbox
classesDiscretePRF
andReproject
. [#1479]
- Removed the deprecated
photutils.segmentation
- Removed the deprecated
make_source_mask
function in favor of theSegmentationImage.make_source_mask
method. [#1479] - The
SegmentationImage
imshow
method now uses "nearest" interpolation instead of "none" to avoid rendering issues with some backends. [#1507] - The
repr()
notebook output for theSegment
class now includes a SVG polygon representation of the segment if therasterio
andshapely
packages are installed. [#1509] - Deprecated the
SegmentationImage
outline_segments
method. Use theplot_patches
method instead. [#1509]
- Removed the deprecated
- Following NEP 29, the minimum required Numpy is now 1.20. [#1442]
- The minimum required Matplotlib is now 3.3.0. [#1442]
- The minimum required scikit-image is now 0.18.0. [#1442]
- The minimum required scikit-learn is now 1.0. [#1442]
photutils.aperture
- The
ApertureStats
class now accepts astropyNDData
objects as input. [#1409] - Improved the performance of aperture photometry by 10-25% (depending on the number of aperture positions). [#1438]
- The
photutils.psf
- Added a progress bar for fitting PSF photometry [#1426]
- Added a
subshape
keyword to the PSF-fitting classes to define the shape over which the PSF is subtracted. [#1477]
photutils.segmentation
- Added the ability to slice
SegmentationImage
objects. [#1413] - Added
mode
andfill_value
keywords toSourceCatalog
make_cutouts
method. [#1420] - Added
segment_area
source property andwcs
,localbkg_width
,apermask_method
, andkron_params
attributes toSourceCatalog
. [#1425] - Added the ability to use
Quantity
arrays withdetect_threshold
,detect_sources
,deblend_sources
, andSourceFinder
. [#1436] - The progress bar used when deblending sources now is prepended with "Deblending". [#1439]
- Added "windowed" centroids to
SourceCatalog
. [#1447, #1468] - Added quadratic centroids to
SourceCatalog
. [#1467, #1469] - Added a
progress_bar
option toSourceCatalog
for displaying progress bars when calculating some source properties. [#1471]
- Added the ability to slice
photutils.utils
- Added
xyorigin
attribute toCutoutImage
. [#1419] - Added
ImageDepth
class. [#1434]
- Added
photutils.aperture
- Fixed a bug in the
PixelAperture
area_overlap
method so that the returned value does not inherit the data units. [#1408] - Fixed an issue in
ApertureStats
get_ids
for the case when the ID numbers are not sorted (due to slicing). [#1423]
- Fixed a bug in the
photutils.datasets
- Fixed a bug in the various
load
functions where FITS files were not closed. [#1455]
- Fixed a bug in the various
photutils.segmentation
- Fixed an issue in the
SourceCatalog
kron_photometry
,make_kron_apertures
, andplot_kron_apertures
methods where the input minimum Kron and circular radii would not be applied. Instead the instance-level minima would always be used. [#1421] - Fixed an issue where the
SourceCatalog
plot_kron_apertures
method would raise an error for a scalarSourceCatalog
. [#1421] - Fixed an issue in
SourceCatalog
get_labels
for the case when the labels are not sorted (due to slicing). [#1423]
- Fixed an issue in the
- Deprecated
axes
keyword in favor ofax
for consistency with other packages. [#1432] - Importing tools from all subpackages now requires including the subpackage name.
photutils.aperture
- Inputting
PixelAperture
positions as an AstropyQuantity
in pixel units is no longer allowed. [#1398] - Inputting
SkyAperture
shape parameters as an AstropyQuantity
in pixel units is no longer allowed. [#1398] - Removed the deprecated
BoundingBox
as_patch
method. [#1462]
- Inputting
photutils.centroids
- Removed the deprecated
oversampling
keyword incentroid_com
. [#1398]
- Removed the deprecated
photutils.datasets
- Deprecated the
load_fermi_image
function. [#1455]
- Deprecated the
photutils.psf
- Removed the deprecated
flux_residual_sigclip
keyword inEPSFBuilder
. Usesigma_clip
instead. [#1398] - PSF photometry classes will no longer emit a RuntimeWarning if the fitted parameter variance is negative. [#1458]
- Removed the deprecated
photutils.segmentation
- Removed the deprecated
sigclip_sigma
andsigclip_iters
keywords indetect_threshold
. Use thesigma_clip
keyword instead. [#1398] - Removed the
mask_value
,sigclip_sigma
, andsigclip_iters
keywords indetect_threshold
. Use themask
orsigma_clip
keywords instead. [#1398] - Removed the deprecated the
filter_fwhm
andfilter_size
keywords inmake_source_mask
. Use thekernel
keyword instead. [#1398] - If
detection_cat
is input toSourceCatalog
, then the detection catalog source centroids and morphological/shape properties will be returned instead of calculating them from the input data. Also, ifdetection_cat
is input, then the inputwcs
,apermask_method
, andkron_params
keywords will be ignored. [#1425]
- Removed the deprecated
- Added
tqdm
as an optional dependency. [#1364]
photutils.psf
- Added a
mask
keyword when calling the PSF-fitting classes. [#1350, #1351] - The
EPSFBuilder
progress bar will usetqdm
if the optional package is installed. [#1367]
- Added a
photutils.segmentation
- Added
SourceFinder
class, which is a convenience class combiningdetect_sources
anddeblend_sources
. [#1344] - Added a
sigma_clip
keyword todetect_threshold
. [#1354] - Added a
make_source_mask
method toSegmentationImage
. [#1355] - Added a
make_2dgaussian_kernel
convenience function. [#1356] - Allow
SegmentationImage.make_cmap
background_color
to be in any matplotlib color format. [#1361] - Added an
imshow
convenience method toSegmentationImage
. [#1362] - Improved performance of
deblend_sources
. [#1364] - Added a
progress_bar
keyword todeblend_sources
. [#1364] - Added a
'sinh'
mode todeblend_sources
. [#1368] - Improved the resetting of cached
SegmentationImage
properties so that custom (non-cached) attributes can be kept. [#1368] - Added a
nproc
keyword to enable multiprocessing indeblend_sources
andSourceFinder
. [#1372] - Added a
make_cutouts
method toSourceCatalog
for making custom-shaped cutout images. [#1376] - Added the ability to set a minimum unscaled Kron radius in
SourceCatalog
. [#1381]
- Added
photutils.utils
- Added a
circular_footprint
convenience function. [#1355] - Added a
CutoutImage
class. [#1376]
- Added a
photutils.psf
- Fixed a warning message in
EPSFFitter
. [#1382]
- Fixed a warning message in
photutils.segmentation
- Fixed an issue in generating watershed markers used for source deblending. [#1383]
photutils.centroids
- Changed the axes order of
oversampling
keyword incentroid_com
when input as a tuple. [#1358] - Deprecated the
oversampling
keyword incentroid_com
. [#1377]
- Changed the axes order of
photutils.psf
- Invalid data values (i.e., NaN or inf) are now automatically masked when performing PSF fitting. [#1350]
- Deprecated the
sandbox
classesDiscretePRF
andReproject
. [#1357] - Changed the axes order of
oversampling
keywords when input as a tuple. [#1358] - Removed the unused
shift_val
keyword inEPSFBuilder
andEPSFModel
. [#1377] - Renamed the
flux_residual_sigclip
keyword (now deprecated) tosigma_clip
inEPSFBuilder
. [#1378] - The
EPSFBuilder
progress bar now requires that the optionaltqdm
package be installed. [#1379] - The tools in the PSF package now require keyword-only arguments. [#1386]
photutils.segmentation
- Removed the deprecated
circular_aperture
method fromSourceCatalog
. [#1329] - The
SourceCatalog
plot_kron_apertures
method now sets a defaultkron_apers
value. [#1346] deblend_sources
no longer allows an array to be input as a segmentation image. It must be aSegmentationImage
object. [#1347]SegmentationImage
no longer allows array-like input. It must be a numpyndarray
. [#1347]- Deprecated the
sigclip_sigma
andsigclip_iters
keywords indetect_threshold
. Use thesigma_clip
keyword instead. [#1354] - Deprecated the
make_source_mask
function in favor of theSegmentationImage.make_source_mask
method. [#1355] - Deprecated the
kernel
keyword indetect_sources
anddeblend_sources
. Instead, if filtering is desired, input a convolved image directly into thedata
parameter. [#1365] - Sources with a data minimum of zero are now treated the same as negative minima (i.e., the mode is changed to "linear") for the "exponential" deblending mode. [#1368]
- A single warning (as opposed to 1 per source) is now raised about negative/zero minimum data values using the 'exponential' deblending mode. The affected labels is available in a new "info" attribute. [#1368]
- If the mode in
deblend_sources
is "exponential" or "sinh" and there are too many potential deblended sources within a given source (watershed markers), a warning will be raised and the mode will be changed to "linear". [#1369] - The
SourceCatalog
make_circular_apertures
andmake_kron_apertures
methods now return a single aperture (instead of a list with one item) for a scalarSourceCatalog
. [#1376] - The
SourceCatalog
kron_params
keyword now has an optional third item representing the minimum circular radius. [#1381] - The
SourceCatalog
kron_radius
is now set to the minimum Kron radius (the second element ofkron_params
) if the data or radially weighted data sum to zero. [#1381]
- Removed the deprecated
photutils.utils
- The colormap returned from
make_random_cmap
now has colors in RGBA format. [#1361]
- The colormap returned from
- The minimum required Python is now 3.8. [#1279]
- The minimum required Numpy is now 1.18. [#1279]
- The minimum required Astropy is now 5.0. [#1279]
- The minimum required Matplotlib is now 3.1. [#1279]
- The minimum required scikit-image is now 0.15.0 [#1279]
- The minimum required gwcs is now 0.16.0 [#1279]
photutils.aperture
- Added a
copy
method toAperture
objects. [#1304] - Added the ability to compare
Aperture
objects for equality. [#1304] - The
theta
keyword forEllipticalAperture
,EllipticalAnnulus
,RectangularAperture
, andRectangularEllipse
can now be an AstropyAngle
orQuantity
in angular units. [#1308] - Added an
ApertureStats
class for computing statistics of unmasked pixels within an aperture. [#1309, #1314, #1315, #1318] - Added a
dtype
keyword to theApertureMask
to_image
method. [#1320]
- Added a
photutils.background
- Added an
alpha
keyword to theBackground2D.plot_meshes
method. [#1286] - Added a
clip
keyword to theBkgZoomInterpolator
class. [#1324]
- Added an
photutils.segmentation
- Added
SegmentationImage
cmap
attribute containing a default colormap. [#1319] - Improved the performance of
SegmentationImage
andSourceCatalog
, especially for large data arrays. [#1320] - Added a
convolved_data
keyword toSourceCatalog
. This is recommended instead of using thekernel
keyword. [#1321]
- Added
photutils.aperture
- Fixed a bug in
aperture_photometry
where an error was not raised if the data and error arrays have different units. [#1285].
- Fixed a bug in
photutils.background
- Fixed a bug in
Background2D
where using thepad
edge method would result in incorrect image padding if only one of the axes needed padding. [#1292]
- Fixed a bug in
photutils.centroids
- Fixed a bug in
centroid_sources
where settingerror
,xpeak
, orypeak
toNone
would result in an error. [#1297] - Fixed a bug in
centroid_quadratic
where inputting a mask would alter the input data array. [#1317]
- Fixed a bug in
photutils.segmentation
- Fixed a bug in
SourceCatalog
where aUFuncTypeError
would be raised if the inputdata
had an integerdtype
[#1312].
- Fixed a bug in
photutils.aperture
- A
ValueError
is now raised if non-positive sizes are input to sky-based apertures. [#1295] - The
BoundingBox.plot()
method now returns amatplotlib.patches.Patch
object. [#1305] - Inputting
PixelAperture
positions as an AstropyQuantity
in pixel units is deprecated. [#1310] - Inputting
SkyAperture
shape parameters as an AstropyQuantity
in pixel units is deprecated. [#1310]
- A
photutils.background
- Removed the deprecated
background_mesh_ma
andbackground_rms_mesh_ma
Background2D
properties. [#1280] - By default,
BkgZoomInterpolator
usesclip=True
to prevent the interpolation from producing values outside the given input range. If backwards-compatibility is needed with older Photutils versions, setclip=False
. [#1324]
- Removed the deprecated
photutils.centroids
- Removed the deprecated
centroid_epsf
andgaussian1d_moments
functions. [#1280] - Importing tools from the centroids subpackage now requires including the subpackage name. [#1280]
- Removed the deprecated
photutils.morphology
- Importing tools from the morphology subpackage now requires including the subpackage name. [#1280]
photutils.segmentation
- Removed the deprecated
source_properties
function and theSourceProperties
andLegacySourceCatalog
classes. [#1280] - Removed the deprecated the
filter_kernel
keyword in thedetect_sources
,deblend_sources
, andmake_source_mask
functions. [#1280] - A
TypeError
is raised if the input array toSegmentationImage
does not have integer type. [#1319] - A
SegmentationImage
may contain an array of all zeros. [#1319] - Deprecated the
mask_value
keyword indetect_threshold
. Use themask
keyword instead. [#1322] - Deprecated the
filter_fwhm
andfilter_size
keywords inmake_source_mask
. Use thekernel
keyword instead. [#1322]
- Removed the deprecated
- The metadata in output tables now contains version information for all dependencies. [#1274]
photutils.centroids
- Extra keyword arguments can be input to
centroid_sources
that are then passed on to thecentroid_func
if supported. [#1276, #1278]
- Extra keyword arguments can be input to
photutils.segmentation
- Added
copy
method toSourceCatalog
. [#1264] - Added
kron_photometry
method toSourceCatalog
. [#1264] - Added
add_extra_property
,remove_extra_property
,remove_extra_properties
, andrename_extra_property
methods andextra_properties
attribute toSourceCatalog
. [#1264, #1268] - Added
name
andoverwrite
keywords toSourceCatalog
circular_photometry
andfluxfrac_radius
methods. [#1264] SourceCatalog
fluxfrac_radius
was improved for cases where the source flux doesn't monotonically increase with increasing radius. [#1264]- Added
meta
andproperties
attributes toSourceCatalog
. [#1268] - The
SourceCatalog
output table (usingto_table
)meta
dictionary now includes a field for the date/time. [#1268] - Added
SourceCatalog
make_kron_apertures
method. [#1268] - Added
SourceCatalog
plot_circular_apertures
andplot_kron_apertures
methods. [#1268]
- Added
photutils.segmentation
- If
detection_catalog
is input toSourceCatalog
then the detection centroids are used to calculate thecircular_aperture
,circular_photometry
, andfluxfrac_radius
. [#1264] - Units are applied to
SourceCatalog
circular_photometry
output if the input data has units. [#1264] SourceCatalog
circular_photometry
returns scalar values if catalog is scalar. [#1264]SourceCatalog
fluxfrac_radius
returns aQuantity
with pixel units. [#1264]- Fixed a bug where the
SourceCatalog
detection_catalog
was not indexed/sliced whenSourceCatalog
was indexed/sliced. [#1268] SourceCatalog
circular_photometry
now returns NaN for completely-masked sources. [#1268]SourceCatalog
kron_flux
is always NaN for sources wherekron_radius
is NaN. [#1268]SourceCatalog
fluxfrac_radius
now returns NaN ifkron_flux
is zero. [#1268]
- If
photutils.centroids
- A
ValueError
is now raised incentroid_sources
if the inputxpos
orypos
is outside of the inputdata
. [#1276] - A
ValueError
is now raised incentroid_quadratic
if the inputxpeak
orypeak
is outside of the inputdata
. [#1276] - NaNs are now returned from
centroid_sources
where the centroid failed. This is usually due to abox_size
that is too small when using a fitting-based centroid function. [#1276]
- A
photutils.segmentation
- Renamed the
SourceCatalog
circular_aperture
method tomake_circular_apertures
. The old name is deprecated. [#1268] - The
SourceCatalog
kron_params
keyword must have a minimum circular radius that is greater than zero. The default value is now 1.0. [#1268] detect_sources
now usesastropy.convolution.convolve
, which allows for masking pixels. [#1269]
- Renamed the
- The minimum required scipy version is 1.6.0 [#1239]
photutils.aperture
- Added a
mask
keyword to thearea_overlap
method. [#1241]
- Added a
photutils.background
- Improved the performance of
Background2D
by up to 10-50% when the optionalbottleneck
package is installed. [#1232] - Added a
masked
keyword to the background classesMeanBackground
,MedianBackground
,ModeEstimatorBackground
,MMMBackground
,SExtractorBackground
,BiweightLocationBackground
,StdBackgroundRMS
,MADStdBackgroundRMS
, andBiweightScaleBackgroundRMS
. [#1232] - Enable all background classes to work with
Quantity
inputs. [#1233] - Added a
markersize
keyword to theBackground2D
methodplot_meshes
. [#1234] - Added
__repr__
methods to all background classes. [#1236] - Added a
grid_mode
keyword toBkgZoomInterpolator
. [#1239]
- Improved the performance of
photutils.detection
- Added a
xycoords
keyword toDAOStarFinder
andIRAFStarFinder
. [#1248]
- Added a
photutils.psf
- Enabled the reuse of an output table from
BasicPSFPhotometry
and its subclasses as an initial guess for another photometry run. [#1251] - Added the ability to skip the
group_maker
step by inputing an initial guess table with agroup_id
column. [#1251]
- Enabled the reuse of an output table from
photutils.aperture
- Fixed a bug when converting between pixel and sky apertures with a
gwcs
object. [#1221]
- Fixed a bug when converting between pixel and sky apertures with a
photutils.background
- Fixed an issue where
Background2D
could fail when using the'pad'
edge method. [#1227]
- Fixed an issue where
photutils.detection
- Fixed the
DAOStarFinder
import deprecation message. [#1195]
- Fixed the
photutils.morphology
- Fixed an issue in
data_properties
where a scalar background input would raise an error. [#1198]
- Fixed an issue in
photutils.psf
- Fixed an issue in
prepare_psf_model
whenxname
oryname
wasNone
where the model offsets were applied in the wrong direction, resulting in the initial photometry guesses not being improved by the fit. [#1199]
- Fixed an issue in
photutils.segmentation
- Fixed an issue in
SourceCatalog
where the user-inputmask
was ignored whenapermask_method='correct'
for Kron-related calculations. [#1210] - Fixed an issue in
SourceCatalog
where thesegment
array could incorrectly have units. [#1220]
- Fixed an issue in
photutils.utils
- Fixed an issue in
ShepardIDWInterpolator
to allow its initialization with scalar data values and coordinate arrays having more than one dimension. [#1226]
- Fixed an issue in
photutils.aperture
- The
ApertureMask.get_values()
function now returns an empty array if there is no overlap with the data. [#1212] - Removed the deprecated
BoundingBox.slices
andPixelAperture.bounding_boxes
attributes. [#1215]
- The
photutils.background
- Invalid data values (i.e., NaN or inf) are now automatically masked
in
Background2D
. [#1232] - The background classes
MeanBackground
,MedianBackground
,ModeEstimatorBackground
,MMMBackground
,SExtractorBackground
,BiweightLocationBackground
,StdBackgroundRMS
,MADStdBackgroundRMS
, andBiweightScaleBackgroundRMS
now return by default anumpy.ndarray
withnp.nan
values representing masked pixels instead of a masked array. A masked array can be returned by settingmasked=True
. [#1232] - Deprecated the
Background2D
attributesbackground_mesh_ma
andbackground_rms_mesh_ma
. They have been renamed tobackground_mesh_masked
andbackground_rms_mesh_masked
. [#1232] - By default,
BkgZoomInterpolator
now usesgrid_mode=True
. For zooming 2D images, this keyword should be set to True, which makes the interpolator's behavior consistent withscipy.ndimage.map_coordinates
,skimage.transform.resize
, andOpenCV (cv2.resize)
. If backwards-compatibility is needed with older Photutils versions, setgrid_mode=False
. [#1239]
- Invalid data values (i.e., NaN or inf) are now automatically masked
in
photutils.centroids
- Deprecated the
gaussian1d_moments
andcentroid_epsf
functions. [#1240]
- Deprecated the
photutils.datasets
- Removed the deprecated
random_state
keyword in theapply_poisson_noise
,make_noise_image
,make_random_models_table
, andmake_random_gaussians_table
functions. [#1244] make_random_models_table
andmake_random_gaussians_table
now return an astropyQTable
with version metadata. [#1247]
- Removed the deprecated
photutils.detection
DAOStarFinder
,IRAFStarFinder
, andfind_peaks
now return an astropyQTable
with version metadata. [#1247]- The
StarFinder
label
column was renamed toid
for consistency with the other star finder classes. [#1254]
photutils.isophote
- The
Isophote
to_table
method nows return an astropyQTable
with version metadata. [#1247]
- The
photutils.psf
BasicPSFPhotometry
,IterativelySubtractedPSFPhotometry
, andDAOPhotPSFPhotometry
now return an astropyQTable
with version metadata. [#1247]
photutils.segmentation
- Deprecated the
filter_kernel
keyword in thedetect_sources
,deblend_sources
, andmake_source_mask
functions. It has been renamed to simplykernel
for consistency withSourceCatalog
. [#1242] - Removed the deprecated
random_state
keyword in themake_cmap
method. [#1244] - The
SourceCatalog
to_table
method nows return an astropyQTable
with version metadata. [#1247]
- Deprecated the
photutils.utils
- Removed the deprecated
check_random_state
function. [#1244] - Removed the deprecated
random_state
keyword in themake_random_cmap
function. [#1244]
- Removed the deprecated
- The minimum required python version is 3.7. [#1120]
photutils.aperture
- The
PixelAperture.plot()
method now returns a list ofmatplotlib.patches.Patch
objects. [#923] - Added an
area_overlap
method forPixelAperture
objects that gives the overlapping area of the aperture on the data. [#874] - Added a
get_overlap_slices
method and acenter
attribute toBoundingBox
. [#1157] - Added a
get_values
method toApertureMask
that returns a 1D array of mask-weighted values. [#1158, #1161] - Added
get_overlap_slices
method toApertureMask
. [#1165]
- The
photutils.background
- The
Background2D
class now accepts astropyNDData
,CCDData
, andQuantity
objects as data inputs. [#1140]
- The
photutils.detection
- Added a
StarFinder
class to detect stars with a user-defined kernel. [#1182]
- Added a
photutils.isophote
- Added the ability to specify the output columns in the
IsophoteList
to_table
method. [#1117]
- Added the ability to specify the output columns in the
photutils.psf
- The
EPSFStars
class is now usable with multiprocessing. [#1152] - Slicing
EPSFStars
now returns anEPSFStars
instance. [#1185]
- The
photutils.segmentation
- Added a modified, significantly faster,
SourceCatalog
class. [#1170, #1188, #1191] - Added
circular_aperture
andcircular_photometry
methods to theSourceCatalog
class. [#1188] - Added
fwhm
property to theSourceCatalog
class. [#1191] - Added
fluxfrac_radius
method to theSourceCatalog
class. [#1192] - Added a
bbox
attribute toSegmentationImage
. [#1187]
- Added a modified, significantly faster,
photutils.aperture
- Slicing a scalar
Aperture
object now raises an informative error message. [#1154] - Fixed an issue where
ApertureMask.multiply
fill_value
was not applied to pixels outside of the aperture mask, but within the aperture bounding box. [#1158] - Fixed an issue where
ApertureMask.cutout
would raise an error iffill_value
was non-finite and the input array was integer type. [#1158] - Fixed an issue where
RectangularAnnulus
with a non-defaulth_in
would give an incorrectApertureMask
. [#1160]
- Slicing a scalar
photutils.isophote
- Fix computation of gradient relative error when gradient=0. [#1180]
photutils.psf
- Fixed a bug in
EPSFBuild
where a warning was raised if the inputsmoothing_kernel
was annumpy.ndarray
. [#1146] - Fixed a bug that caused photometry to fail on an
EPSFmodel
with multiple stars in a group. [#1135] - Added a fallback
aperture_radius
for PSF models without a FWHM or sigma attribute, raising a warning. [#740]
- Fixed a bug in
photutils.segmentation
- Fixed
SourceProperties
local_background
to work with Quantity data inputs. [#1162] - Fixed
SourceProperties
local_background
for sources near the image edges. [#1162] - Fixed
SourceProperties
kron_radius
for sources that are completely masked. [#1164] - Fixed
SourceProperties
Kron properties for sources near the image edges. [#1167] - Fixed
SourceProperties
Kron mask correction. [#1167]
- Fixed
photutils.aperture
- Deprecated the
BoundingBox
slices
attribute. Use theget_overlap_slices
method instead. [#1157]
- Deprecated the
photutils.centroids
- Removed the deprecated
fit_2dgaussian
function andGaussianConst2D
class. [#1147] - Importing tools from the centroids subpackage without including the subpackage name is deprecated. [#1190]
- Removed the deprecated
photutils.detection
- Importing the
DAOStarFinder
,IRAFStarFinder
, andStarFinderBase
classes from the deprecatedfindstars.py
module is now deprecated. These classes can be imported usingfrom photutils.detection import <class>
. [#1173] - Importing the
find_peaks
function from the deprecatedcore.py
module is now deprecated. This function can be imported usingfrom photutils.detection import find_peaks
. [#1173]
- Importing the
photutils.morphology
- Importing tools from the morphology subpackage without including the subpackage name is deprecated. [#1190]
photutils.segmentation
- Deprecated the
"mask_all"
option in theSourceProperties
kron_params
keyword. [#1167] - Deprecated
source_properties
,SourceProperties
, andLegacySourceCatalog
. Use the newSourceCatalog
function instead. [#1170] - The
detect_threshold
function was moved to thesegmentation
subpackage. [#1171] - Removed the ability to slice
SegmentationImage
. Instead slice thesegments
attribute. [#1187]
- Deprecated the
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]
- Improved the performance of
photutils.background
- Fixed a bug with
Background2D
where usingBkgIDWInterpolator
would give incorrect results. [#1104]
- Fixed a bug with
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
inEllipseSample.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
inEPSFBuilder
, 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()
withrelabel=True
when no segments remain. [#1133]
photutils.psf
- Fixed checks on
oversampling
factors. [#1086]
- Fixed checks on
- 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]
photutils.aperture
- Added
b_in
as an optional ellipse annulus keyword. [#1070] - Added
h_in
as an optional rectangle annulus keyword. [#1070]
- Added
photutils.background
- Added
coverage_mask
andfill_value
keyword options toBackground2D
. [#1061]
- Added
photutils.centroids
- Added quadratic centroid estimator function
(
centroid_quadratic
). [#1067]
- Added quadratic centroid estimator function
(
photutils.psf
- Added the ability to use odd oversampling factors in
EPSFBuilder
. [#1076]
- Added the ability to use odd oversampling factors in
photutils.segmentation
- Added Kron radius, flux, flux error, and aperture to
SourceProperties
. [#1068] - Added local background to
SourceProperties
. [#1075]
- Added Kron radius, flux, flux error, and aperture to
photutils.isophote
- Fixed a typo in the calculation of the
b4
higher-order harmonic coefficient inbuild_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]
- Fixed a typo in the calculation of the
photutils.psf
- Fixed a bug in
subtract_psf
caused by using a fill_value of np.nan with an integer input array. [#1062]
- Fixed a bug in
photutils.segmentation
- Fixed a bug where
source_properties
would fail with unitlessgwcs.wcs.WCS
objects. [#1020]
- Fixed a bug where
photutils.utils
- The
effective_gain
parameter incalc_total_error
can now be zero (or contain zero values). [#1019]
- The
photutils.aperture
- Aperture pixel positions can no longer be shaped as 2xN. [#953]
- Removed the deprecated
units
keyword inaperture_photometry
andPixelAperture.do_photometry
. [#953] PrimaryHDU
,ImageHDU
, andHDUList
can no longer be input toaperture_photometry
. [#953]- Removed the deprecated the Aperture
mask_area
method. [#953] - Removed the deprecated Aperture plot keywords
ax
andindices
. [#953]
photutils.background
- Removed the deprecated
ax
keyword inBackground2D.plot_meshes
. [#953] Background2D
keyword options can not be input as positional arguments. [#1061]
- Removed the deprecated
photutils.centroids
centroid_1dg
,centroid_2dg
,gaussian1d_moments
,fit_2dgaussian
, andGaussianConst2D
have been moved to a newphotutils.centroids.gaussian
module. [#1064]- Deprecated
fit_2dgaussian
andGaussianConst2D
. [#1064]
photutils.datasets
- Removed the deprecated
type
keyword inmake_noise_image
. [#953] - Renamed the
random_state
keyword (deprecated) toseed
inapply_poisson_noise
,make_noise_image
,make_random_models_table
, andmake_random_gaussians_table
functions. [#1080]
- Removed the deprecated
photutils.detection
- Removed the deprecated
snr
keyword indetect_threshold
. [#953]
- Removed the deprecated
photutils.psf
- Added
flux_residual_sigclip
as an input parameter, allowing for custom sigma clipping options inEPSFBuilder
. [#984] - Added
extra_output_cols
as a parameter toBasicPSFPhotometry
,IterativelySubtractedPSFPhotometry
andDAOPhotPSFPhotometry
. [#745]
- Added
photutils.segmentation
- Removed the deprecated
SegmentationImage
methodscmap
andrelabel
. [#953] - Removed the deprecated
SourceProperties
values
andcoords
attributes. [#953] - Removed the deprecated
xmin/ymin
andxmax/ymax
properties. [#953] - Removed the deprecated
snr
andmask_value
keywords inmake_source_mask
. [#953] - Renamed the
random_state
keyword (deprecated) toseed
in themake_cmap
method. [#1080]
- Removed the deprecated
photutils.utils
- Removed the deprecated
random_cmap
,mask_to_mirrored_num
,get_version_info
,filter_data
, andstd_blocksum
functions. [#953] - Removed the deprecated
wcs_helpers
functionspixel_scale_angle_at_skycoord
,assert_angle_or_pixel
,assert_angle
, andpixel_to_icrs_coords
. [#953] - Deprecated the
check_random_state
function. [#1080] - Renamed the
random_state
keyword (deprecated) toseed
in themake_random_cmap
function. [#1080]
- Removed the deprecated
photutils.isophote
- Fixed computation of upper harmonics
a3
,b3
,a4
, andb4
in the ellipse fitting algorithm. [#1008]
- Fixed computation of upper harmonics
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 aFinder
was passed which did not returnNone
if no sources were found. [#986] - Fix to
centroid_epsf
where the wrong oversampling factor was used along the y axis. [#1002]
- Fix to algorithm in
photutils.psf
- Fix to
IterativelySubtractedPSFPhotometry
where the residual image was not initialized whenbkg_estimator
was not supplied. [#942]
- Fix to
photutils.segmentation
- Fixed a labeling bug in
deblend_sources
. [#961] - Fixed an issue in
source_properties
when the inputdata
is aQuantity
array. [#963]
- Fixed a labeling bug in
- Any WCS object that supports the astropy shared interface for WCS is now supported. [#899]
- Added a new
photutils.__citation__
andphotutils.__bibtex__
attributes which give a citation for photutils in bibtex format. [#926]
photutils.aperture
- Added parameter validation for all aperture classes. [#846]
- Added
from_float
,as_artist
,union
andintersection
methods toBoundingBox
class. [#851] - Added
shape
andisscalar
properties to Aperture objects. [#852] - Significantly improved the performance (~10-20 times faster) of
aperture photometry, especially when using
errors
andQuantity
inputs with many aperture positions. [#861] aperture_photometry
now supportsNDData
withStdDevUncertainty
to input errors. [#866]- The
mode
keyword in theto_sky
andto_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 examplegwcs.wcs.WCS
object. [#871]
- Added
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]
- Added new centroiding function
photutils.segmentation
- Significantly improved the performance of relabeling in
segmentation images (e.g.,
remove_labels
,keep_labels
). [#810] - Added new
background_area
attribute toSegmentationImage
. [#825] - Added new
data_ma
attribute toSegment
. [#825] - Added new
SegmentationImage
methods:find_index
,find_indices
,find_areas
,check_label
,keep_label
,remove_label
, andreassign_labels
. [#825] - Added
__repr__
and__str__
methods toSegmentationImage
. [#825] - Added
slices
,indices
, andfiltered_data_cutout_ma
attributes toSourceProperties
. [#858] - Added
__repr__
and__str__
methods toSourceProperties
andSourceCatalog
. [#858] - Significantly improved the performance of calculating the
background_at_centroid
property inSourceCatalog
. [#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]
- Significantly improved the performance of relabeling in
segmentation images (e.g.,
photutils.utils
- Added
NoDetectionsWarning
class. [#836]
- Added
photutils.aperture
- Fixed an issue where the
ApertureMask.cutout
method would drop the data units whencopy=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 aSkyCoord
object instead of a length-1SkyCoord
object. [#844]
- Fixed an issue where the
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
andcompute_residual_image
computations. [#885] - A ValueError is raised if
aperture_radius
is not input and cannot be determined from the inputpsf_model
. [#903] - Fixed normalization of ePSF model, now correctly normalizing on undersampled pixel grid. [#817]
- Fixed a bug in the
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
andsource_properties
will no longer raise an exception if a source is completely masked. [#822]- Fixed an issue in
SourceProperties
andsource_properties
where inf values in the data array were not automatically masked. [#822] error
andbackground
arrays are now always masked identically to the inputdata
. [#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 returnTrue
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 whenconnectivity=8
. [#890] - Fixed a bug in
deblend_sources
where thecontrast
parameter had little effect if the original segment contained three or more sources. [#890]
- Fixed an issue where
photutils.utils
- Fixed a bug in
filter_data
where units were dropped for dataQuantity
objects. [#872]
- Fixed a bug in
photutils.aperture
- Deprecated inputting aperture pixel positions shaped as 2xN. [#847]
- Renamed the
celestial_center
column tosky_center
in theaperture_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
andbounding_boxes
properties and itsto_mask
method returns anApertureMask
object instead of a length-1 list containing anApertureMask
. [#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 toaxes
. [#854] - Deprecated the
units
keyword inaperture_photometry
and thePixelAperture.do_photometry
method. [#866, #861] - Deprecated
PrimaryHDU
,ImageHDU
, andHDUList
inputs toaperture_photometry
. [#867] - The
aperture_photometry
function moved to a newphotutils.aperture.photometry
module. [#876] - Renamed the
bounding_boxes
attribute for pixel-based apertures tobbox
for consistency. [#896] - Deprecated the
BoundingBox
as_patch
method (instead useas_artist
). [#851]
photutils.background
- The
Background2D
plot_meshes
keywordax
was deprecated and renamed toaxes
. [#854]
- The
photutils.datasets
- The
make_noise_image
type
keyword was deprecated and renamed todistribution
. [#877]
- The
photutils.detection
- Removed deprecated
subpixel
keyword forfind_peaks
. [#835] DAOStarFinder
,IRAFStarFinder
, andfind_peaks
now returnNone
if no source/peaks are found. Also, for this case aNoDetectionsWarning
is issued. [#836]- Renamed the
snr
(deprecated) keyword tonsigma
indetect_threshold
. [#917]
- Removed deprecated
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 aGeometry
instance, e.g.,update(geometry.fix)
. [#922]
photutils.psf
FittableImageModel
and subclasses now allow for differentoversampling
factors to be specified in the x and y directions. [#834]- Removed
pixel_scale
keyword fromEPSFStar
,EPSFBuilder
, andEPSFModel
. [#815] - Added
oversampling
keyword tocentroid_com
. [#816] - Removed deprecated
Star
,Stars
, andLinkedStar
classes. [#894] - Removed
recentering_boxsize
andcenter_accuracy
keywords and addednorm_radius
andshift_value
keywords inEPSFBuilder
. [#817] - Added
norm_radius
andshift_value
keywords toEPSFModel
. [#817]
photutils.segmentation
- Removed deprecated
SegmentationImage
attributesdata_masked
,max
, andis_sequential
and methodsarea
andrelabel_sequential
. [#825] - Renamed
SegmentationImage
methodscmap
(deprecated) tomake_cmap
andrelabel
(deprecated) toreassign_label
. The newreassign_label
method gains arelabel
keyword. [#825] - The
SegmentationImage
segments
andslices
attributes now have the same length aslabels
(noNone
placeholders). [#825] detect_sources
now returnsNone
if no sources are found. Also, for this case aNoDetectionsWarning
is issued. [#836]- The
SegmentationImage
inputdata
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 intoSourceCatalog
or no valid sources are defined insource_properties
. [#836] - Deprecated the
values
andcoords
attributes inSourceProperties
. [#858] - Deprecated the unused
mask_value
keyword inmake_source_mask
. [#858] - The
bbox
property now returns aBoundingBox
instance. [#863] - The
xmin/ymin
andxmax/ymax
properties have been deprecated with the replacements having abbox_
prefix (e.g.,bbox_xmin
). [#863] - The
orientation
property is now returned as aQuantity
instance in units of degrees. [#863] - Renamed the
snr
(deprecated) keyword tonsigma
inmake_source_mask
. [#917]
- Removed deprecated
photutils.utils
- Renamed
random_cmap
tomake_random_cmap
. [#825] - Removed deprecated
cutout_footprint
function. [#835] - Deprecated the
wcs_helpers
functionspixel_scale_angle_at_skycoord
,assert_angle_or_pixel
,assert_angle
, andpixel_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
, andstd_blocksum
functions. [#918]
- Renamed
- Versions of Numpy <1.11 are no longer supported. [#783]
photutils.detection
DAOStarFinder
andIRAFStarFinder
gain two new parameters:brightest
to keep the topbrightest
(based on the flux) objects in the returned catalog (after all other filtering has been applied) andpeakmax
to exclude sources with peak pixel values larger or equal topeakmax
. [#750]- Added a
mask
keyword toDAOStarFinder
andIRAFStarFinder
that can be used to mask regions of the input image. [#759]
photutils.psf
- The
Star
,Stars
, andLinkedStars
classes are now deprecated and have been renamedEPSFStar
,EPSFStars
, andLinkedEPSFStars
, respectively. [#727] - Added a
GriddedPSFModel
class for spatially-dependent PSFs. [#772] - The
pixel_scale
keyword inEPSFStar
,EPSFBuilder
andEPSFModel
is now deprecated. Use theoversampling
keyword instead. [#780]
- The
photutils.detection
- The
find_peaks
function now returns an emptyastropy.table.Table
instead of an empty list if the input data is an array of constant values. [#709] - The
find_peaks
function will no longer issue a RuntimeWarning if the input data contains NaNs. [#712] - If no sources/peaks are found,
DAOStarFinder
,IRAFStarFinder
, andfind_peaks
now will return an empty table with column names and types. [#758, #762]
- The
photutils.psf
- The
photutils.psf.funcs.py
module was renamedphotutils.psf.utils.py
. Theprepare_psf_model
andget_grouped_psf_model
functions were also moved to this newutils.py
module. [#777]
- The
photutils.aperture
- If a single aperture is input as a list into the
aperture_photometry
function, then the output columns will be calledaperture_sum_0
andaperture_sum_err_0
(if errors are used). Previously these column names did not have the trailing "_0". [#779]
- If a single aperture is input as a list into the
photutils.segmentation
- Fixed a bug in the computation of
sky_bbox_ul
,sky_bbox_lr
,sky_bbox_ur
in theSourceCatalog
. [#716]
- Fixed a bug in the computation of
- Updated background and detection functions that call
astropy.stats.SigmaClip
orastropy.stats.sigma_clipped_stats
to support both theiriters
(for astropy < 3.1) andmaxiters
keywords. [#726]
- Versions of Python <3.5 are no longer supported. [#702, #703]
- Versions of Numpy <1.10 are no longer supported. [#697, #703]
- Versions of Pytest <3.1 are no longer supported. [#702]
pytest-astropy
is now required to run the test suite. [#702, #703]- The documentation build now uses the Sphinx configuration from
sphinx-astropy
rather than fromastropy-helpers
. [#702]
photutils.aperture
- Added
plot
andto_aperture
methods toBoundingBox
. [#662] - Added default theta value for elliptical and rectangular apertures. [#674]
- Added
photutils.centroids
- Added a
centroid_sources
function to calculate centroid of many sources in a single image. [#656] - An n-dimensional array can now be input into the
centroid_com
function. [#685]
- Added a
photutils.datasets
- Added a
load_simulated_hst_star_image
function to load a simulated HST WFC3/IR F160W image of stars. [#695]
- Added a
photutils.detection
- Added a
centroid_func
keyword tofind_peaks
. Thesubpixels
keyword is now deprecated. [#656] - The
find_peaks
function now returnsSkyCoord
objects in the table instead of separate RA and Dec. columns. [#656] - The
find_peaks
function now returns an empty Table and issues a warning when no peaks are found. [#668]
- Added a
photutils.psf
- Added tools to build and fit an effective PSF (
EPSFBuilder
andEPSFFitter
). [#695] - Added
extract_stars
function to extract cutouts of stars used to build an ePSF. [#695] - Added
EPSFModel
class to hold a fittable ePSF model. [#695]
- Added tools to build and fit an effective PSF (
photutils.segmentation
- Added a
mask
keyword to thedetect_sources
function. [#621] - Renamed
SegmentationImage
max
attribute tomax_label
.max
is deprecated. [#662] - Added a
Segment
class to hold the cutout image and properties of single labeled region (source segment). [#662] - Deprecated the
SegmentationImage
area
method. Instead, use theareas
attribute. [#662] - Renamed
SegmentationImage
data_masked
attribute todata_ma
.data_masked
is deprecated. [#662] - Renamed
SegmentationImage
is_sequential
attribute tois_consecutive
.is_sequential
is deprecated. [#662] - Renamed
SegmentationImage
relabel_sequential
attribute torelabel_consecutive
.relabel_sequential
is deprecated. [#662] - Added a
missing_labels
property toSegmentationImage
. [#662] - Added a
check_labels
method toSegmentationImage
. Thecheck_label
method is deprecated. [#662]
- Added a
photutils.utils
- Deprecated the
cutout_footprint
function. [#656]
- Deprecated the
photutils.aperture
- Fixed a bug where quantity inputs to the aperture classes would sometimes fail. [#693]
photutils.detection
- Fixed an issue in
detect_sources
where in some cases sources with a size less thannpixels
could be returned. [#663] - Fixed an issue in
DAOStarFinder
where in some cases a few too many sources could be returned. [#671]
- Fixed an issue in
photutils.isophote
- Fixed a bug where isophote fitting would fail when the initial center was not specified for an image with an elongated aspect ratio. [#673]
photutils.segmentation
- Fixed
deblend_sources
when other sources are in the neighborhood. [#617] - Fixed
source_properties
to handle the case where the data contain one or more NaNs. [#658] - Fixed an issue with
deblend_sources
where sources were not deblended where the data contain one or more NaNs. [#658] - Fixed the
SegmentationImage
areas
attribute to not include the zero (background) label. [#662]
- Fixed
photutils.isophote
- Corrected the units for isophote
sarea
in the documentation. [#657]
- Corrected the units for isophote
- Dropped python 3.3 support. [#542]
- Dropped numpy 1.8 support. Minimal required version is now numpy 1.9. [#542]
- Dropped support for astropy 1.x versions. Minimal required version is now astropy 2.0. [#575]
- Dropped scipy 0.15 support. Minimal required version is now scipy 0.16. [#576]
- Explicitly require six as dependency. [#601]
photutils.aperture
- Added
BoundingBox
class, used when defining apertures. [#481] - Apertures now have
__repr__
and__str__
defined. [#493] - Improved plotting of annulus apertures using Bezier curves. [#494]
- Rectangular apertures now use the true minimal bounding box. [#507]
- Elliptical apertures now use the true minimal bounding box. [#508]
- Added a
to_sky
method for pixel apertures. [#512]
- Added
photutils.background
- Mesh rejection now also applies to pixels that are masked during sigma clipping. [#544]
photutils.datasets
- Added new
make_wcs
andmake_imagehdu
functions. [#527] - Added new
show_progress
keyword to theload_*
functions. [#590]
- Added new
photutils.isophote
- Added a new
photutils.isophote
subpackage to provide tools to fit elliptical isophotes to a galaxy image. [#532, #603]
- Added a new
photutils.segmentation
- Added a
cmap
method toSegmentationImage
to generate a random matplotlib colormap. [#513] - Added
sky_centroid
andsky_centroid_icrs
source properties. [#592] - Added new source properties representing the sky coordinates of
the bounding box corner vertices (
sky_bbox_ll
,sky_bbox_ul
sky_bbox_lr
, andsky_bbox_ur
). [#592] - Added new
SourceCatalog
class to hold the list ofSourceProperties
. [#608] - The
properties_table
function is now deprecated. Use theSourceCatalog.to_table()
method instead. [#608]
- Added a
photutils.psf
- Uncertainties on fitted parameters are added to the final table. [#516]
- Fitted results of any free parameter are added to the final table. [#471]
photutils.aperture
- The
ApertureMask
apply()
method has been renamed tomultiply()
. [#481]. - The
ApertureMask
input parameter was renamed frommask
todata
. [#548] - Removed the
pixelwise_errors
keyword fromaperture_photometry
. [#489]
- The
photutils.background
- The
Background2D
keywordsexclude_mesh_method
andexclude_mesh_percentile
were removed in favor of a single keyword calledexclude_percentile
. [#544] - Renamed
BiweightMidvarianceBackgroundRMS
toBiweightScaleBackgroundRMS
. [#547] - Removed the
SigmaClip
class.astropy.stats.SigmaClip
is a direct replacement. [#569]
- The
photutils.datasets
- The
make_poisson_noise
function was renamed toapply_poisson_noise
. [#527] - The
make_random_gaussians
function was renamed tomake_random_gaussians_table
. The parameter ranges must now be input as a dictionary. [#527] - The
make_gaussian_sources
function was renamed tomake_gaussian_sources_image
. [#527] - The
make_random_models
function was renamed tomake_random_models_table
. [#527] - The
make_model_sources
function was renamed tomake_model_sources_image
. [#527] - The
unit
,hdu
,wcs
, andwcsheader
keywords inphotutils.datasets
functions were removed. [#527] 'photutils-datasets'
was added as an optionallocation
in theget_path
function. This option is used as a fallback in case the'remote'
location (astropy data server) fails. [#589]
- The
photutils.detection
- The
daofind
andirafstarfinder
functions were removed. [#588]
- The
photutils.psf
IterativelySubtractedPSFPhotometry
issues a "no sources detected" warning only on the first iteration, if applicable. [#566]
photutils.segmentation
- The
'icrs_centroid'
,'ra_icrs_centroid'
, and'dec_icrs_centroid'
source properties are deprecated and are no longer default columns returned byproperties_table
. [#592] - The
properties_table
function now returns aQTable
. [#592]
- The
photutils.utils
- The
background_color
keyword was removed from therandom_cmap
function. [#528] - Deprecated unused
interpolate_masked_data()
. [#526, #611]
- The
photutils.segmentation
- Fixed
deblend_sources
so that it correctly deblends multiple sources. [#572] - Fixed a bug in calculation of the
sky_centroid_icrs
(and deprecatedicrs_centroid
) property where the incorrect pixel origin was being passed. [#592]
- Fixed
photutils.utils
- Added a check that
data
andbkg_error
have the same units incalc_total_error
. [#537]
- Added a check that
- Fixed file permissions in the released source distribution.
- Dropped numpy 1.7 support. Minimal required version is now numpy 1.8. [#327]
photutils.datasets
- The
load_*
functions that use remote data now retrieve the data fromdata.astropy.org
(the astropy data repository). [#472]
- The
photutils.background
- Fixed issue with
Background2D
withedge_method='pad'
that occurred when unequal padding needed to be applied to each axis. [#498] - Fixed issue with
Background2D
that occurred when zero padding needed to apply along only one axis. [#500]
- Fixed issue with
photutils.geometry
- Fixed a bug in
circular_overlap_grid
affecting 32-bit machines that could cause errors circular aperture photometry. [#475]
- Fixed a bug in
photutils.psf
- Fixed a bug in how
FittableImageModel
represents its center. [#460] - Fix bug which modified user's input table when doing forced photometry. [#485]
- Fixed a bug in how
photutils.aperture
- Added new
origin
keyword to apertureplot
methods. [#395] - Added new
id
column toaperture_photometry
output table. [#446] - Added
__len__
method for aperture classes. [#446] - Added new
to_mask
method toPixelAperture
classes. [#453] - Added new
ApertureMask
class to generate masks from apertures. [#453] - Added new
mask_area()
method toPixelAperture
classes. [#453] - The
aperture_photometry()
function now accepts a list of aperture objects. [#454]
- Added new
photutils.background
- Added new
MeanBackground
,MedianBackground
,MMMBackground
,SExtractorBackground
,BiweightLocationBackground
,StdBackgroundRMS
,MADStdBackgroundRMS
, andBiweightMidvarianceBackgroundRMS
classes. [#370] - Added
axis
keyword to new background classes. [#392] - Added new
removed_masked
,meshpix_threshold
, andedge_method
keywords for the 2D background classes. [#355] - Added new
std_blocksum
function. [#355] - Added new
SigmaClip
class. [#423] - Added new
BkgZoomInterpolator
andBkgIDWInterpolator
classes. [#437]
- Added new
photutils.datasets
- Added
load_irac_psf
function. [#403]
- Added
photutils.detection
- Added new
make_source_mask
convenience function. [#355] - Added
filter_data
function. [#398] - Added
DAOStarFinder
andIRAFStarFinder
as OOP interfaces fordaofind
andirafstarfinder
, respectively, which are now deprecated. [#379]
- Added new
photutils.psf
- Added
BasicPSFPhotometry
,IterativelySubtractedPSFPhotometry
, andDAOPhotPSFPhotometry
classes to perform PSF photometry in crowded fields. [#427] - Added
DAOGroup
andDBSCANGroup
classes for grouping overlapping sources. [#369]
- Added
photutils.psf_match
- Added
create_matching_kernel
andresize_psf
functions. Also, addedCosineBellWindow
,HanningWindow
,SplitCosineBellWindow
,TopHatWindow
, andTukeyWindow
classes. [#403]
- Added
photutils.segmentation
- Created new
photutils.segmentation
subpackage. [#442] - Added
copy
andarea
methods and anareas
property toSegmentationImage
. [#331]
- Created new
photutils.aperture
- Removed the
effective_gain
keyword fromaperture_photometry
. Users must now input the total error, which can be calculated using thecalc_total_error
function. [#368] aperture_photometry
now outputs aQTable
. [#446]- Renamed
source_id
keyword toindices
in the apertureplot()
method. [#453] - Added
mask
andunit
keywords to aperturedo_photometry()
methods. [#453]
- Removed the
photutils.background
- For the background classes, the
filter_shape
keyword was renamed tofilter_size
. Thebackground_low_res
andbackground_rms_low_res
class attributes were renamed tobackground_mesh
andbackground_rms_mesh
, respectively. [#355, #437] - The
Background2D
method
andbackfunc
keywords have been removed. In its place one can input callable objects via thesigma_clip
,bkg_estimator
, andbkgrms_estimator
keywords. [#437] - The interpolator to be used by the
Background2D
class can be input as a callable object via the newinterpolator
keyword. [#437]
- For the background classes, the
photutils.centroids
- Created
photutils.centroids
subpackage, which contains thecentroid_com
,centroid_1dg
, andcentroid_2dg
functions. These functions now return a two-element numpy ndarray. [#428]
- Created
photutils.detection
- Changed finding algorithm implementations (
daofind
andstarfind
) from functional to object-oriented style. Deprecated old style. [#379]
- Changed finding algorithm implementations (
photutils.morphology
- Created
photutils.morphology
subpackage. [#428] - Removed
marginalize_data2d
function. [#428] - Moved
cutout_footprint
fromphotutils.morphology
tophotutils.utils
. [#428] - Added a function to calculate the Gini coefficient (
gini
). [#343]
- Created
photutils.psf
- Removed the
effective_gain
keyword frompsf_photometry
. Users must now input the total error, which can be calculated using thecalc_total_error
function. [#368]
- Removed the
photutils.segmentation
- Removed the
effective_gain
keyword fromSourceProperties
andsource_properties
. Users must now input the total error, which can be calculated using thecalc_total_error
function. [#368]
- Removed the
photutils.utils
- Renamed
calculate_total_error
tocalc_total_error
. [#368]
- Renamed
photutils.aperture
- Fixed a bug in
aperture_photometry
so that single-row output tables do not return a multidimensional column. [#446]
- Fixed a bug in
photutils.centroids
- Fixed a bug in
centroid_1dg
andcentroid_2dg
that occurred when the input data contained invalid (NaN or inf) values. [#428]
- Fixed a bug in
photutils.segmentation
- Fixed a bug in
SourceProperties
whereerror
andbackground
units were sometimes dropped. [#441]
- Fixed a bug in
- Dropped numpy 1.6 support. Minimal required version is now numpy 1.7. [#327]
- Fixed configparser for Python 3.5. [#366, #384]
photutils.detection
- Fixed an issue to update segmentation image slices after deblending. [#340]
- Fixed source deblending to pass the pixel connectivity to the watershed algorithm. [#347]
- SegmentationImage properties are now cached instead of recalculated, which significantly improves performance. [#361]
photutils.utils
- Fixed a bug in
pixel_to_icrs_coords
where the incorrect pixel origin was being passed. [#348]
- Fixed a bug in
photutils.background
- Added more robust version checking of Astropy. [#318]
photutils.detection
- Added more robust version checking of Astropy. [#318]
photutils.segmentation
- Fixed issue where
SegmentationImage
slices were not being updated. [#317] - Added more robust version checking of scikit-image. [#318]
- Fixed issue where
- Photutils has the following requirements:
- Python 2.7 or 3.3 or later
- Numpy 1.6 or later
- Astropy v1.0 or later
photutils.detection
find_peaks
now returns an Astropy Table containing the (x, y) positions and peak values. [#240]find_peaks
has newmask
,error
,wcs
andsubpixel
precision options. [#244]detect_sources
will now issue a warning if the filter kernel is not normalized to 1. [#298]- Added new
deblend_sources
function, an experimental source deblender. [#314]
photutils.morphology
- Added new
GaussianConst2D
(2D Gaussian plus a constant) model. [#244] - Added new
marginalize_data2d
function. [#244] - Added new
cutout_footprint
function. [#244]
- Added new
photutils.segmentation
- Added new
SegmentationImage
class. [#306] - Added new
check_label
,keep_labels
, andoutline_segments
methods for modifyingSegmentationImage
. [#306]
- Added new
photutils.utils
- Added new
random_cmap
function to generate a colormap comprised of random colors. [#299] - Added new
ShepardIDWInterpolator
class to perform Inverse Distance Weighted (IDW) interpolation. [#307] - The
interpolate_masked_data
function can now interpolate higher-dimensional data. [#310]
- Added new
photutils.segmentation
- The
relabel_sequential
,relabel_segments
,remove_segments
,remove_border_segments
, andremove_masked_segments
functions are nowSegmentationImage
methods (with slightly different names). [#306] - The
SegmentProperties
class has been renamed toSourceProperties
. Likewise, thesegment_properties
function has been renamed tosource_properties
. [#306] - The
segment_sum
andsegment_sum_err
attributes have been renamed tosource_sum
andsource_sum_err
, respectively. [#306] - The
background_atcentroid
attribute has been renamed tobackground_at_centroid
. [#306]
- The
photutils.aperture
- Fixed an issue where
np.nan
ornp.inf
were not properly masked. [#267]
- Fixed an issue where
photutils.geometry
overlap_area_triangle_unit_circle
handles correctly a corner case in some i386 systems where the area of the aperture was not computed correctly. [#242]rectangular_overlap_grid
andelliptical_overlap_grid
fixes to normalization of subsampled pixels. [#265]overlap_area_triangle_unit_circle
handles correctly the case where a line segment intersects at a triangle vertex. [#277]
- Updated astropy-helpers to v1.1. [#302]
Photutils 0.1 was released on December 22, 2014. It requires Astropy version 0.4 or later.