- The minimum required NumPy is now 2.0. [#2115]
- The minimum required SciPy is now 1.13. [#2121]
- The minimum required Matplotlib is now 3.9. [#2115]
- The minimum required scikit-image is now 0.23. [#2115]
- The minimum required astropy is now 6.1.4. [#2130]
photutils.aperture- The
to_skyandto_pixelmethods for all pixel and sky aperture types now use the local WCS Jacobian to accurately compute pixel scale factors and rotation angles. This correctly handles WCS with distortions (e.g., SIP polynomial corrections) and non-square pixels. [#2240]
- The
photutils.background- Added a
to_aperturemethod toLocalBackground. [#2118]
- Added a
photutils.centroids- Added a
CentroidQuadraticclass to provide an object-oriented interface to thecentroid_quadraticfunction. [#2163, #2169]
- Added a
photutils.detection- Added a public
StarFinderCatalogBaseclass that provides a common base for the catalogs in theDAOStarFinder,IRAFStarFinder, andStarFinderclasses. [#2149, #2201] - Added
__repr__and__str__methods toDAOStarFinder,IRAFStarFinder, andStarFinder. [#2201] - Significantly improved the performance of
DAOStarFinder,IRAFStarFinder, andStarFinderby vectorizing cutout extraction and image moment computation. [#2201] - The
thresholdparameter inDAOStarFinder,IRAFStarFinder, andStarFindernow accepts a 2D array in addition to a scalar value, allowing for spatially varying detection thresholds. [#2202] - Added a
scale_thresholdparameter toDAOStarFinder. When set to False, the inputthresholdis applied directly to the convolved data without the default kernel-based scaling. [#2202] - Added a
min_separationkeyword tofind_peaks. The implementation uses fast separable box filters and is approximately 10-400x faster than using an explicit circular footprint withscipy.ndimage.maximum_filter(depending on the radius), while producing identical results. [#2246]
- Added a public
photutils.profiles- Added a
EnsquaredCurveOfGrowthclass to compute a curve of growth using concentric square apertures. [#2184] - Added a
EllipticalCurveOfGrowthclass to compute a curve of growth using concentric elliptical apertures with a fixed axis ratio and orientation. [#2184] - Added
moffat_fit,moffat_profile, andmoffat_fwhmproperties toRadialProfilefor fitting a 1D Moffat model to the radial profile. [#2185]
- Added a
photutils.psf- Added a
SourceGroupsclass that stores the results of grouping sources and provides methods to analyze and plot the groupings. [#2116] - Added
remove_invalidandreset_idskeywords to theresults_to_init_paramsandresults_to_model_paramsmethods ofPSFPhotometryandIterativePSFPhotometry. [#2131] - Added a
decode_flagsconvenience method toPSFPhotometryandIterativePSFPhotometryclasses to decode the bitwise flags from the results table. [#2132, #2136] - Added a
return_bit_flagskeyword to thedecode_psf_flagsfunction. [#2136] - Added
__repr__methods toImagePSFandGriddedPSFModel. [#2134] - Added a
shapeproperty toImagePSF. [#2158] EPSFBuildernow automatically excludes stars that repeatedly fail fitting and emits warnings with specific failure reasons. [#2158, #2165]- Added validation and automatic shape handling for
fit_shape=Noneinfit_2dgaussianandfit_fwhm. The functions now require explicitfit_shapefor multiple sources and emit an informative warning for single-source fitting. [#2164] - The
fit_fwhmandfit_2dgaussianxyposvalue can now be input as azipobject. [#2164]
- Added a
photutils.psf_matching- Added a
regularizationkeyword tomake_kernelto regularize division by near-zero values in the source Optical Transfer Function. [#2170, #2171, #2175] - Added
make_wiener_kernelfunction that uses Wiener regularization to make a PSF matching kernel. [#2171, #2172, #2175] make_kernelnow validates input PSFs (2D, odd dimensions, centered) and the window function output. [#2170]resize_psfnow validates input PSFs and pixel scales. [#2170]- Added
__repr__methods toCosineBellWindow,HanningWindow,SplitCosineBellWindow,TopHatWindow, andTukeyWindowclasses. [#2176]
- Added a
photutils.segmentation- The
SourceCatalogfluxfrac_radiusnow caches results byfluxfracvalue. Repeated calls with the samefluxfracreturn the cached result without recomputation. [#2197] - The radial step used when searching for a bracketing interval in
SourceCatalogfluxfrac_radiusis now set to 10% of the currentmax_radius, bounding the fallback loop to at most ~10 iterations regardless of source size. [#2197] - Improved the performance (~6-9x speedup) of
SourceCatalogmin_value,max_value,segment_flux,segment_flux_err,background_sum, andbackground_mean. [#2199] - Added
SegmentationImageget_segmentandget_segmentsmethods to return theSegmentobject(s) for a given label or list of labels. [#2228] - Added the ability to input
RegionVisualkeywords to theSegmentationImageto_regionsmethod. [#2228] - Added
SegmentationImageget_polygon,get_polygons,get_patch,get_patches,get_region, andget_regionsmethods to return the polygon, patch, or region for a given segment label or list of labels. [#2232] - Improved the performance of the
SegmentationImagekeep_labelsmethod andmissing_labelsattribute. [#2234] - Improved the performance of
SourceCatalogcentroid_win(~3.5x speedup),centroid_quad,fluxfrac_radius(~6x speedup),kron_radius(~2x speedup),moments,moments_central,perimeter, and Kron photometry. [#2238]
- The
photutils.utils- Significantly improved the performance (by factors of 3 or more) of
ShepardIDWInterpolator[#2187].
- Significantly improved the performance (by factors of 3 or more) of
photutils.background- Fixed
Background2DraisingAttributeErrorwhen passed a function asbkg_estimatororbkgrms_estimatorinstead of a class instance with asigma_clipattribute. [#2181] - Fixed silent truncation of background estimates when integer input
data were provided to
Background2D. Integer inputs now producenp.float32output to preserve precision from interpolation. [#2181]
- Fixed
photutils.centroids- Fixed a bug in
centroid_sourceswhere the input error array could be ignored if more than one source was input. [#2179]
- Fixed a bug in
photutils.datasets- Fixed a bug in
apply_poisson_noisewhere the returned image could have a different dtype than the input. [#2173]
- Fixed a bug in
photutils.detection- Fixed
StarFindermutating the inputkernelarray during normalization. [#2201] - Fixed an edge case of
find_peaksnot excluding NaN pixel locations from peak detection, which could produce false peaks when the NaN fill value was a local maximum. [#2247]
- Fixed
photutils.isophotebuild_ellipse_modelnow integrates over all angles instead of stopping once it hits the edge of the output image. [#2156]
photutils.morphology- Fixed issues with negative pixel values input to
gini. [#2178]
- Fixed issues with negative pixel values input to
photutils.profiles- Fixed an issue where the mask (input and non-finite values) was not applied to the raw data profile. [#2184]
photutils.psfPSFPhotometryandIterativePSFPhotometrynow handle non-finite (NaN or inf) local background values instead of raising an error. Three new flags have been added to identify sources with non-finite values: flag 512 for non-finite fitted positions, flag 1024 for non-finite fitted flux, and flag 2048 for non-finite local background. [#2131]- Fixed a bug in
EPSFBuilderwhere therecentering_boxsizewas being applied in oversampled space instead of the original star pixel space. [#2168]
photutils.segmentation- Fixed a bug in
SourceCatalogwhere the (x, y) coordinates were swapped in themap_coordinatescall used to interpolate the background at source centroids, causingbackground_centroidto return incorrect values. [#2198] - Fixed an issue in
SourceCatalogwhere incorrect masking behavior could occur whenapermask_method='none'. [#2198] - Fixed an issue in
SourceCatalogwhere unrealistically largekron_radiusvalues could cause out-of-memory issues. [#2237]
- Fixed a bug in
photutils- Passing optional arguments positionally to all functions, classes,
methods in
photutilsis now deprecated. In the future, all optional arguments must be passed as keyword arguments. [#2219]
- Passing optional arguments positionally to all functions, classes,
methods in
photutils.aperture- The
ApertureStatscovar_sigx2,covar_sigxy, andcovar_sigy2attributes have been renamed tocovariance_xx,covariance_xy, andcovariance_yy, respectively. The old names are deprecated. [#2241] - The
ApertureStatscxx,cxy, andcyyattributes have been renamed toellipse_cxx,ellipse_cxy, andellipse_cyy, respectively. The old names are deprecated. [#2241] - The
ApertureStatsdata_sumcutoutanderror_sumcutoutattributes have been renamed todata_sum_cutoutanderror_sum_cutout, respectively. The old names are deprecated. [#2241] - The
ApertureStatsget_idandget_idsmethods have been renamed toselect_idandselect_ids, respectively. The old names are deprecated. [#2241] - The
ApertureStatssemimajor_sigmaandsemiminor_sigmaattributes/columns have been renamed tosemimajor_axisandsemiminor_axis, respectively. The old names are deprecated. [#2241] - The
ApertureStatsxcentroidandycentroidattributes/columns have been renamed tox_centroidandy_centroid, respectively. The old names are deprecated. [#2241] - The
xcenterandycentercolumn names in the table returned byaperture_photometryhave been renamed tox_centerandy_center, respectively. The old names are deprecated. [#2241] - The
CircularMaskMixin,EllipticalMaskMixin, andRectangularMaskMixinclasses are now deprecated. The mask generation is now handled internally by thePixelAperturebase class. [#2242]
- The
photutils.background- Removed the deprecated
edge_methodkeyword fromBackground2D. [#2102] - Removed the deprecated
background_mesh_masked,background_rms_mesh_masked, andmesh_nmaskedproperties fromBackground2D. [#2102] - Removed the deprecated
grid_modekeyword fromBkgZoomInterpolator. [#2102] - The
interpolatorkeyword argument forBackground2Dis now deprecated. Wheninterpolatoris eventually removed, thescipy.ndimage.zoomcubic spline interpolator will always be used to resize the low-resolution arrays. The behavior will be identical to the current default. [#2108] - The
Background2Dnpixels_meshandnpixels_mapproperties have been renamed ton_pixels_meshandn_pixels_map, respectively. The old names are deprecated. [#2241] - The
BkgIDWInterpolatorandBkgZoomInterpolatorclasses are now deprecated. [#2108] - The
Background2Dbkgrms_estimatorkeyword argument has been renamed tobkg_rms_estimator. The old name is deprecated. [#2241]
- Removed the deprecated
photutils.centroids- The
xpeak,ypeak, andsearch_boxsizekeyword arguments forcentroid_quadraticare now deprecated. Usecentroid_sourcesto centroid sources at specific positions. [#2160]
- The
photutils.datasets- The
get_path,load_spitzer_image,load_spitzer_catalog, andload_star_imagefunctions are now deprecated and will be removed in a future version. [#2135]
- The
photutils.detectionfind_peaksnow returns aQTableinstead of aTable. [#2201]- The
sharploandsharphikeyword arguments forDAOStarFinderandIRAFStarFinderare now deprecated. Usethe sharpness_range=(lower, upper)tuple keyword instead. Setsharpness_range=Noneto disable sharpness filtering. [#2216] - The
roundloandroundhikeyword arguments forDAOStarFinderandIRAFStarFinderare now deprecated. Use theroundness_range=(lower, upper)tuple keyword instead. Setroundness_range=Noneto disable roundness filtering. [#2216] - The
minsep_fwhmkeyword argument forIRAFStarFinderis now deprecated. Usemin_separationinstead. [#2216] - The
peakmaxkeyword argument forDAOStarFinder,IRAFStarFinder, andStarFinderis now deprecated. Usepeak_maxinstead. [#2216] - The
brightestkeyword argument forDAOStarFinder,IRAFStarFinder, andStarFinderis now deprecated. Usen_brightestinstead. [#2216] - The
npeakskeyword argument forfind_peaksis now deprecated. Usen_peaksinstead. [#2241] - The default
min_separationforDAOStarFinder,IRAFStarFinder, andStarFinderis nowNone, which computes a default separation of2.5 * fwhm(or2.5 * (min(kernel.shape) // 2)forStarFinder) consistent across all three star finders. [#2216] - The
xcentroidandycentroidcolumn/attribute names forDAOStarFinder,IRAFStarFinder, andStarFindercatalog classes are deprecated. Usex_centroidandy_centroidinstead. Thecutout_xcentroidandcutout_ycentroidattributes are also deprecated in favor ofcutout_x_centroidandcutout_y_centroid. [#2241] - The
IRAFStarFinderandStarFinderpaattribute/column has been renamed toorientation. The old name is deprecated. [#2241] - The
npixcolumn/attribute inDAOStarFinderandIRAFStarFindercatalogs has been renamed ton_pixels. The old name is deprecated. [#2241] - The
IRAFStarFinderandStarFinderorientation(waspa) values are now always returned as aQuantityarray in the range [0, 360) degrees. [#2224, #2225]
photutils.isophote- The
IsophoteandIsophoteListgrad_errorandgrad_r_errorattributes have been renamed togradient_errandgradient_rel_err, respectively. The old names are deprecated. [#2241] - The
EllipseSamplegradient_errorandgradient_relative_errorattributes have been renamed togradient_errandgradient_rel_err, respectively. The old names are deprecated. [#2241] - The
grad_errorandgrad_rerrorcolumn names in the isophote output table have been renamed togradient_errandgradient_rel_err, respectively. The old names are deprecated. [#2241] - The
nclipparameter inEllipse.fit_image,Ellipse.fit_isophote, andEllipseSamplehas been renamed ton_clip. The old name is deprecated. [#2241] - The
IsophoteandIsophotListniter,ndata, andnflagattributes have been renamed ton_iter,n_data, andn_flag, respectively. The old names are deprecated. [#2241]
- The
photutils.profiles- Cached Gaussian fits to the radial profile are now automatically invalidated when the profile normalization changes, so the fit is always consistent with the current profile. [#2185]
photutils.psf- The
photutils.psf.matchingsubpackage has been moved tophotutils.psf_matching. Importing from the old location is deprecated. [#2167] - Removed the deprecated
IntegratedGaussianPRFandPRFAdapterclasses. [#2103] - The
grid_from_epsfshelper function is now deprecated. Instead, useGriddedPSFModeldirectly. [#2111] - The
EPSFFitterclass is now deprecated. Use thefitter,fit_shape, andfitter_maxitersparameters ofEPSFBuilderinstead. [#2159] - Removed the
ModelImageMixinclass. [#2133] - Removed the
ModelGridPlotMixinclass. [#2137] - Removed the
norm_radiuskeyword fromEPSFBuilder. [#2158] - Removed the deprecated
FittableImageModelandEPSFModelclasses. UseImagePSFinstead. [#2158] EPSFBuildernow returns anEPSFBuildResultdataclass containing the ePSF, fitted stars, iteration count, convergence status, and excluded star diagnostics. Tuple unpacking is still supported for backward compatibility. [#2158]LinkedEPSFStarno longer inherits fromEPSFStars. [#2158]- The
npixfitcolumn inPSFPhotometryresults has been renamed ton_pixels_fit. The old name is deprecated. [#2241] - The
NPIXFIT_PARTIAL(npixfit_partial) PSF flag has been renamed toN_PIXELS_FIT_PARTIAL(n_pixels_fit_partial). The old name is deprecated. [#2241] - The
PSFPhotometryandIterativePSFPhotometrylocalbkg_estimatorkeyword argument has been renamed tolocal_bkg_estimator. The old name is deprecated. [#2241] - The
PSFPhotometryandIterativePSFPhotometryinclude_localbkgkeyword argument inmake_model_imageandmake_residual_imagehas been renamed toinclude_local_bkg. The old name is deprecated. [#2241]
- The
photutils.psf_matching- Renamed
create_matching_kerneltomake_kernel. The old name is deprecated. [#2171] make_kernelnow raisesValueErrorif PSFs are not 2D, have even dimensions, or do not have the same shape. [#2170]resize_psfnow raisesValueErrorif the PSF is not 2D, has even dimensions, or if pixel scales are not positive. [#2170]make_kernelnow raisesTypeErrorif thewindowparameter is not callable. [#2170]
- Renamed
photutils.segmentation- The
SourceCatalogorientationproperty is now always returned in the range [0, 360) degrees. [#2224] - The
SegmentationImagenlabels,data_ma,deblended_labels_map, anddeblended_labels_inverse_mapattributes have been renamed ton_labels,data_masked,deblended_label_to_parent, andparent_to_deblended_labels, respectively. The old names are deprecated. [#2241] - The
Segmentdata_maattribute has been renamed todata_masked. The old name is deprecated. [#2241] - The
SourceCatalogdata,error,background, andsegmentattributes have been renamed todata_cutout,error_cutout,background_cutout, andsegment_cutout, respectively. The old names are deprecated. [#2241] - The
SourceCatalogdata_ma,error_ma,background_ma, andsegment_maattributes have been renamed todata_cutout_masked,error_cutout_masked,background_cutout_masked, andsegment_cutout_masked, respectively. The old names are deprecated. [#2241] - The
SourceCatalogconvdataandconvdata_maattributes have been renamed toconv_data_cutoutandconv_data_cutout_masked, respectively. The old names are deprecated. [#2241] - The
SourceCatalogcutout_minval_indexandcutout_maxval_indexattributes have been renamed tocutout_min_value_indexandcutout_max_value_index, respectively. The old names are deprecated. [#2241] - The
SourceCatalogminval_index,maxval_index,minval_xindex,minval_yindex,maxval_xindex, andmaxval_yindexattributes have been renamed tomin_value_index,max_value_index,min_value_xindex,min_value_yindex,max_value_xindex, andmax_value_yindex, respectively. The old names are deprecated. [#2241] - The
SourceCatalogcovar_sigx2,covar_sigxy, andcovar_sigy2attributes/columns have been renamed tocovariance_xx,covariance_xy, andcovariance_yy, respectively. The old names are deprecated. [#2241] - The
SourceCatalogcxx,cxy, andcyyattributes/columns have been renamed toellipse_cxx,ellipse_cxy, andellipse_cyy, respectively. The old names are deprecated. [#2241] - The
SourceCatalogsegment_fluxerrandkron_fluxerrattributes/columns have been renamed tosegment_flux_errandkron_flux_err, respectively. The old names are deprecated. [#2241] - The
SourceCatalogfluxfrac_radiusattribute has been renamed toflux_radius. The old name is deprecated. [#2241] - The
SourceCatalogget_labelandget_labelsmethods have been renamed toselect_labelandselect_labels, respectively. The old names are deprecated. [#2241] - The
SourceCatalogadd_extra_property,remove_extra_property,remove_extra_properties, andrename_extra_propertymethods have been renamed toadd_property,remove_property,remove_properties, andrename_property, respectively. Theextra_propertiesattribute has been renamed tocustom_properties. The old names are deprecated. [#2241] - The
SourceCatalognlabelsandlocalbkg_widthattributes have been renamed ton_labelsandlocal_bkg_width, respectively. The old names are deprecated. [#2241] - The
SourceCatalogsemimajor_sigmaandsemiminor_sigmaattributes/columns have been renamed tosemimajor_axisandsemiminor_axis, respectively. The old names are deprecated. [#2241] - The
SourceCatalogxcentroid,ycentroid,xcentroid_win,ycentroid_win,xcentroid_quad, andycentroid_quadattributes/columns have been renamed tox_centroid,y_centroid,x_centroid_win,y_centroid_win,x_centroid_quad, andy_centroid_quad, respectively. The old names are deprecated. [#2241] - The
SourceCatalogsegment_img,localbkg_width,apermask_method, anddetection_catkeyword arguments have been renamed tosegmentation_image,local_bkg_width,aperture_mask_method, anddetection_catalog, respectively. The old names are deprecated. [#2241] - The
SourceFindernpixels,nlevels, andnprocattributes have been renamed ton_pixels,n_levels, andn_processes, respectively. The old names are deprecated. [#2241] - The
nsigmaparameter indetect_thresholdhas been renamed ton_sigma. The old name is deprecated. [#2241] - The
npixelsparameter indetect_sourceshas been renamed ton_pixels. The old name is deprecated. [#2241] - The
segment_img,npixels,nlevels, andnprocparameters indeblend_sourceshave been renamed tosegmentation_image,n_pixels,n_levels, andn_processes, respectively. The old names are deprecated. [#2241] - The
npixels,nlevels, andnprocparameters inSourceFinderhave been renamed ton_pixels,n_levels, andn_processes, respectively. The old names are deprecated. [#2241]
- The
photutils.utils- The
ImageDepthnsigma,napers, andnitersparameters have been renamed ton_sigma,n_apertures, andn_iters, respectively. The old names are deprecated. Thenapers_usedattribute has also been renamed ton_apertures_used. [#2241] - The
make_random_cmapncolorsparameter has been renamed ton_colors. The old name is deprecated. [#2241] - The
ShepardIDWInterpolatorregparameter in__call__has been renamed toregularization. The old name is deprecated. [#2241]
- The
- The minimum required NumPy is now 1.25. [#2043]
- The minimum required SciPy is now 1.11.1. [#2043]
- The minimum required Matplotlib is now 3.8. [#2043]
- The minimum required scikit-image is now 0.21. [#2043]
photutils.isophotebuild_ellipse_modelis now Cythonized and considerably faster. [#2046]build_ellipse_modelalso has an additional optional keyword argumentsma_interval, which was previously hardcoded. [#2046]
photutils.psfPSFPhotometryandIterativePSFPhotometrynow raise an error if the inputerrorarray contains non-finite or zero values. [#2022]GriddedPSFModelcan now be used with a single input ePSF model, which will be equivalent toImagePSF. [#2034]- The
findercallable input toPSFPhotometryandIterativePSFPhotometryis no longer restricted to have x and y column names of'xcentroid'and'ycentroid'. The allowed column names are now the same as those allowed in theinit_paramstable. [#2072] - Added a
group_warning_thresholdkeyword toPSFPhotometryandIterativePSFPhotometry. [#2081] - The
PSFPhotometryandIterativePSFPhotometryclasses no longer fail for invalid sources, defined as those that have no overlap with the input data, are completely masked, or have too few unmasked pixels for a fit. These classes have new flags (64, 128, 256, respectively) for these invalid conditions. [#2084, #2085] - The
PSFPhotometryandIterativePSFPhotometryclasses have newresults_to_init_paramsandresults_to_model_paramsmethods for outputting fit results in different formats. [#2084] - When using Astropy 7.0+, the
PSFPhotometryandIterativePSFPhotometryfitterobject now modifies the PSF model in place instead of creating a copy, improving performance and significantly reducing memory usage in some cases. [#2093] PSFPhotometryandIterativePSFPhotometrynow return a reduced chi-squared statistic (reduced_chi2column in the results table). [#2086]- The PSF photometry classes now use a dynamically generated "flat" model instead of a compound model for grouped sources. This eliminates recursion limits and significantly reduces memory usage for large groups. [#2100]
photutils.segmentation- An optional
arraykeyword was added to theSourceCatalogmake_cutoutsmethod. [#2023] - Added a
groupkeyword to theSegmentationImageto_regionsmethod. [#2060, #2065] - Added a
decode_psf_flagsutility function for decoding PSF photometry bit flags. [#2090] - Added a
PSF_FLAGSobject to hold all PSF photometry bit flags in one place. PSF_FLAGS provides readable, named constants for each bit flag and helper utilities for decoding bit flags. [#2091]
- An optional
photutils.centroids- Fixed an issue with the initial Gaussian theta units in
centroid_2dg. [#2013] - Fixed a corner-case issue where zero-sum arrays with ndim > 2 input
to
centroid_comwould return only two np.nan coordinates instead of matching the dimensionality of the input array. [#2045]
- Fixed an issue with the initial Gaussian theta units in
photutils.datasets- Fixed a bug in
make_model_imagewhere the output image would not have units in the case where the input params had units and none of the models overlapped the image shape. [#2082] - Fixed a bug in
make_model_imagewhere an error would be raised if any row in the input parameters table contained non-finite model parameters. Such sources are now silently ignored. [#2083]
- Fixed a bug in
photutils.psf- Fixed a bug in
fit_2dgaussianandfit_fwhmwhere the fit would fail if there were NaN values in the input data. [#2030] - Fixed the check in
GriddedPSFModelfor rectangular pixel grids. [#2035] - Fixed a bug in
PSFPhotometrywhere the'group_id'column would be ignored if included in theinit_paramstable. [#2070] - Fixed a bug in
PSFPhotometrywhere the outputflux_errcolumn would not have units if the input data had units and the flux model parameter was fixed in value. [#2072] - Fixed a bug in
PSFPhotometryandIterativePSFPhotometrywhere an error would be raised if the x or y columns ininit_paramshad units. [#2079] - Fixed a bug in
PSFPhotometryandIterativePSFPhotometryfor the boundary conditions where flag=2 would be set. [#2080] - Fixed a bug in
EPSFBuilderwhere the output PSF would have the wrong shape if the inputstarswere non-square cutouts. [#2089, #2092] - Fixed a bug in the calculation of the
PSFPhotometryandIterativePSFPhotometryqfitandcfitto not include the fit weights. [#2099]
- Fixed a bug in
photutils.segmentation- Fixed an issue where a newly-defined extra property of a
SourceCatalogwithoverwrite=Truewould not be added to theextra_propertiesattribute. [#2039] - Fixed an issue where the
SegmentationImagesegmentsattribute would fail if any source segment was non-contiguous. [#2060]
- Fixed an issue where a newly-defined extra property of a
photutils.background- An explicit
ValueErroris now raised if the inputdatatoBackground2Dcontains all non-finite values. [#2062]
- An explicit
photutils.psf- The
GriddedPSFModeldataandgrid_xyposattributes are now read-only. [#2036] - The
PSFPhotometryfit_paramattribute is now deprecated. Use the newresults_to_init_paramsmethod instead. [#2084] - The deprecated
PSFPhotometryfit_resultsattribute has been removed. [#2084]
- The
photutils.segmentation- The
SegmentationImagepolygonslist may now include either ShapelyPolygonorMultiPolygon(non-contiguous) objects. [#2060] - The
SegmentationImageto_patchesandplot_patchesmethods now returnmatplotlib.patches.PathPatchobjects. [#2060] - The
SegmentationImageto_regionsmethod now returnsPolygonPixelRegionregions that have the segment label stored in the objectmetadictionary. [#2060]
- The
photutils.aperture- Add an
aperture_to_regionfunction to convert an Aperture object to an astropyRegionorRegionsobject. [#2009]
- Add an
photutils.profiles- Added
data_radiusanddata_profileattributes to theRadialProfileclass for calculating the raw radial profile. [#2001]
- Added
photutils.segmentation- Added a
to_regionsmethod toSegmentationImagethat converts the segment outlines to aregions.Regionsobject. [#2010]
- Added a
photutils.segmentation- Fixed an issue where the
SegmentationImagepolygonsattribute would raise an error if any source segment contained a hole. [#2005]
- Fixed an issue where the
photutils.aperture- The
thetaattribute ofEllipticalAperture,EllipticalAnnulus,RectangularAperture, andRectangularAnnulusis now always returned as an angularQuantity. [#2008]
- The
- The minimum required Python is now 3.11. [#1958]
- The minimum required gwcs is now 0.20. [#1961]
photutils.aperture- The
aperture_photometryoutput table will now include asky_centercolumn ifwcsis input, even if the input aperture is not a sky aperture. [#1965]
- The
photutils.datasets- A
params_mapkeyword was added tomake_model_imageto allow a custom mapping between model parameter names and column names in the parameter table. [#1994]
- A
photutils.detection- The
find_peaksborder_widthkeyword can now accept two values, indicating the border width along the y and x edges, respectively. [#1957]
- The
photutils.morphology- An optional
maskkeyword was added to theginifunction. [#1979]
- An optional
photutils.segmentation- Added
deblended_labels,deblended_labels_map, anddeblended_labels_inverse_mapproperties toSegmentationImageto identify and map any deblended labels. [#1988]
- Added
photutils.segmentation- Fixed a bug where the table output from the
SourceCatalogto_tablemethod could have column names with anp.str_representation instead ofstrrepresentation when using NumPy 2.0+. [#1956] - Fixed a bug to ensure that the dtype of the
SegmentationImagelabelsalways matches the image dtype. [#1986] - Fixed an issue with the source labels after source deblending when
using
relabel=False. [#1988]
- Fixed a bug where the table output from the
photutils.aperture- The
xcenterandycentercolumns in the table returned byaperture_photometryno longer have (pixel) units for consistency with other tools. [#1993]
- The
photutils.detection- When
exclude_borderis set toTruein theDAOStarFinderandStarFinderclasses, the excluded border region can be different along the x and y edges if the kernel shape is rectangular. [#1957] - Detected sources that match interval ends for sharpness, roundness, and
maximum peak values (
sharplo,sharphi,roundlo,roundhi, andpeakmax) are now included in the returned table of detected sources byDAOStarFinderandIRAFStarFinder. [#1978] - Detected sources that match the maximum peak value (
peakmax) are now included in the returned table of detected sources byStarFinder. [#1990]
- When
photutils.morphology- The
ginifunction now returns zero instead of NaN if the (unmasked) data values sum to zero. [#1979]
- The
photutils.psf- The
'viridis'color map is now the default in theGriddedPSFModelplot_gridmethod whendeltas=True. [#1954] - The
GriddedPSFModelplot_gridcolor bar now matches the height of the displayed image. [#1955]
- The
- Due to an upstream bug in
bottleneckwithfloat32arrays,bottlenecknan-functions are now used internally only forfloat64arrays. Performance may be impacted for computations involving arrays with dtype other thanfloat64. Affected functions are used in theaperture,background,detection,profiles,psf, andsegmentationsubpackages. This change has no impact ifbottleneckis not installed. photutils.background- Fixed a bug in
Background2Dwhere an error would be raised when using theBkgIDWInterpolatorinterpolator 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=Truewhere 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
SExtractorBackgroundwhere the dimensionality of the returned value would not be preserved if the output was a single value. [#1934] - Fixed an issue in
Background2Dwhere if thebox_sizeequals the input array shape, the input data array could be modified. [#1935]
- Fixed a bug in
- The
regionspackage 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.matchinginstead ofphotutils.psf. [#1879, #1904]
photutils.aperture- The metadata in the tables generated by
aperture_photometryandApertureStatsnow include the aperture name and shape parameters. [#1849] aperture_photometryandApertureStatsnow accept supportedregions.Regionobjects, i.e., those corresponding to circular, elliptical, and rectangular apertures. [#1813, #1852]- A new
region_to_apertureconvenience function has been added to convert supportedregions.Regionobjects toApertureobjects. [#1813, #1852]
- The metadata in the tables generated by
photutils.background- The
Background2Dclass has been refactored to significantly reduce its memory usage. In some cases, it is also significantly faster. [#1870, #1872, #1873] - A new
npixels_meshproperty was added toBackground2Dthat gives a 2D array of the number of pixels used to compute the statistics in the low-resolution grid. [#1870] - A new
npixels_mapproperty was added toBackground2Dthat 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.centroidsQuantityarrays can now be input tocentroid_1dgandcentroid_2dg. [#1861]
photutils.datasets- Added a new
params_table_to_modelsfunction to create a list of models from a table of model parameters. [#1896]
- Added a new
photutils.psf- Added new
xy_boundskeyword toPSFPhotometryandIterativePSFPhotometryto allow one to bound the x and y model parameters during the fitting. [#1805] - The
extract_starsfunction can now acceptNDDatainputs with uncertainty types other thanweights. [#1821] - Added new
GaussianPSF,CircularGaussianPSF,GaussianPRF,CircularGaussianPRF, andMoffatPSFPSF model classes. [#1838, #1898, #1918] - Added new
AiryDiskPSFPSF model class. [#1843, #1918] - Added new
CircularGaussianSigmaPRFPSF model class. [#1845, #1918] - The
IntegratedGaussianPRFmodel now supports units. [#1838] - A new
resultsattribute was added toPSFPhotometryto store the returned table of fit results. [#1858] - Added new
fit_fwhmconvenience 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_2dgaussianconvenience function to fit a circular 2D Gaussian PSF to one or more sources in an image. [#1859, #1887, #1899] - Added new
ImagePSFmodel class to represent a PSF model as an image. [#1890] - The
GriddedPSFModelmodel now has abounding_boxmethod to return the bounding box of the model. [#1891] - The
GriddedPSFModelclass 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_sourcesandSourceFinder. [#1924, #1925, #1926] - Improved the accuracy of the progress bar in
deblend_sourcesandSourceFinderwhen 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
subpixelskeyword is a strictly positive integer. [#1816]
- Fixed a bug checking that the
photutils.datasets- Fixed an issue in
make_model_imagewhere if thebbox_factorwas input and the model bounding box did not have afactorkeyword then an error would be raised. [#1921]
- Fixed an issue in
photutils.detection- Fixed an issue where
DAOStarFinderwould not return any sources if the inputthresholdwas set to zero due to thefluxbeing non-finite. [#1882]
- Fixed an issue where
photutils.isophote- Fixed a bug in
build_ellipse_modelwhere 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_modelwhere if the input model had amplitude units, an error would be raised. [#1894]
- Fixed a bug in
- The
sklearnversion information has been removed from the meta attribute in output tables.sklearnwas removed as an optional dependency in 1.13.0. [#1807] photutils.background- The
Background2Dbackground_meshandbackground_rms_meshproperties will have units if the input data has units. [#1870] - The
Background2Dedge_methodkeyword is now deprecated. Whenedge_methodis eventually removed, the'pad'option will always be used. [#1870] - The
Background2Dbackground_mesh_masked,background_rms_mesh_masked, andmesh_nmaskedproperties are now deprecated. [#1870] - To reduce memory usage,
Background2Dno longer keeps a cached copy of the returnedbackgroundandbackground_rmsproperties. [#1870] - The
Background2Ddata,mask,total_mask,nboxes,box_npixels, andnboxes_totattributes have been removed. [#1870] - The
BkgZoomInterpolatorgrid_modekeyword is now deprecated. Whengrid_modeis eventually removed, the True option will always be used. [#1870] - The
Background2Dbackground,background_rms,background_mesh, andbackground_rms_meshproperties now have the samedtypeas the input data. [#1922]
- The
photutils.centroids- For consistency with other fitting functions (including PSF
fitting), the
centroid_1dgandcentroid_2dgfunctions 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_1dgandcentroid_2dgwas changed fromLevMarLSQFittertoTRFLSQFitter.LevMarLSQFitteruses 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
makemodule 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_imagehdufunctions have been removed. [#1884]
- The deprecated
photutils.detection- The deprecated
skykeyword inDAOStarFinderandIRAFStarFinderhas been removed. Also, there will no longer be askycolumn in the output table. [#1884] - The
DAOStarFinderfluxandmagcolumns were changed to give sensible values. Previously, thefluxvalue 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_magcolumn was added for comparison to the original IRAF DAOFIND algorithm. [#1885]
- The deprecated
photutils.isophote- The
build_ellipse_modelfunction now raises aValueErrorif the inputisolistis empty. [#1809]
- The
photutils.profiles- The fitter used in
RadialProfileto fit the profile with a Gaussian was changed fromLevMarLSQFittertoTRFLSQFitter.LevMarLSQFitteruses the legacy SciPy functionscipy.optimize.leastsq, which is no longer recommended. [#1899]
- The fitter used in
photutils.psf- The
IntegratedGaussianPRFclass now must be initialized using keyword-only arguments. [#1838] - The
IntegratedGaussianPRFclass has been moved to the newfunctional_modelsmodule. [#1838] - The
modelsandgriddedpsfmodelmodules have been renamed toimage_modelsandgridded_models, respectively. [#1838] - The
IntegratedGaussianPRFmodel class has been renamed toCircularGaussianPRF.IntegratedGaussianPRFis now deprecated. [#1845] - Some PSF tools have moved to new modules. The
PRFAdapterclass and themake_psf_modelandgrid_from_epsfsfunctions have been moved to the newmodel_helpersmodule. Themake_psf_model_imagefunction has been moved to the newsimulationsmodule. It is recommended that all of these tools be imported fromphotutils.psfwithout using the submodule name. [#1854, #1901] - The
PSFPhotometryfit_resultsattribute has been renamed tofit_info.fit_resultsis now deprecated. [#1858] - The
PRFAdapterclass has been deprecated. Instead, use aImagePSFmodel derived from thediscretize_modelfunction inastropy.convolution. [#1865] - The
FittableImageModelandEPSFModelclasses have been deprecated. Instead, use the newImagePSFmodel class. [#1890] - The default fitter for
PSFPhotometry,IterativePSFPhotometry, andEPSFFitterwas changed fromLevMarLSQFittertoTRFLSQFitter.LevMarLSQFitteruses the legacy SciPy functionscipy.optimize.leastsq, which is no longer recommended. [#1899] psf_shapeis now an optional keyword in themake_model_imageandmake_residual_imagemethods ofPSFPhotometryandIterativePSFPhotometry. 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.matchinginstead ofphotutils.psf. [#1904]
- PSF matching tools must now be imported from
photutils.segmentation- The
SegmentationImagerelabel_consecutive,resassign_label(s),keep_label(s),remove_label(s),remove_border_labels, andremove_masked_labelsmethods now keep the original dtype of the segmentation image instead of always changing it toint(int64). [#1878, #1923] - The
detect_sourcesanddeblend_sourcesfunctions now return aSegmentationImageinstance whose data dtype isnp.int32instead ofint(int64) unless more than (2**32 - 1) labels are needed. [#1878]
- The
scikit-learnhas been removed as an optional dependency. [#1774]
photutils.datasets- Added a
make_model_imagefunction for generating simulated images with model sources. This function has more options and is significantly faster than the now-deprecatedmake_model_sources_imagefunction. [#1759, #1790] - Added a
make_model_paramsfunction to make a table of randomly generated model positions, fluxes, or other parameters for simulated sources. [#1766, #1796]
- Added a
photutils.detection- The
find_peaksfunction now supports input arrays with units. [#1743] - The
Tablereturned fromfind_peaksnow has anidcolumn that contains unique integer IDs for each peak. [#1743] - The
DAOStarFinder,IRAFStarFinder, andStarFinderclasses now support input arrays with units. [#1746]
- The
photutils.profiles- Added an
unnormalizemethod toRadialProfileandCurveOfGrowthto return the profile to the state before anynormalizecalls were run. [#1732] - Added
calc_ee_from_radiusandcalc_radius_from_eemethods toCurveOfGrowth. [#1733]
- Added an
photutils.psf- Added an
include_localbkgkeyword to theIterativePSFPhotometrymake_model_imageandmake_residual_imagemethods. [#1756] - Added "x_fit", "xfit", "y_fit", "yfit", "flux_fit", and "fluxfit" as
allowed column names in the
init_paramstable input to the PSF photometry objects. [#1765] - Added a
make_psf_model_imagefunction to generate a simulated image from PSF models. [#1785, #1796] PSFPhotometrynow has a newfit_paramsattribute containing a table of the fit model parameters and errors. [#1789]- The
PSFPhotometryandIterativePSFPhotometryinit_paramstable 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
ApertureStatswhere in very rare cases thecovariancecalculation 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_maskpassed toBackground2D. [#1729]
- No longer warn about NaNs in the data if those NaNs are masked in
photutils.psf- Fixed an issue where
IterativePSFPhotometrywould fail if the input data was aQuantityarray. [#1746] - Fixed the
IntegratedGaussianPRFclassbounding_boxlimits to always be symmetric. [#1754] - Fixed an issue where
IterativePSFPhotometrycould sometimes issue a warning when merging tables ifmode='all'. [#1761] - Fixed a bug where the first matching column in the
init_paramstable was not used inPSFPhotometryandIterativePSFPhotometry. [#1765] - Fixed an issue where
IterativePSFPhotometrycould sometimes raise an error about non-overlapping data. [#1778] - Fixed an issue with unit handling in
PSFPhotometryandIterativePSFPhotometry. [#1792] - Fixed an issue in
IterativePSFPhotometrywhere thefit_resultsattribute was not cleared between repeated calls. [#1793]
- Fixed an issue where
photutils.segmentation- Fixed an issue in
SourceCatalogwhere in very rare cases thecovariancecalculation could take a long time. [#1788]
- Fixed an issue in
- The
photutils.testfunction has been removed. Instead use thepytest --pyargs photutilscommand. [#1725] photutils.datasets- The
photutils.datasetssubpackage has been reorganized and themakemodule has been deprecated. Instead of importing functions fromphotutils.datasets.make, import functions fromphotutils.datasets. [#1726] - The
make_model_sources_imagefunction has been deprecated in favor of the newmake_model_imagefunction. The new function has more options and is significantly faster. [#1759] - The randomly-generated optional noise in the simulated example images
make_4gaussians_imageandmake_100gaussians_imageis now slightly different. The noise sigma is the same, but the pixel values differ. [#1760] - The
make_gaussian_prf_sources_imagefunction is now deprecated. Use themake_model_psf_imagefunction or the newmake_model_imagefunction instead. [#1762] - The
make_gaussian_sources_tablefunction now includes an "id" column and always returns both'flux'and'amplitude'columns. [#1763] - The
make_model_sources_tablefunction now includes an "id" column. [#1764] - The
make_gaussian_sources_tablefunction is now deprecated. Use themake_model_sources_tablefunction instead. [#1764] - The
make_test_psf_datafunction is now deprecated. Use the newmake_model_psf_imagefunction instead. [#1785]
- The
photutils.detection- The
skykeyword inDAOStarFinderandIRAFStarFinderis 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.psfPSFPhotometryandIterativePSFPhotometrynow raise aValueErrorif the inputpsf_modelis not two-dimensional withn_inputs=2andn_outputs=1. [#1741]- The
IntegratedGaussianPRFclassbounding_boxis now a method instead of an attribute for consistency with Astropy models. The method has afactorkeyword to scale the bounding box. The default scale factor is 5.5 timessigma. [#1754] - The
IterativePSFPhotometrymake_model_imageandmake_residual_imagemethods no longer include the local background by default. This is a backwards-incompatible change. If the previous behavior is desired, setinclude_localbkg=True. [#1756] IterativePSFPhotometrywill now only issue warnings after all iterations are completed. [#1767]- The
IterativePSFPhotometrypsfphotattribute has been removed. Instead, use thefit_resultsattribute, which contains a list ofPSFPhotometryinstances for each fit iteration. [#1771] - The
group_sizecolumn has been moved to come immediately after thegroup_idcolumn in the output table fromPSFPhotometryandIterativePSFPhotometry. [#1772] - The
PSFPhotometryinit_paramstable was moved from thefit_resultsdictionary to an attribute. [#1773] - Removed
local_bkg,psfcenter_indices,fit_residuals,npixfit, andnmodelskeys from thePSFPhotometryfit_resultsdictionary. [#1773] - Removed the deprecated
BasicPSFPhotometry,IterativelySubtractedPSFPhotometry,DAOPhotPSFPhotometry,DAOGroup,DBSCANGroup, andGroupStarsBase, andNonNormalizableclasses and theprepare_psf_model,get_grouped_psf_model, andsubtract_psffunctions. [#1774] - A
ValueErroris now raised if the shape of theerrorarray does not match thedataarray when calling the PSF-fitting classes. [#1777] - The
fit_param_errskey was removed from thePSFPhotometryfit_resultsdictionary. The fit parameter errors are now stored in thefit_paramstable. [#1789] - The
cfitcolumn in thePSFPhotometryandIterativePSFPhotometryresult 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
maskpassed toBackground2D. [#1712]
- No longer warn about NaNs in the data if those NaNs are masked in
photutils.utils- The default value for the
ImageDepthmask_padkeyword is now set to 0. [#1714]
- The default value for the
photutils.psf- An
init_paramstable is now included in thePSFPhotometryfit_resultsdictionary. [#1681] - Added an
include_localbkgkeyword to thePSFPhotometrymake_model_imageandmake_residual_imagemethods. [#1691] - Significantly reduced the memory usage of PSF photometry when using
a
GriddedPSFModelPSF model. [#1679] - Added a
modekeyword toIterativePSFPhotometryfor controlling the fitting mode. [#1708]
- An
photutils.datasets- Improved the performance of
make_test_psf_datawhen generating random coordinates with a minimum separation. [#1668]
- Improved the performance of
photutils.segmentation- The
SourceFindernpixelskeyword 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
ImageDepthwhen generating random coordinates with a minimum separation. [#1668]
- Improved the performance of
photutils.psf- Fixed an issue where PSF models produced by
make_psf_modelwould raise an error withPSFPhotometryif the fit did not converge. [#1672] - Fixed an issue where
GriddedPSFModelfixed 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.aperturePixelApertureinstances now raise an informative error message whenpositionsis input as azipobject containing AstropyQuantityobjects. [#1682]
photutils.psf- The
GridddedPSFModelstring representations now include the modelflux,x_0, andy_0parameters. [#1680] - The
PSFPhotometrymake_model_imageandmake_residual_imagemethods 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_resultsattribute is now returned as aQTableinstead of a list ofQTable. [#1704] - Deprecated the
NonNormalizablecustom warning class in favor ofAstropyUserWarning. [#1710]
- The
photutils.segmentation- The
SourceCatalogget_labelandget_labelsmethods now raise aValueErrorif any of the input labels are invalid. [#1694]
- The
- The minimum required Astropy is now 5.1. [#1627]
photutils.datasets- Added a
border_sizekeyword 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_separationkeyword toDAOStarFinderandIRAFStarFinder. [#1663]
- Added a
photutils.morphology- Added a
wcskeyword todata_properties. [#1648]
- Added a
photutils.psf- The
GriddedPSFModelplot_gridmethod now returns amatplotlib.figure.Figureobject. [#1653] - Added the ability for the
GriddedPSFModelreadmethod to read FITS files generated by WebbPSF. [#1654] - Added "flux_0" and "flux0" as allowed flux column names in the
init_paramstable input to the PSF photometry objects. [#1656] - PSF models output from
prepare_psf_modelcan now be input into the PSF photometry classes. [#1657] - Added
make_psf_modelfunction for making a PSF model from a 2D Astropy model. Compound models are also supported. [#1658] - The
GriddedPSFModeloversampling can now be different in the x and y directions. Theoversamplingattribute is now stored as a 1Dnumpy.ndarraywith two elements. [#1664]
- The
photutils.segmentation- The
SegmentationImagemake_source_maskmethod now uses a much faster implementation of binary dilation. [#1638] - Added a
scalekeyword to theSegmentationImage.to_patches()method to scale the sizes of the polygon patches. [#1641, #1646] - Improved the
SegmentationImageimshowmethod to ensure that labels are plotted with unique colors. [#1649] - Added a
imshow_mapmethod toSegmentationImagefor plotting segmentation images with a small number of non-consecutive labels. [#1649] - Added a
reset_cmapmethod toSegmentationImagefor 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
plotmethod**kwargswere not reset to the default values when called multiple times. [#1655]
- Fixed an issue where the aperture
photutils.psf- Fixed a bug where
SourceGrouperwould fail if only one source was input. [#1617] - Fixed a bug in
GriddedPSFModelplot_gridwhere the grid could be plotted incorrectly if the inputxygridwas not sorted in y then x order. [#1661]
- Fixed a bug where
photutils.segmentation- Fixed an issue where
deblend_sourcesandSourceFinderwould raise an error if thecontrastkeyword was set to 1 (meaning no deblending). [#1636] - Fixed an issue where the vertices of the
SegmentationImagepolygonswere 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_modelfunction. Use the newmake_psf_modelfunction instead. [#1658] - The
GriddedPSFModelnow stores the ePSF grid such that it is first sorted by y then by x. As a result, the order of thedataandxygridattributes may be different. [#1661] - The
oversamplingattribute is now stored as a 1Dnumpy.ndarraywith two elements. [#1664] - A
ValueErroris raised ifGriddedPSFModelis called with x and y arrays that have more than 2 dimensions. [#1662]
- Deprecated the
photutils.segmentation- Removed the deprecated
kernelkeyword 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
LocalBackgroundclass for computing local backgrounds in a circular annulus aperture. [#1556]
- Added
photutils.datasets- Added new
make_test_psf_datafunction. [#1558, #1582, #1585]
- Added new
photutils.psf- Propagate measurement uncertainties in PSF fitting. [#1543]
- Added new
PSFPhotometryandIterativePSFPhotometryclasses for performing PSF-fitting photometry. [#1558, #1559, #1563, #1566, #1567, #1581, #1586, #1590, #1594, #1603, #1604] - Added a new
SourceGrouperclass. [#1558, #1605] - Added a
GriddedPSFModelfill_valueattribute. [#1583] - Added a
grid_from_epsfsfunction to make aGriddedPSFModelfrom ePSFs. [#1596] - Added a
readmethod toGriddedPSFModelfor reading "STDPSF" FITS files containing grids of ePSF models. [#1557] - Added a
plot_gridmethod toGriddedPSFModelfor plotting ePSF grids. [#1557] - Added a
STDPSFGridclass 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
PixelAperturepositions. [#1553]
- Fixed a bug in the validation of
photutils.psf- Deprecated the PSF photometry classes
BasicPSFPhotometry,IterativelySubtractedPSFPhotometry, andDAOPhotPSFPhotometry. Use the newPSFPhotometryorIterativePSFPhotometryclass instead. [#1578] - Deprecated the
DAOGroup,DBSCANGroup, andGroupStarsBaseclasses. Use the newSourceGrouperclass instead. [#1578] - Deprecated the
get_grouped_psf_modelandsubtract_psffunction. [#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
RadialProfileandCurveOfGrowthradial 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
axeskeyword in favor ofaxfor consistency with other packages. [#1523] photutils.aperture- Removed the
ApertureStatsunpack_nddatamethod. [#1537]
- Removed the
photutils.profiles- The API for defining the radial bins for the
RadialProfileandCurveOfGrowthclasses 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
kernelkeyword fromdetect_sourcesanddeblend_sources. [#1524] - Deprecated the
kernelkeyword inSourceCatalog. [#1525] - Removed the deprecated
outline_segmentsmethod fromSegmentationImage. [#1526] - The
SourceCatalogkron_paramsattribute is no longer returned as andarray. It is returned as atuple. [#1531]
- Removed the deprecated
- The
rasterioandshapelypackages are now optional dependencies. [#1509]
photutils.aperture- Significantly improved the performance of
aperture_photometryand thePixelAperturedo_photometrymethod for large arrays. [#1485] - Significantly improved the performance of the
PixelAperturearea_overlapmethod, especially for large arrays. [#1490]
- Significantly improved the performance of
photutils.profiles- Added a new
profilessubpackage containingRadialProfileandCurveOfGrowthclasses. [#1494, #1496, #1498, #1499]
- Added a new
photutils.psf- Significantly improved the performance of evaluating and fitting
GriddedPSFModelinstances. [#1503]
- Significantly improved the performance of evaluating and fitting
photutils.segmentation- Added a
sizekeyword to theSegmentationImagemake_source_maskmethod. [#1506] - Significantly improved the performance of
SegmentationImagemake_source_maskwhen using square footprints for source dilation. [#1506] - Added the
polygonsproperty andto_patchesandplot_patchesmethods toSegmentationImage. [#1509] - Added
polygonkeyword to theSegmentclass. [#1509]
- Added a
photutils.centroids- Fixed an issue where
centroid_quadraticwould 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=Trueand 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
ImageCutoutxyoriginwhen 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
ApertureStatslocal_bkgkeyword can now be broadcast for apertures with multiple positions. [#1504]
- The
photutils.centroids- The
centroid_sourcesfunction will now raise an error if the cutout mask contains allTruevalues. [#1516]
- The
photutils.datasets- Removed the deprecated
load_fermi_imagefunction. [#1479]
- Removed the deprecated
photutils.psf- Removed the deprecated
sandboxclassesDiscretePRFandReproject. [#1479]
- Removed the deprecated
photutils.segmentation- Removed the deprecated
make_source_maskfunction in favor of theSegmentationImage.make_source_maskmethod. [#1479] - The
SegmentationImageimshowmethod now uses "nearest" interpolation instead of "none" to avoid rendering issues with some backends. [#1507] - The
repr()notebook output for theSegmentclass now includes a SVG polygon representation of the segment if therasterioandshapelypackages are installed. [#1509] - Deprecated the
SegmentationImageoutline_segmentsmethod. Use theplot_patchesmethod 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
ApertureStatsclass now accepts astropyNDDataobjects 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
subshapekeyword to the PSF-fitting classes to define the shape over which the PSF is subtracted. [#1477]
photutils.segmentation- Added the ability to slice
SegmentationImageobjects. [#1413] - Added
modeandfill_valuekeywords toSourceCatalogmake_cutoutsmethod. [#1420] - Added
segment_areasource property andwcs,localbkg_width,apermask_method, andkron_paramsattributes toSourceCatalog. [#1425] - Added the ability to use
Quantityarrays 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_baroption toSourceCatalogfor displaying progress bars when calculating some source properties. [#1471]
- Added the ability to slice
photutils.utils- Added
xyoriginattribute toCutoutImage. [#1419] - Added
ImageDepthclass. [#1434]
- Added
photutils.aperture- Fixed a bug in the
PixelAperturearea_overlapmethod so that the returned value does not inherit the data units. [#1408] - Fixed an issue in
ApertureStatsget_idsfor 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
loadfunctions where FITS files were not closed. [#1455]
- Fixed a bug in the various
photutils.segmentation- Fixed an issue in the
SourceCatalogkron_photometry,make_kron_apertures, andplot_kron_aperturesmethods 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
SourceCatalogplot_kron_aperturesmethod would raise an error for a scalarSourceCatalog. [#1421] - Fixed an issue in
SourceCatalogget_labelsfor the case when the labels are not sorted (due to slicing). [#1423]
- Fixed an issue in the
- Deprecated
axeskeyword in favor ofaxfor consistency with other packages. [#1432] - Importing tools from all subpackages now requires including the subpackage name.
photutils.aperture- Inputting
PixelAperturepositions as an AstropyQuantityin pixel units is no longer allowed. [#1398] - Inputting
SkyApertureshape parameters as an AstropyQuantityin pixel units is no longer allowed. [#1398] - Removed the deprecated
BoundingBoxas_patchmethod. [#1462]
- Inputting
photutils.centroids- Removed the deprecated
oversamplingkeyword incentroid_com. [#1398]
- Removed the deprecated
photutils.datasets- Deprecated the
load_fermi_imagefunction. [#1455]
- Deprecated the
photutils.psf- Removed the deprecated
flux_residual_sigclipkeyword inEPSFBuilder. Usesigma_clipinstead. [#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_sigmaandsigclip_iterskeywords indetect_threshold. Use thesigma_clipkeyword instead. [#1398] - Removed the
mask_value,sigclip_sigma, andsigclip_iterskeywords indetect_threshold. Use themaskorsigma_clipkeywords instead. [#1398] - Removed the deprecated the
filter_fwhmandfilter_sizekeywords inmake_source_mask. Use thekernelkeyword instead. [#1398] - If
detection_catis 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_catis input, then the inputwcs,apermask_method, andkron_paramskeywords will be ignored. [#1425]
- Removed the deprecated
- Added
tqdmas an optional dependency. [#1364]
photutils.psf- Added a
maskkeyword when calling the PSF-fitting classes. [#1350, #1351] - The
EPSFBuilderprogress bar will usetqdmif the optional package is installed. [#1367]
- Added a
photutils.segmentation- Added
SourceFinderclass, which is a convenience class combiningdetect_sourcesanddeblend_sources. [#1344] - Added a
sigma_clipkeyword todetect_threshold. [#1354] - Added a
make_source_maskmethod toSegmentationImage. [#1355] - Added a
make_2dgaussian_kernelconvenience function. [#1356] - Allow
SegmentationImage.make_cmapbackground_colorto be in any matplotlib color format. [#1361] - Added an
imshowconvenience method toSegmentationImage. [#1362] - Improved performance of
deblend_sources. [#1364] - Added a
progress_barkeyword todeblend_sources. [#1364] - Added a
'sinh'mode todeblend_sources. [#1368] - Improved the resetting of cached
SegmentationImageproperties so that custom (non-cached) attributes can be kept. [#1368] - Added a
nprockeyword to enable multiprocessing indeblend_sourcesandSourceFinder. [#1372] - Added a
make_cutoutsmethod toSourceCatalogfor 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_footprintconvenience function. [#1355] - Added a
CutoutImageclass. [#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
oversamplingkeyword incentroid_comwhen input as a tuple. [#1358] - Deprecated the
oversamplingkeyword 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
sandboxclassesDiscretePRFandReproject. [#1357] - Changed the axes order of
oversamplingkeywords when input as a tuple. [#1358] - Removed the unused
shift_valkeyword inEPSFBuilderandEPSFModel. [#1377] - Renamed the
flux_residual_sigclipkeyword (now deprecated) tosigma_clipinEPSFBuilder. [#1378] - The
EPSFBuilderprogress bar now requires that the optionaltqdmpackage be installed. [#1379] - The tools in the PSF package now require keyword-only arguments. [#1386]
photutils.segmentation- Removed the deprecated
circular_aperturemethod fromSourceCatalog. [#1329] - The
SourceCatalogplot_kron_aperturesmethod now sets a defaultkron_apersvalue. [#1346] deblend_sourcesno longer allows an array to be input as a segmentation image. It must be aSegmentationImageobject. [#1347]SegmentationImageno longer allows array-like input. It must be a numpyndarray. [#1347]- Deprecated the
sigclip_sigmaandsigclip_iterskeywords indetect_threshold. Use thesigma_clipkeyword instead. [#1354] - Deprecated the
make_source_maskfunction in favor of theSegmentationImage.make_source_maskmethod. [#1355] - Deprecated the
kernelkeyword indetect_sourcesanddeblend_sources. Instead, if filtering is desired, input a convolved image directly into thedataparameter. [#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_sourcesis "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
SourceCatalogmake_circular_aperturesandmake_kron_aperturesmethods now return a single aperture (instead of a list with one item) for a scalarSourceCatalog. [#1376] - The
SourceCatalogkron_paramskeyword now has an optional third item representing the minimum circular radius. [#1381] - The
SourceCatalogkron_radiusis 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_cmapnow 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
copymethod toApertureobjects. [#1304] - Added the ability to compare
Apertureobjects for equality. [#1304] - The
thetakeyword forEllipticalAperture,EllipticalAnnulus,RectangularAperture, andRectangularEllipsecan now be an AstropyAngleorQuantityin angular units. [#1308] - Added an
ApertureStatsclass for computing statistics of unmasked pixels within an aperture. [#1309, #1314, #1315, #1318] - Added a
dtypekeyword to theApertureMaskto_imagemethod. [#1320]
- Added a
photutils.background- Added an
alphakeyword to theBackground2D.plot_meshesmethod. [#1286] - Added a
clipkeyword to theBkgZoomInterpolatorclass. [#1324]
- Added an
photutils.segmentation- Added
SegmentationImagecmapattribute containing a default colormap. [#1319] - Improved the performance of
SegmentationImageandSourceCatalog, especially for large data arrays. [#1320] - Added a
convolved_datakeyword toSourceCatalog. This is recommended instead of using thekernelkeyword. [#1321]
- Added
photutils.aperture- Fixed a bug in
aperture_photometrywhere 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
Background2Dwhere using thepadedge 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_sourceswhere settingerror,xpeak, orypeaktoNonewould result in an error. [#1297] - Fixed a bug in
centroid_quadraticwhere inputting a mask would alter the input data array. [#1317]
- Fixed a bug in
photutils.segmentation- Fixed a bug in
SourceCatalogwhere aUFuncTypeErrorwould be raised if the inputdatahad an integerdtype[#1312].
- Fixed a bug in
photutils.aperture- A
ValueErroris now raised if non-positive sizes are input to sky-based apertures. [#1295] - The
BoundingBox.plot()method now returns amatplotlib.patches.Patchobject. [#1305] - Inputting
PixelAperturepositions as an AstropyQuantityin pixel units is deprecated. [#1310] - Inputting
SkyApertureshape parameters as an AstropyQuantityin pixel units is deprecated. [#1310]
- A
photutils.background- Removed the deprecated
background_mesh_maandbackground_rms_mesh_maBackground2Dproperties. [#1280] - By default,
BkgZoomInterpolatorusesclip=Trueto 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_epsfandgaussian1d_momentsfunctions. [#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_propertiesfunction and theSourcePropertiesandLegacySourceCatalogclasses. [#1280] - Removed the deprecated the
filter_kernelkeyword in thedetect_sources,deblend_sources, andmake_source_maskfunctions. [#1280] - A
TypeErroris raised if the input array toSegmentationImagedoes not have integer type. [#1319] - A
SegmentationImagemay contain an array of all zeros. [#1319] - Deprecated the
mask_valuekeyword indetect_threshold. Use themaskkeyword instead. [#1322] - Deprecated the
filter_fwhmandfilter_sizekeywords inmake_source_mask. Use thekernelkeyword 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_sourcesthat are then passed on to thecentroid_funcif supported. [#1276, #1278]
- Extra keyword arguments can be input to
photutils.segmentation- Added
copymethod toSourceCatalog. [#1264] - Added
kron_photometrymethod toSourceCatalog. [#1264] - Added
add_extra_property,remove_extra_property,remove_extra_properties, andrename_extra_propertymethods andextra_propertiesattribute toSourceCatalog. [#1264, #1268] - Added
nameandoverwritekeywords toSourceCatalogcircular_photometryandfluxfrac_radiusmethods. [#1264] SourceCatalogfluxfrac_radiuswas improved for cases where the source flux doesn't monotonically increase with increasing radius. [#1264]- Added
metaandpropertiesattributes toSourceCatalog. [#1268] - The
SourceCatalogoutput table (usingto_table)metadictionary now includes a field for the date/time. [#1268] - Added
SourceCatalogmake_kron_aperturesmethod. [#1268] - Added
SourceCatalogplot_circular_aperturesandplot_kron_aperturesmethods. [#1268]
- Added
photutils.segmentation- If
detection_catalogis input toSourceCatalogthen the detection centroids are used to calculate thecircular_aperture,circular_photometry, andfluxfrac_radius. [#1264] - Units are applied to
SourceCatalogcircular_photometryoutput if the input data has units. [#1264] SourceCatalogcircular_photometryreturns scalar values if catalog is scalar. [#1264]SourceCatalogfluxfrac_radiusreturns aQuantitywith pixel units. [#1264]- Fixed a bug where the
SourceCatalogdetection_catalogwas not indexed/sliced whenSourceCatalogwas indexed/sliced. [#1268] SourceCatalogcircular_photometrynow returns NaN for completely-masked sources. [#1268]SourceCatalogkron_fluxis always NaN for sources wherekron_radiusis NaN. [#1268]SourceCatalogfluxfrac_radiusnow returns NaN ifkron_fluxis zero. [#1268]
- If
photutils.centroids- A
ValueErroris now raised incentroid_sourcesif the inputxposoryposis outside of the inputdata. [#1276] - A
ValueErroris now raised incentroid_quadraticif the inputxpeakorypeakis outside of the inputdata. [#1276] - NaNs are now returned from
centroid_sourceswhere the centroid failed. This is usually due to abox_sizethat is too small when using a fitting-based centroid function. [#1276]
- A
photutils.segmentation- Renamed the
SourceCatalogcircular_aperturemethod tomake_circular_apertures. The old name is deprecated. [#1268] - The
SourceCatalogkron_paramskeyword must have a minimum circular radius that is greater than zero. The default value is now 1.0. [#1268] detect_sourcesnow 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
maskkeyword to thearea_overlapmethod. [#1241]
- Added a
photutils.background- Improved the performance of
Background2Dby up to 10-50% when the optionalbottleneckpackage is installed. [#1232] - Added a
maskedkeyword to the background classesMeanBackground,MedianBackground,ModeEstimatorBackground,MMMBackground,SExtractorBackground,BiweightLocationBackground,StdBackgroundRMS,MADStdBackgroundRMS, andBiweightScaleBackgroundRMS. [#1232] - Enable all background classes to work with
Quantityinputs. [#1233] - Added a
markersizekeyword to theBackground2Dmethodplot_meshes. [#1234] - Added
__repr__methods to all background classes. [#1236] - Added a
grid_modekeyword toBkgZoomInterpolator. [#1239]
- Improved the performance of
photutils.detection- Added a
xycoordskeyword toDAOStarFinderandIRAFStarFinder. [#1248]
- Added a
photutils.psf- Enabled the reuse of an output table from
BasicPSFPhotometryand its subclasses as an initial guess for another photometry run. [#1251] - Added the ability to skip the
group_makerstep by inputing an initial guess table with agroup_idcolumn. [#1251]
- Enabled the reuse of an output table from
photutils.aperture- Fixed a bug when converting between pixel and sky apertures with a
gwcsobject. [#1221]
- Fixed a bug when converting between pixel and sky apertures with a
photutils.background- Fixed an issue where
Background2Dcould fail when using the'pad'edge method. [#1227]
- Fixed an issue where
photutils.detection- Fixed the
DAOStarFinderimport deprecation message. [#1195]
- Fixed the
photutils.morphology- Fixed an issue in
data_propertieswhere a scalar background input would raise an error. [#1198]
- Fixed an issue in
photutils.psf- Fixed an issue in
prepare_psf_modelwhenxnameorynamewasNonewhere 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
SourceCatalogwhere the user-inputmaskwas ignored whenapermask_method='correct'for Kron-related calculations. [#1210] - Fixed an issue in
SourceCatalogwhere thesegmentarray could incorrectly have units. [#1220]
- Fixed an issue in
photutils.utils- Fixed an issue in
ShepardIDWInterpolatorto 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.slicesandPixelAperture.bounding_boxesattributes. [#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, andBiweightScaleBackgroundRMSnow return by default anumpy.ndarraywithnp.nanvalues representing masked pixels instead of a masked array. A masked array can be returned by settingmasked=True. [#1232] - Deprecated the
Background2Dattributesbackground_mesh_maandbackground_rms_mesh_ma. They have been renamed tobackground_mesh_maskedandbackground_rms_mesh_masked. [#1232] - By default,
BkgZoomInterpolatornow 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_momentsandcentroid_epsffunctions. [#1240]
- Deprecated the
photutils.datasets- Removed the deprecated
random_statekeyword in theapply_poisson_noise,make_noise_image,make_random_models_table, andmake_random_gaussians_tablefunctions. [#1244] make_random_models_tableandmake_random_gaussians_tablenow return an astropyQTablewith version metadata. [#1247]
- Removed the deprecated
photutils.detectionDAOStarFinder,IRAFStarFinder, andfind_peaksnow return an astropyQTablewith version metadata. [#1247]- The
StarFinderlabelcolumn was renamed toidfor consistency with the other star finder classes. [#1254]
photutils.isophote- The
Isophoteto_tablemethod nows return an astropyQTablewith version metadata. [#1247]
- The
photutils.psfBasicPSFPhotometry,IterativelySubtractedPSFPhotometry, andDAOPhotPSFPhotometrynow return an astropyQTablewith version metadata. [#1247]
photutils.segmentation- Deprecated the
filter_kernelkeyword in thedetect_sources,deblend_sources, andmake_source_maskfunctions. It has been renamed to simplykernelfor consistency withSourceCatalog. [#1242] - Removed the deprecated
random_statekeyword in themake_cmapmethod. [#1244] - The
SourceCatalogto_tablemethod nows return an astropyQTablewith version metadata. [#1247]
- Deprecated the
photutils.utils- Removed the deprecated
check_random_statefunction. [#1244] - Removed the deprecated
random_statekeyword in themake_random_cmapfunction. [#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.Patchobjects. [#923] - Added an
area_overlapmethod forPixelApertureobjects that gives the overlapping area of the aperture on the data. [#874] - Added a
get_overlap_slicesmethod and acenterattribute toBoundingBox. [#1157] - Added a
get_valuesmethod toApertureMaskthat returns a 1D array of mask-weighted values. [#1158, #1161] - Added
get_overlap_slicesmethod toApertureMask. [#1165]
- The
photutils.background- The
Background2Dclass now accepts astropyNDData,CCDData, andQuantityobjects as data inputs. [#1140]
- The
photutils.detection- Added a
StarFinderclass to detect stars with a user-defined kernel. [#1182]
- Added a
photutils.isophote- Added the ability to specify the output columns in the
IsophoteListto_tablemethod. [#1117]
- Added the ability to specify the output columns in the
photutils.psf- The
EPSFStarsclass is now usable with multiprocessing. [#1152] - Slicing
EPSFStarsnow returns anEPSFStarsinstance. [#1185]
- The
photutils.segmentation- Added a modified, significantly faster,
SourceCatalogclass. [#1170, #1188, #1191] - Added
circular_apertureandcircular_photometrymethods to theSourceCatalogclass. [#1188] - Added
fwhmproperty to theSourceCatalogclass. [#1191] - Added
fluxfrac_radiusmethod to theSourceCatalogclass. [#1192] - Added a
bboxattribute toSegmentationImage. [#1187]
- Added a modified, significantly faster,
photutils.aperture- Slicing a scalar
Apertureobject now raises an informative error message. [#1154] - Fixed an issue where
ApertureMask.multiplyfill_valuewas not applied to pixels outside of the aperture mask, but within the aperture bounding box. [#1158] - Fixed an issue where
ApertureMask.cutoutwould raise an error iffill_valuewas non-finite and the input array was integer type. [#1158] - Fixed an issue where
RectangularAnnuluswith a non-defaulth_inwould 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
EPSFBuildwhere a warning was raised if the inputsmoothing_kernelwas annumpy.ndarray. [#1146] - Fixed a bug that caused photometry to fail on an
EPSFmodelwith multiple stars in a group. [#1135] - Added a fallback
aperture_radiusfor PSF models without a FWHM or sigma attribute, raising a warning. [#740]
- Fixed a bug in
photutils.segmentation- Fixed
SourcePropertieslocal_backgroundto work with Quantity data inputs. [#1162] - Fixed
SourcePropertieslocal_backgroundfor sources near the image edges. [#1162] - Fixed
SourcePropertieskron_radiusfor sources that are completely masked. [#1164] - Fixed
SourcePropertiesKron properties for sources near the image edges. [#1167] - Fixed
SourcePropertiesKron mask correction. [#1167]
- Fixed
photutils.aperture- Deprecated the
BoundingBoxslicesattribute. Use theget_overlap_slicesmethod instead. [#1157]
- Deprecated the
photutils.centroids- Removed the deprecated
fit_2dgaussianfunction andGaussianConst2Dclass. [#1147] - Importing tools from the centroids subpackage without including the subpackage name is deprecated. [#1190]
- Removed the deprecated
photutils.detection- Importing the
DAOStarFinder,IRAFStarFinder, andStarFinderBaseclasses from the deprecatedfindstars.pymodule is now deprecated. These classes can be imported usingfrom photutils.detection import <class>. [#1173] - Importing the
find_peaksfunction from the deprecatedcore.pymodule 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 theSourcePropertieskron_paramskeyword. [#1167] - Deprecated
source_properties,SourceProperties, andLegacySourceCatalog. Use the newSourceCatalogfunction instead. [#1170] - The
detect_thresholdfunction was moved to thesegmentationsubpackage. [#1171] - Removed the ability to slice
SegmentationImage. Instead slice thesegmentsattribute. [#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
Background2Dwhere usingBkgIDWInterpolatorwould 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_parametersinEllipseSample.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_funcinEPSFBuilder, 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=Truewhen no segments remain. [#1133]
photutils.psf- Fixed checks on
oversamplingfactors. [#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-helpersand updated the package infrastructure as described in Astropy APE 17. [#915]
photutils.aperture- Added
b_inas an optional ellipse annulus keyword. [#1070] - Added
h_inas an optional rectangle annulus keyword. [#1070]
- Added
photutils.background- Added
coverage_maskandfill_valuekeyword 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
b4higher-order harmonic coefficient inbuild_ellipse_model. [#1052] - Fixed a bug where
build_ellipse_modelfalls into an infinite loop when the pixel to fit is outside of the image. [#1039] - Fixed a bug where
build_ellipse_modelfalls 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_psfcaused 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_propertieswould fail with unitlessgwcs.wcs.WCSobjects. [#1020]
- Fixed a bug where
photutils.utils- The
effective_gainparameter incalc_total_errorcan 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
unitskeyword inaperture_photometryandPixelAperture.do_photometry. [#953] PrimaryHDU,ImageHDU, andHDUListcan no longer be input toaperture_photometry. [#953]- Removed the deprecated the Aperture
mask_areamethod. [#953] - Removed the deprecated Aperture plot keywords
axandindices. [#953]
photutils.background- Removed the deprecated
axkeyword inBackground2D.plot_meshes. [#953] Background2Dkeyword options can not be input as positional arguments. [#1061]
- Removed the deprecated
photutils.centroidscentroid_1dg,centroid_2dg,gaussian1d_moments,fit_2dgaussian, andGaussianConst2Dhave been moved to a newphotutils.centroids.gaussianmodule. [#1064]- Deprecated
fit_2dgaussianandGaussianConst2D. [#1064]
photutils.datasets- Removed the deprecated
typekeyword inmake_noise_image. [#953] - Renamed the
random_statekeyword (deprecated) toseedinapply_poisson_noise,make_noise_image,make_random_models_table, andmake_random_gaussians_tablefunctions. [#1080]
- Removed the deprecated
photutils.detection- Removed the deprecated
snrkeyword indetect_threshold. [#953]
- Removed the deprecated
photutils.psf- Added
flux_residual_sigclipas an input parameter, allowing for custom sigma clipping options inEPSFBuilder. [#984] - Added
extra_output_colsas a parameter toBasicPSFPhotometry,IterativelySubtractedPSFPhotometryandDAOPhotPSFPhotometry. [#745]
- Added
photutils.segmentation- Removed the deprecated
SegmentationImagemethodscmapandrelabel. [#953] - Removed the deprecated
SourcePropertiesvaluesandcoordsattributes. [#953] - Removed the deprecated
xmin/yminandxmax/ymaxproperties. [#953] - Removed the deprecated
snrandmask_valuekeywords inmake_source_mask. [#953] - Renamed the
random_statekeyword (deprecated) toseedin themake_cmapmethod. [#1080]
- Removed the deprecated
photutils.utils- Removed the deprecated
random_cmap,mask_to_mirrored_num,get_version_info,filter_data, andstd_blocksumfunctions. [#953] - Removed the deprecated
wcs_helpersfunctionspixel_scale_angle_at_skycoord,assert_angle_or_pixel,assert_angle, andpixel_to_icrs_coords. [#953] - Deprecated the
check_random_statefunction. [#1080] - Renamed the
random_statekeyword (deprecated) toseedin themake_random_cmapfunction. [#1080]
- Removed the deprecated
photutils.isophote- Fixed computation of upper harmonics
a3,b3,a4, andb4in 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
IterativelySubtractedPSFPhotometrywhere an error could be thrown when aFinderwas passed which did not returnNoneif no sources were found. [#986] - Fix to
centroid_epsfwhere the wrong oversampling factor was used along the y axis. [#1002]
- Fix to algorithm in
photutils.psf- Fix to
IterativelySubtractedPSFPhotometrywhere the residual image was not initialized whenbkg_estimatorwas not supplied. [#942]
- Fix to
photutils.segmentation- Fixed a labeling bug in
deblend_sources. [#961] - Fixed an issue in
source_propertieswhen the inputdatais aQuantityarray. [#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,unionandintersectionmethods toBoundingBoxclass. [#851] - Added
shapeandisscalarproperties to Aperture objects. [#852] - Significantly improved the performance (~10-20 times faster) of
aperture photometry, especially when using
errorsandQuantityinputs with many aperture positions. [#861] aperture_photometrynow supportsNDDatawithStdDevUncertaintyto input errors. [#866]- The
modekeyword in theto_skyandto_pixelaperture methods was removed to implement the shared WCS interface. All WCS transforms now include distortions (if present). [#899]
photutils.datasets- Added
make_gwcsfunction to create an examplegwcs.wcs.WCSobject. [#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_areaattribute toSegmentationImage. [#825] - Added new
data_maattribute toSegment. [#825] - Added new
SegmentationImagemethods: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_maattributes toSourceProperties. [#858] - Added
__repr__and__str__methods toSourcePropertiesandSourceCatalog. [#858] - Significantly improved the performance of calculating the
background_at_centroidproperty 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
ginisource property representing the Gini coefficient. [#864] - Cached (lazy) properties can now be reset in
SegmentationImagesubclasses. [#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
NoDetectionsWarningclass. [#836]
- Added
photutils.aperture- Fixed an issue where the
ApertureMask.cutoutmethod 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_centercolumn (for sky apertures) would be a length-1 array containing aSkyCoordobject instead of a length-1SkyCoordobject. [#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
EPSFStarregister_epsfandcompute_residual_imagecomputations. [#885] - A ValueError is raised if
aperture_radiusis 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_sourcescould fail for sources with labels that are a power of 2 and greater than 255. [#806] SourcePropertiesandsource_propertieswill no longer raise an exception if a source is completely masked. [#822]- Fixed an issue in
SourcePropertiesandsource_propertieswhere inf values in the data array were not automatically masked. [#822] errorandbackgroundarrays are now always masked identically to the inputdata. [#822]- Fixed the
perimeterproperty to take into account the source mask. [#822] - Fixed the
background_at_centroidsource property to use bilinear interpolation. [#822] - Fixed
SegmentationImageoutline_segmentsto include outlines along the image boundaries. [#825] - Fixed
SegmentationImage.is_consecutiveto returnTrueonly if the labels are consecutive and start with label=1. [#886] - Fixed a bug in
deblend_sourceswhere sources could be deblended too much whenconnectivity=8. [#890] - Fixed a bug in
deblend_sourceswhere thecontrastparameter had little effect if the original segment contained three or more sources. [#890]
- Fixed an issue where
photutils.utils- Fixed a bug in
filter_datawhere units were dropped for dataQuantityobjects. [#872]
- Fixed a bug in
photutils.aperture- Deprecated inputting aperture pixel positions shaped as 2xN. [#847]
- Renamed the
celestial_centercolumn tosky_centerin theaperture_photometryoutput 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
isscalarAperture property. [#852] - Non-scalar Aperture objects can now be indexed, sliced, and iterated. [#852]
- Scalar Aperture objects now return scalar
positionsandbounding_boxesproperties and itsto_maskmethod returns anApertureMaskobject instead of a length-1 list containing anApertureMask. [#852] - Deprecated the Aperture
mask_areamethod. [#853] - Aperture
areais now an attribute instead of a method. [#854] - The Aperture plot keyword
axwas deprecated and renamed toaxes. [#854] - Deprecated the
unitskeyword inaperture_photometryand thePixelAperture.do_photometrymethod. [#866, #861] - Deprecated
PrimaryHDU,ImageHDU, andHDUListinputs toaperture_photometry. [#867] - The
aperture_photometryfunction moved to a newphotutils.aperture.photometrymodule. [#876] - Renamed the
bounding_boxesattribute for pixel-based apertures tobboxfor consistency. [#896] - Deprecated the
BoundingBoxas_patchmethod (instead useas_artist). [#851]
photutils.background- The
Background2Dplot_mesheskeywordaxwas deprecated and renamed toaxes. [#854]
- The
photutils.datasets- The
make_noise_imagetypekeyword was deprecated and renamed todistribution. [#877]
- The
photutils.detection- Removed deprecated
subpixelkeyword forfind_peaks. [#835] DAOStarFinder,IRAFStarFinder, andfind_peaksnow returnNoneif no source/peaks are found. Also, for this case aNoDetectionsWarningis issued. [#836]- Renamed the
snr(deprecated) keyword tonsigmaindetect_threshold. [#917]
- Removed deprecated
photutils.isophote- Isophote central values and intensity gradients are now returned to the output table. [#892]
- The
EllipseSampleupdatemethod now needs to know the fix/fit state of each individual parameter. This can be passed to it via aGeometryinstance, e.g.,update(geometry.fix). [#922]
photutils.psfFittableImageModeland subclasses now allow for differentoversamplingfactors to be specified in the x and y directions. [#834]- Removed
pixel_scalekeyword fromEPSFStar,EPSFBuilder, andEPSFModel. [#815] - Added
oversamplingkeyword tocentroid_com. [#816] - Removed deprecated
Star,Stars, andLinkedStarclasses. [#894] - Removed
recentering_boxsizeandcenter_accuracykeywords and addednorm_radiusandshift_valuekeywords inEPSFBuilder. [#817] - Added
norm_radiusandshift_valuekeywords toEPSFModel. [#817]
photutils.segmentation- Removed deprecated
SegmentationImageattributesdata_masked,max, andis_sequentialand methodsareaandrelabel_sequential. [#825] - Renamed
SegmentationImagemethodscmap(deprecated) tomake_cmapandrelabel(deprecated) toreassign_label. The newreassign_labelmethod gains arelabelkeyword. [#825] - The
SegmentationImagesegmentsandslicesattributes now have the same length aslabels(noNoneplaceholders). [#825] detect_sourcesnow returnsNoneif no sources are found. Also, for this case aNoDetectionsWarningis issued. [#836]- The
SegmentationImageinputdataarray must contain at least one non-zero pixel and must not contain any non-finite values. [#836] - A
ValueErroris raised if an empty list is input intoSourceCatalogor no valid sources are defined insource_properties. [#836] - Deprecated the
valuesandcoordsattributes inSourceProperties. [#858] - Deprecated the unused
mask_valuekeyword inmake_source_mask. [#858] - The
bboxproperty now returns aBoundingBoxinstance. [#863] - The
xmin/yminandxmax/ymaxproperties have been deprecated with the replacements having abbox_prefix (e.g.,bbox_xmin). [#863] - The
orientationproperty is now returned as aQuantityinstance in units of degrees. [#863] - Renamed the
snr(deprecated) keyword tonsigmainmake_source_mask. [#917]
- Removed deprecated
photutils.utils- Renamed
random_cmaptomake_random_cmap. [#825] - Removed deprecated
cutout_footprintfunction. [#835] - Deprecated the
wcs_helpersfunctionspixel_scale_angle_at_skycoord,assert_angle_or_pixel,assert_angle, andpixel_to_icrs_coords. [#846] - Removed deprecated
interpolate_masked_datafunction. [#895] - Deprecated the
mask_to_mirrored_numfunction. [#895] - Deprecated the
get_version_info,filter_data, andstd_blocksumfunctions. [#918]
- Renamed
- Versions of Numpy <1.11 are no longer supported. [#783]
photutils.detectionDAOStarFinderandIRAFStarFindergain two new parameters:brightestto keep the topbrightest(based on the flux) objects in the returned catalog (after all other filtering has been applied) andpeakmaxto exclude sources with peak pixel values larger or equal topeakmax. [#750]- Added a
maskkeyword toDAOStarFinderandIRAFStarFinderthat can be used to mask regions of the input image. [#759]
photutils.psf- The
Star,Stars, andLinkedStarsclasses are now deprecated and have been renamedEPSFStar,EPSFStars, andLinkedEPSFStars, respectively. [#727] - Added a
GriddedPSFModelclass for spatially-dependent PSFs. [#772] - The
pixel_scalekeyword inEPSFStar,EPSFBuilderandEPSFModelis now deprecated. Use theoversamplingkeyword instead. [#780]
- The
photutils.detection- The
find_peaksfunction now returns an emptyastropy.table.Tableinstead of an empty list if the input data is an array of constant values. [#709] - The
find_peaksfunction will no longer issue a RuntimeWarning if the input data contains NaNs. [#712] - If no sources/peaks are found,
DAOStarFinder,IRAFStarFinder, andfind_peaksnow will return an empty table with column names and types. [#758, #762]
- The
photutils.psf- The
photutils.psf.funcs.pymodule was renamedphotutils.psf.utils.py. Theprepare_psf_modelandget_grouped_psf_modelfunctions were also moved to this newutils.pymodule. [#777]
- The
photutils.aperture- If a single aperture is input as a list into the
aperture_photometryfunction, then the output columns will be calledaperture_sum_0andaperture_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_urin theSourceCatalog. [#716]
- Fixed a bug in the computation of
- Updated background and detection functions that call
astropy.stats.SigmaCliporastropy.stats.sigma_clipped_statsto support both theiriters(for astropy < 3.1) andmaxiterskeywords. [#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-astropyis now required to run the test suite. [#702, #703]- The documentation build now uses the Sphinx configuration from
sphinx-astropyrather than fromastropy-helpers. [#702]
photutils.aperture- Added
plotandto_aperturemethods toBoundingBox. [#662] - Added default theta value for elliptical and rectangular apertures. [#674]
- Added
photutils.centroids- Added a
centroid_sourcesfunction to calculate centroid of many sources in a single image. [#656] - An n-dimensional array can now be input into the
centroid_comfunction. [#685]
- Added a
photutils.datasets- Added a
load_simulated_hst_star_imagefunction to load a simulated HST WFC3/IR F160W image of stars. [#695]
- Added a
photutils.detection- Added a
centroid_funckeyword tofind_peaks. Thesubpixelskeyword is now deprecated. [#656] - The
find_peaksfunction now returnsSkyCoordobjects in the table instead of separate RA and Dec. columns. [#656] - The
find_peaksfunction 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 (
EPSFBuilderandEPSFFitter). [#695] - Added
extract_starsfunction to extract cutouts of stars used to build an ePSF. [#695] - Added
EPSFModelclass to hold a fittable ePSF model. [#695]
- Added tools to build and fit an effective PSF (
photutils.segmentation- Added a
maskkeyword to thedetect_sourcesfunction. [#621] - Renamed
SegmentationImagemaxattribute tomax_label.maxis deprecated. [#662] - Added a
Segmentclass to hold the cutout image and properties of single labeled region (source segment). [#662] - Deprecated the
SegmentationImageareamethod. Instead, use theareasattribute. [#662] - Renamed
SegmentationImagedata_maskedattribute todata_ma.data_maskedis deprecated. [#662] - Renamed
SegmentationImageis_sequentialattribute tois_consecutive.is_sequentialis deprecated. [#662] - Renamed
SegmentationImagerelabel_sequentialattribute torelabel_consecutive.relabel_sequentialis deprecated. [#662] - Added a
missing_labelsproperty toSegmentationImage. [#662] - Added a
check_labelsmethod toSegmentationImage. Thecheck_labelmethod is deprecated. [#662]
- Added a
photutils.utils- Deprecated the
cutout_footprintfunction. [#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_sourceswhere in some cases sources with a size less thannpixelscould be returned. [#663] - Fixed an issue in
DAOStarFinderwhere 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_sourceswhen other sources are in the neighborhood. [#617] - Fixed
source_propertiesto handle the case where the data contain one or more NaNs. [#658] - Fixed an issue with
deblend_sourceswhere sources were not deblended where the data contain one or more NaNs. [#658] - Fixed the
SegmentationImageareasattribute to not include the zero (background) label. [#662]
- Fixed
photutils.isophote- Corrected the units for isophote
sareain 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
BoundingBoxclass, 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_skymethod 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_wcsandmake_imagehdufunctions. [#527] - Added new
show_progresskeyword to theload_*functions. [#590]
- Added new
photutils.isophote- Added a new
photutils.isophotesubpackage to provide tools to fit elliptical isophotes to a galaxy image. [#532, #603]
- Added a new
photutils.segmentation- Added a
cmapmethod toSegmentationImageto generate a random matplotlib colormap. [#513] - Added
sky_centroidandsky_centroid_icrssource properties. [#592] - Added new source properties representing the sky coordinates of
the bounding box corner vertices (
sky_bbox_ll,sky_bbox_ulsky_bbox_lr, andsky_bbox_ur). [#592] - Added new
SourceCatalogclass to hold the list ofSourceProperties. [#608] - The
properties_tablefunction 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
ApertureMaskapply()method has been renamed tomultiply(). [#481]. - The
ApertureMaskinput parameter was renamed frommasktodata. [#548] - Removed the
pixelwise_errorskeyword fromaperture_photometry. [#489]
- The
photutils.background- The
Background2Dkeywordsexclude_mesh_methodandexclude_mesh_percentilewere removed in favor of a single keyword calledexclude_percentile. [#544] - Renamed
BiweightMidvarianceBackgroundRMStoBiweightScaleBackgroundRMS. [#547] - Removed the
SigmaClipclass.astropy.stats.SigmaClipis a direct replacement. [#569]
- The
photutils.datasets- The
make_poisson_noisefunction was renamed toapply_poisson_noise. [#527] - The
make_random_gaussiansfunction was renamed tomake_random_gaussians_table. The parameter ranges must now be input as a dictionary. [#527] - The
make_gaussian_sourcesfunction was renamed tomake_gaussian_sources_image. [#527] - The
make_random_modelsfunction was renamed tomake_random_models_table. [#527] - The
make_model_sourcesfunction was renamed tomake_model_sources_image. [#527] - The
unit,hdu,wcs, andwcsheaderkeywords inphotutils.datasetsfunctions were removed. [#527] 'photutils-datasets'was added as an optionallocationin theget_pathfunction. This option is used as a fallback in case the'remote'location (astropy data server) fails. [#589]
- The
photutils.detection- The
daofindandirafstarfinderfunctions were removed. [#588]
- The
photutils.psfIterativelySubtractedPSFPhotometryissues 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_tablefunction now returns aQTable. [#592]
- The
photutils.utils- The
background_colorkeyword was removed from therandom_cmapfunction. [#528] - Deprecated unused
interpolate_masked_data(). [#526, #611]
- The
photutils.segmentation- Fixed
deblend_sourcesso 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
dataandbkg_errorhave 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
Background2Dwithedge_method='pad'that occurred when unequal padding needed to be applied to each axis. [#498] - Fixed issue with
Background2Dthat occurred when zero padding needed to apply along only one axis. [#500]
- Fixed issue with
photutils.geometry- Fixed a bug in
circular_overlap_gridaffecting 32-bit machines that could cause errors circular aperture photometry. [#475]
- Fixed a bug in
photutils.psf- Fixed a bug in how
FittableImageModelrepresents 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
originkeyword to apertureplotmethods. [#395] - Added new
idcolumn toaperture_photometryoutput table. [#446] - Added
__len__method for aperture classes. [#446] - Added new
to_maskmethod toPixelApertureclasses. [#453] - Added new
ApertureMaskclass to generate masks from apertures. [#453] - Added new
mask_area()method toPixelApertureclasses. [#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, andBiweightMidvarianceBackgroundRMSclasses. [#370] - Added
axiskeyword to new background classes. [#392] - Added new
removed_masked,meshpix_threshold, andedge_methodkeywords for the 2D background classes. [#355] - Added new
std_blocksumfunction. [#355] - Added new
SigmaClipclass. [#423] - Added new
BkgZoomInterpolatorandBkgIDWInterpolatorclasses. [#437]
- Added new
photutils.datasets- Added
load_irac_psffunction. [#403]
- Added
photutils.detection- Added new
make_source_maskconvenience function. [#355] - Added
filter_datafunction. [#398] - Added
DAOStarFinderandIRAFStarFinderas OOP interfaces fordaofindandirafstarfinder, respectively, which are now deprecated. [#379]
- Added new
photutils.psf- Added
BasicPSFPhotometry,IterativelySubtractedPSFPhotometry, andDAOPhotPSFPhotometryclasses to perform PSF photometry in crowded fields. [#427] - Added
DAOGroupandDBSCANGroupclasses for grouping overlapping sources. [#369]
- Added
photutils.psf_match- Added
create_matching_kernelandresize_psffunctions. Also, addedCosineBellWindow,HanningWindow,SplitCosineBellWindow,TopHatWindow, andTukeyWindowclasses. [#403]
- Added
photutils.segmentation- Created new
photutils.segmentationsubpackage. [#442] - Added
copyandareamethods and anareasproperty toSegmentationImage. [#331]
- Created new
photutils.aperture- Removed the
effective_gainkeyword fromaperture_photometry. Users must now input the total error, which can be calculated using thecalc_total_errorfunction. [#368] aperture_photometrynow outputs aQTable. [#446]- Renamed
source_idkeyword toindicesin the apertureplot()method. [#453] - Added
maskandunitkeywords to aperturedo_photometry()methods. [#453]
- Removed the
photutils.background- For the background classes, the
filter_shapekeyword was renamed tofilter_size. Thebackground_low_resandbackground_rms_low_resclass attributes were renamed tobackground_meshandbackground_rms_mesh, respectively. [#355, #437] - The
Background2Dmethodandbackfunckeywords have been removed. In its place one can input callable objects via thesigma_clip,bkg_estimator, andbkgrms_estimatorkeywords. [#437] - The interpolator to be used by the
Background2Dclass can be input as a callable object via the newinterpolatorkeyword. [#437]
- For the background classes, the
photutils.centroids- Created
photutils.centroidssubpackage, which contains thecentroid_com,centroid_1dg, andcentroid_2dgfunctions. These functions now return a two-element numpy ndarray. [#428]
- Created
photutils.detection- Changed finding algorithm implementations (
daofindandstarfind) from functional to object-oriented style. Deprecated old style. [#379]
- Changed finding algorithm implementations (
photutils.morphology- Created
photutils.morphologysubpackage. [#428] - Removed
marginalize_data2dfunction. [#428] - Moved
cutout_footprintfromphotutils.morphologytophotutils.utils. [#428] - Added a function to calculate the Gini coefficient (
gini). [#343]
- Created
photutils.psf- Removed the
effective_gainkeyword frompsf_photometry. Users must now input the total error, which can be calculated using thecalc_total_errorfunction. [#368]
- Removed the
photutils.segmentation- Removed the
effective_gainkeyword fromSourcePropertiesandsource_properties. Users must now input the total error, which can be calculated using thecalc_total_errorfunction. [#368]
- Removed the
photutils.utils- Renamed
calculate_total_errortocalc_total_error. [#368]
- Renamed
photutils.aperture- Fixed a bug in
aperture_photometryso that single-row output tables do not return a multidimensional column. [#446]
- Fixed a bug in
photutils.centroids- Fixed a bug in
centroid_1dgandcentroid_2dgthat occurred when the input data contained invalid (NaN or inf) values. [#428]
- Fixed a bug in
photutils.segmentation- Fixed a bug in
SourcePropertieswhereerrorandbackgroundunits 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_coordswhere 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
SegmentationImageslices 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.detectionfind_peaksnow returns an Astropy Table containing the (x, y) positions and peak values. [#240]find_peakshas newmask,error,wcsandsubpixelprecision options. [#244]detect_sourceswill now issue a warning if the filter kernel is not normalized to 1. [#298]- Added new
deblend_sourcesfunction, an experimental source deblender. [#314]
photutils.morphology- Added new
GaussianConst2D(2D Gaussian plus a constant) model. [#244] - Added new
marginalize_data2dfunction. [#244] - Added new
cutout_footprintfunction. [#244]
- Added new
photutils.segmentation- Added new
SegmentationImageclass. [#306] - Added new
check_label,keep_labels, andoutline_segmentsmethods for modifyingSegmentationImage. [#306]
- Added new
photutils.utils- Added new
random_cmapfunction to generate a colormap comprised of random colors. [#299] - Added new
ShepardIDWInterpolatorclass to perform Inverse Distance Weighted (IDW) interpolation. [#307] - The
interpolate_masked_datafunction can now interpolate higher-dimensional data. [#310]
- Added new
photutils.segmentation- The
relabel_sequential,relabel_segments,remove_segments,remove_border_segments, andremove_masked_segmentsfunctions are nowSegmentationImagemethods (with slightly different names). [#306] - The
SegmentPropertiesclass has been renamed toSourceProperties. Likewise, thesegment_propertiesfunction has been renamed tosource_properties. [#306] - The
segment_sumandsegment_sum_errattributes have been renamed tosource_sumandsource_sum_err, respectively. [#306] - The
background_atcentroidattribute has been renamed tobackground_at_centroid. [#306]
- The
photutils.aperture- Fixed an issue where
np.nanornp.infwere not properly masked. [#267]
- Fixed an issue where
photutils.geometryoverlap_area_triangle_unit_circlehandles correctly a corner case in some i386 systems where the area of the aperture was not computed correctly. [#242]rectangular_overlap_gridandelliptical_overlap_gridfixes to normalization of subsampled pixels. [#265]overlap_area_triangle_unit_circlehandles 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.