- The minimum required Python is now 3.12. [#2366]
- The minimum required astropy is now 7.0. [#2401]
- The minimum required SciPy is now 1.15. [#2365]
- The minimum required regions is now 0.10. [#2266]
- The minimum required scikit-image is now 0.25. [#2401]
- The minimum required Matplotlib is now 3.10. [#2401]
- The minimum required gwcs is now 0.22. [#2266]
- The minimum required Shapely is now 2.1. [#2266]
- The minimum required tqdm is now 4.67. [#2266]
- The
asdf-astropypackage is now an optional dependency. [#2211] - SciPy is now also a build-time dependency. Its Cython interface to
the Brent root finder is used by the compiled code that computes the
SourceCatalogflux radii. [#2406] - Added serialization to ASDF for all PSF models. [#2335]
- Added serialization to ASDF for all apertures. [#2341]
- All lazily-computed class attributes now use
functools.cached_propertyinstead of the astropylazypropertydecorator. [#2366]
- Added an ASDF extension to provide converters for photutils aperture and PSF classes. [#2211]
photutils.aperture- Added a new
AperturePhotometryclass, which is now the recommended tool for aperture photometry. It uses a results-object pattern, similar toApertureStats. The class is immutable after construction, so instances are thread-safe and independent frames can be processed concurrently. [#2328, #2331] - Added an
n_threadskeyword toAperturePhotometryandApertureStatsto compute the aperture sums and statistics using multiple threads. The aperture positions are divided into chunks and processed concurrently, producing results identical to the single-threaded computation. [#2367] - Rectangular apertures now support the
method='exact'mask mode. Previously this fell back to a 32x subpixel approximation. [#2291] - Significantly improved the performance of aperture photometry, typically by factors of ~2-25 depending on the aperture shape and overlap method, by computing all sources in a single call into compiled code. The computation also releases the GIL and uses no global state, so aperture photometry can now be parallelized across threads, including on free-threaded Python builds. [#2292]
- Added new
PolygonApertureandSkyPolygonApertureclasses for polygon apertures defined by a fixed shape applied at one or more positions. [#2297] - Added
to_polygonmethods to the circular, elliptical, and rectangular apertures (both pixel and sky variants) to convert them toPolygonApertureorSkyPolygonApertureobjects. [#2298] - Added
segmentation_image,labels, andmask_methodkeywords toAperturePhotometryandApertureStatsto mask or correct the flux from neighboring sources within an aperture using a segmentation map. [#2309, #2321, #2328] - Significantly improved the performance of elliptical, rectangular, and convex polygon aperture photometry, typically by a factor of ~2. [#2310]
- Significantly improved the performance of
ApertureStats, typically by factors of ~5-15 depending on the requested properties, by computing all sources in a single call into compiled code. Sigma-clipped statistics are also computed in compiled code for the commonSigmaClipconfigurations. [#2314] - Added
mean_errandmedian_errproperties toApertureStatsproviding the standard error of the mean and the standard error of the median, respectively, for each aperture. [#2314] - Added a
ddofkeyword toApertureStatsto set the delta degrees of freedom used when computing thevarandstdproperties. The default isddof=0(population variance), andddof=1gives the sample (unbiased) variance. [#2314] - Added per-source bitwise quality flags to aperture photometry and
statistics. The
AperturePhotometryandApertureStatsclasses provide aflagsattribute (and a'flags'column, or'flags_<i>'columns for multiple apertures, in their defaultto_table()output). TheApertureStats.flagsproperty reports conditions from both the "center"-method footprint used by the value statistics and thesum_methodfootprint used by the sum properties. A newdecode_aperture_flagsfunction decodes the flag values into human-readable names, and both classes have adecode_flagsconvenience method that returns a dictionary keyed by aperture position id. [#2327, #2328, #2362, #2379, #2400] - Added validation of the
ApertureStats.to_table()columnskeyword. [#2329] - Improved the performance of the sigma-clipped
ApertureStatsorder statistics (min,max,median),mad_std, and biweight properties. [#2364]
- Added a new
photutils.background- Updated
LocalBackgroundso thatQuantityinput data is supported, consistent with the background estimator classes andBackground2D. The result is aQuantitywith the same unit as the input data. [#2363] - Added an
n_threadskeyword toBackground2Dto compute the box statistics using multiple threads. The results are identical to the single-threaded computation. The underlying sigma-clipping and statistics kernels release the GIL, so multithreading can significantly speed up the background estimation for large images. [#2363] - The
Background2Dn_threadskeyword also multithreads the interpolation of the low-resolution meshes to the full-size maps returned by thebackgroundandbackground_rmsproperties (for the 'reflect' and 'mirror' interpolation boundary modes). The multithreaded maps are identical to the single-threaded maps up to floating-point rounding. [#2365] - Significantly improved the performance of
Background2Dby computing the sigma clipping and the box statistics in a single combined pass in compiled code when thesigma_clip,bkg_estimator, andbkg_rms_estimatorinputs are among the standard supported options. This includes all of the standard photutils background and background RMS estimator classes. The Cython code releases the GIL and composes with then_threadskeyword. Unsupported inputs (e.g., custom estimator callables) fall back to the previous implementation and produce the same results as before. [#2364] - Improved the performance of the background and background RMS
estimator classes when called with
axis=None(the default) and a supportedsigma_clip, by routing the sigma clipping through astropy's fast C implementation. [#2364] - Significantly improved the performance of
LocalBackgroundwhen thebkg_estimatoris a standard photutils estimator class, by computing the local backgrounds for all positions with the batchedApertureStatskernels instead of a Python loop over the apertures. [#2364] - Added an
n_threadskeyword toLocalBackground, passed through to its internalApertureStatscomputation to measure the local backgrounds using multiple threads. The results are identical to the single-threaded computation. [#2367]
- Updated
photutils.detection- Added validation of the
StarFinderCatalogBase.to_table()columnskeyword. This is the base class used by theDAOStarFinder,IRAFStarFinder, andStarFindercatalogs. Thecolumnskeyword now accepts a single string in addition to a list of column names. [#2329]
- Added validation of the
photutils.isophote- Optimized the
build_ellipse_model_cCython extension by adding module-level compiler directives (boundscheck=False,wraparound=False,cdivision=True), using C-contiguous memory views, declaringmath.hfunctions asnogil, and replacing Python function-pointer dispatch with a directif/elsebranch for harmonic corrections. The module is now also marked asfreethreading_compatible=True. [#2293] - Added validation of the
IsophoteList.to_table()columnskeyword. Also restored thenpix_eandnpix_cproperties to thecolumns='all'output. [#2329]
- Optimized the
photutils.profiles- Improved the performance of the profile classes by computing the
aperture photometry and unmasked areas for all radii in a single
batched
AperturePhotometrycall instead of one photometry and one area calculation per radius. Profile construction is now ~3x faster. [#2371] - The profile classes are now thread-safe. All lazily-computed attributes cache raw (unnormalized) values that are immutable once computed. [#2371]
- Improved the performance of the profile classes by computing the
aperture photometry and unmasked areas for all radii in a single
batched
photutils.psf- Improved
GriddedPSFModelevaluation performance by ~20-25% through optimizations that reduce per-evaluation overhead and streamline interpolation calculations. [#2289, #2307] - Added a
STDPSFGrid.grid_shapeproperty returning the(ny, nx)shape of the ePSF grid. [#2347] - Added a
GriddedPSFModel.grid_shapeproperty returning the(ny, nx)shape of the ePSF grid, matching theSTDPSFGridproperty of the same name. It replaces thegrid_shapemetadata key, which has been removed. [#2360] STDPSFGridand theGriddedPSFModelreadmethod now accept path-like inputs (e.g.,pathlib.Path) in addition to strings. [#2355]SourceGroupernow scales to large source lists by computing the connected components of the minimum-separation graph with a KD-tree instead of building a dense pairwise distance matrix. [#2389]- Added an analytic Jacobian (
fit_deriv) toImagePSFandGriddedPSFModel, which allows the fitter to skip the finite-difference Jacobian during PSF fitting. This removes roughly 60% of the model evaluations performed during fitting. [#2393]
- Improved
photutils.segmentation- Added validation of the
SourceCatalog.to_table()columnskeyword. [#2329] SegmentationImageobjects now always have aninfoattribute, a dictionary containing auxiliary information. Segmentation images returned bydeblend_sourcesstore the input labels affected by deblending warnings under'nonposmin_labels'and'n_markers_labels'keys. [#2378]- Added a
get_label_mappingmethod toSegmentationImageto find the mapping of labels to another segmentation image defined on the same pixel grid, e.g., mapping the original (parent) labels to the deblended (child) labels between segmentation images made before and after deblending. [#2382] - Added
SourceCatalogcentroid_err,x_centroid_err,y_centroid_err,centroid_win_err,x_centroid_win_err,y_centroid_win_err,centroid_quad_err,x_centroid_quad_err, andy_centroid_quad_errproperties providing the 1-sigma errors on the isophotal, windowed, and quadratic centroid positions, propagated from the inputerrorarray. [#2397] - Added
SourceCatalogsky_centroid_err,sky_centroid_ra_err,sky_centroid_dec_err, and the correspondingsky_centroid_win_*andsky_centroid_quad_*properties providing the 1-sigma sky position errors in arcsec, computed by transporting the pixel centroid error covariance through the local WCS Jacobian. [#2399] - Added a bitwise quality-flag system for segmentation. A new public
SEGMENTATION_FLAGSregistry anddecode_segmentation_flagsfunction were added.SegmentationImageobjects now have aflagsattribute with per-label flags,deblend_sourcesrecords per-source deblending provenance flags, andSourceCataloghas a newflagsattribute and default table column combining provenance and measurement flags, along with adecode_flagsconvenience method that returns a dictionary keyed by source label. [#2402] - Significantly improved the performance of the
SourceCatalogwindowed centroids, quadratic centroids, Kron radii and photometry,flux_radius,circular_photometry, image moments,perimeter,gini, segment pixel statistics (e.g.,segment_flux,segment_area,area, andmin_value), and the positions of the minimum and maximum pixel values (e.g.,min_value_indexandmax_value_xindex), typically by factors of ~3-20 depending on the property, by computing all sources in a single call into compiled code. Theflagsattribute and the defaultto_table()output are about 5 times faster for large catalogs. No property displays a progress bar any more (see theprogress_bardeprecation under API Changes). [#2406] - Added an
n_threadskeyword toSourceCatalogto compute the compiled per-source measurements (the isophotal moments and their errors, the segment pixel statistics, the windowed and quadratic centroids,perimeter, the Kron radii and photometry,circular_photometry, andflux_radius), and thus every property derived from them, using multiple threads. The sources are divided into chunks that are processed concurrently, producing results identical to the single-threaded computation. [#2407] - Significantly improved the performance of source deblending in
deblend_sourcesandSourceFinder, producing identical results. The multithreshold watershed markers are now built by compiled code. Deblending is typically ~7-30 times faster, both for fields of many small blended sources and for large segments with many markers. [#2408, #2413] - Added an
n_threadskeyword todeblend_sourcesandSourceFinderto deblend the sources using multiple threads. The sources are divided into chunks and processed concurrently, producing results identical to the single-threaded computation. Each chunk is deblended by a few compiled calls that release the GIL, so multithreading speeds up deblending for fields of many small sources as well as for large sources. [#2409, #2413] - Added a
contrast_methodkeyword todeblend_sourcesandSourceFinderto select the flux used by the deblending contrast criterion. The default of None currently resolves to'basin', which preserves the existing behavior (the fraction is the total flux in the source's watershed basin, with iterative removal of below-contrast basins), and may change to'saddle'in version 4.0. The new'saddle'method instead measures the flux a source holds above the saddle level where it separates from its neighbors. [#2411]
- Added validation of the
photutils.utils- Added a new
DeblendWarningclass, a subclass of astropy'sAstropyUserWarning, which is raised bydeblend_sourceswhen the deblending mode is changed to a fallback mode for one or more sources. [#2378]
- Added a new
photutils.aperture- Fixed the local WCS Jacobian computation used by the aperture
to_skyandto_pixelmethods so that it is well-conditioned at the celestial poles and across the RA = 0/360 degree wraparound. [#2286] - Fixed
RectangularAperture,RectangularAnnulus, and their sky counterparts to use the SVD-based ellipseto_skyandto_pixelconversions so that they round-trip correctly with a sheared WCS. [#2286] - Fixed the aperture
to_skyandto_pixelconversions for elliptical and rectangular apertures (and their annulus variants) so that the orientation is correct for a WCS with a flipped parity (e.g., North down, East left). Previously, such apertures were mirrored about the x-axis. [#2288] - Fixed
CircularAnnulus,EllipticalAnnulus, andRectangularAnnulusoverlap masks so that pixel fractions are never negative. Previously, boundary pixels could contain tiny negative values (of order the floating-point epsilon) from subtracting the inner and outer overlaps. [#2314] - Fixed a corner case in
ApertureStatswheresum_aper_areawas NaN whilesumwas finite. When all pixels selected by the "center" method are masked but unmasked boundary pixels still have nonzerosum_methodoverlap fractions, the fractional area of those pixels is now returned, consistent withsum. [#2314] - Fixed the aperture photometry so that the returned flux errors
always have the same length as the fluxes when
erroris not input. Previously, an all-NaN error array was returned only for sources with no overlap with the data. [#2316] - Fixed the elliptical and rectangular apertures (and their annulus
and sky variants) so that reassigning
thetaafter construction updates the aperture geometry. Previously, the rotation angle was computed only once, so the bounding box, aperture mask, and photometry silently continued to use the original angle. [#2348] - Fixed
BoundingBoxso that it can be used in a set or as a dict key. Defining__eq__without__hash__had left the class unhashable. [#2348] - Fixed
PixelAperture.area_overlapso that it no longer modifies the data of the aperture mask it creates when amaskis input. [#2348] - Fixed the annulus apertures so that reassigning an inner or outer shape parameter after construction validates the inner < outer invariant. [#2362]
- Fixed a thread-safety issue in
ApertureStatsby using a copy of the user's SigmaClip instance. [#2364] - Fixed the aperture photometry flux error propagation so that each
pixel variance is weighted by the squared aperture overlap
fraction. Previously, the linear overlap fraction was used,
which overestimated the flux errors by a few percent for small
apertures. This affects the flux errors from
AperturePhotometry,aperture_photometry, andApertureStats.sum_err. TheApertureStats.error_sum_cutoutvalues are now the pixel errors multiplied by the aperture mask weights, so their quadrature sum equalssum_err. [#2398]
- Fixed the local WCS Jacobian computation used by the aperture
photutils.background- Fixed the
exclude_percentilebox-exclusion criterion inBackground2Dso that a box is excluded only if more thanexclude_percentilepercent of its pixels are masked, as documented. Previously, a box with exactly that percentage of masked pixels was excluded, andexclude_percentile=0excluded all boxes, even fully unmasked ones. [#2363] Background2Dnow raises a clearTypeErrorif the inputmaskorcoverage_maskis not a boolean array. Previously, a non-booleancoverage_maskraised a crypticIndexError(or could silently select the wrong pixels) when the background map was computed. [#2363]
- Fixed the
photutils.centroids- Fixed
centroid_quadraticto fit the quadratic in coordinates centered on the peak pixel, avoiding ill-conditioning at large pixel coordinates that could cause failures and spurious NaN results. [#2368]
- Fixed
photutils.datasets- Fixed
make_wcsso that the WCSpixel_shapeattribute is set in (nx, ny) order. The WCS transformation itself was unaffected. [#2374]
- Fixed
photutils.detection- Fixed
DAOStarFinderandIRAFStarFinderorientationoutput to return a value in the range (-90, 90] degrees instead of incorrectly wrapping it to [0, 360) degrees (which only ever produced values in the disjoint ranges [0, 90] and (270, 360)). This also makes it consistent withApertureStats.orientationandSourceCatalog.orientation. [#2317] - Fixed integer indexing of the star finder catalog classes when
multidimensional per-source attributes (e.g., image moments or
cutouts) had already been computed. Previously, the integer index
dropped the leading source axis of those cached arrays, and
accessing dependent properties on the indexed catalog raised an
IndexError. [#2377] DAOStarFinderandIRAFStarFindernow raise aValueErrorif any inputxycoordsposition is outside the bounds of the input data. [#2377]- Fixed
find_peaks(and the star finder classes, which use it) so that masked pixels can no longer suppress nearby peaks within the local region. Masked pixels are now replaced by the minimum finite data value before peak detection, the same treatment already applied to NaN pixels. Previously, a masked pixel (e.g., a flagged cosmic ray or hot pixel) with a value larger than a nearby true peak prevented that peak from being detected. [#2377] StarFindernow validates the inputkernelvalues. The kernel must contain only finite values and have a positive maximum. [#2377]
- Fixed
photutils.isophote- Changed
booltobintinellipse_model.pyxto fix a compilation issue with Cython 3.1.x. [#2260] - Fixed spurious NumPy "Mean of empty slice" and related warnings raised during isophote fitting when a trial or failed isophote has an elliptical path that falls entirely (or largely) outside the image. [#2283]
- Fixed
EllipseSamplenot resettingEllipseGeometrycached attributes when overridingsma. [#2280] - Fixed a compilation issue in
_ellipse_model.pyxwith Cython 3.3, which no longer allows tuples of typed memoryviews. [#2404] - Fixed an issue when fitting isophotes with the
'nearest_neighbor'integration mode. At small semimajor axes, nearest-neighbor sampling could measure a local intensity gradient of exactly zero, and the resulting division by zero corrupted the ellipse geometry. [#2405]
- Changed
photutils.morphology- Fixed
data_propertiesso that abackgroundinput with units is preserved. Previously, the units were stripped, and a confusing units-mismatch error was raised whendatawas aQuantity. [#2370]
- Fixed
photutils.profiles- Fixed
RadialProfile.data_profileso that its values are always consistent with the current profile normalization. Previously, ifnormalizewas called beforedata_profilewas first accessed, the raw (unnormalized) values were returned, and a subsequentunnormalizecall then incorrectly multiplied those raw values by the normalization. [#2371] - Fixed
RadialProfile.data_profileto return aQuantitywhen the input data is aQuantity, consistent with theprofileattribute. [#2371] - Fixed the
RadialProfiledata_radiusanddata_profileattributes so that pixels whose centers lie exactly at the maximum input radius are included on all sides of the center. Previously, such pixels were excluded on the upper-x and upper-y sides of the center. [#2371] - Fixed the profile
plotmethod so that the y-axis label no longer includes the data unit after the profile has been normalized (a normalized profile is dimensionless). [#2371] - A
Quantityradii(orhalf_sizes) input to the profile classes now raises aTypeError. Previously, the units were silently dropped. [#2371] - The
profile_errorvalues of the profile classes are now slightly smaller because the aperture photometry flux error propagation now weights each pixel variance by the squared aperture overlap fraction. [#2398]
- Fixed
photutils.psf- Fixed a bug where calling
PSFPhotometrywith aninit_paramstable containing agroup_idcolumn permanently disabled the grouper for all subsequent calls on the same instance. [#2383] - Fixed a bug where non-finite data values were not merged into a
user-provided mask, causing fit failures in
fit_2dgaussian,fit_fwhm, andPSFPhotometry. [#2383] - Fixed a bug where grouped fits could silently reuse a stale
cached flat-model class when multiple PSF models of the same class
(e.g., two different
ImagePSFmodels) were used, producing incorrect photometry. The flat-model class cache is now stored per fitter instance. [#2384] - Fixed a bug where PSF model parameter bounds were not applied in
grouped fits, so grouped fits were unconstrained where single-source
fits were constrained. The bounds are now also propagated back to
the fitted models, so the
NEAR_BOUNDflag is now set for grouped sources. [#2384] - Fixed a bug where
PSFPhotometryraised an error for integer-dtype data when alocal_bkgcolumn was provided. [#2384] - An
init_paramstable column that has a unit attribute (e.g., from aTableinstead of aQTable) is now converted to the data unit instead of raising an error claiming the column has no units. The error message for a truly unitless column now suggests using a Quantity column. [#2384] - Fixed a bug where
EPSFBuilderrejected allLinkedEPSFStarinputs as invalid stars, a regression introduced in version 3.0. [#2385] - Fixed a bug where the
EPSFBuilderstar exclusion warning raised aTypeErrorfor stars with the default (None) or stringid_labelvalues. The warning message now always reports the flat star index and includes the id label when available. [#2385] - Fixed a bug where the
EPSFStarslicesandbboxattributes were transposed for non-square cutouts. [#2386] - Fixed a bug where the ePSF building flux renormalization used stale cached values, so every iteration normalized the star data with the first-iteration flux instead of the updated fitted flux. [#2386]
- Fixed a bug where the
n_pixels_fitresults column leaked into the tables returned by thePSFPhotometryresults_to_init_paramsandresults_to_model_paramsmethods (asn_pixels_initandn_pixelscolumns) and into the deprecatedfit_paramstable. [#2387] PSFPhotometrynow raises aValueErrorif theinit_paramstable contains duplicateidvalues. Previously, duplicate ids silently produced a results table with extra mispaired rows. [#2387]- Fixed a bug where
PSFPhotometry.finder_resultsretained the results from a previous call when a subsequent call providedinit_params(so the finder was not used). [#2387] PSFPhotometrynow raises aValueErrorif theinit_paramstable has no rows. [#2387]- Fixed a bug where the
PSFPhotometryfit_infolist was not reordered to match the results table when theinit_paramstable was not sorted by theidcolumn. [#2387] - Fixed a bug where the
reduced_chi2calculation emitted a divide-by-zero warning when the number of fit pixels equaled the number of fit parameters. NaN is now returned without a warning when there are no degrees of freedom. [#2387] - The
PSFPhotometrygroup_warning_thresholdkeyword is now validated to be a positive integer. [#2387] - Fixed a bug where
IterativePSFPhotometrywithmode='all'raised an error when an earlier iteration produced a source with non-finite fit results. Such sources are now dropped from later iterations. [#2387] - Fixed a bug where
IterativePSFPhotometrywithmode='all'did not carry the local background values into iterations after the first, so sources were refit with a local background of zero. [#2387] - Fixed a bug where a callable
finderreturning a zero-row table caused an error inIterativePSFPhotometry. The iteration now stops cleanly. [#2387] - Fixed a bug where the
IterativePSFPhotometrymake_model_imageandmake_residual_imagemethods raised a confusing error after a run in which no sources were detected. They now raise a clearValueError. [#2387] - The
IterativePSFPhotometrysub_shapekeyword is now validated at initialization to have odd, positive values, matching the documented requirement. Themaxiterskeyword validation now also rejects non-numeric and boolean inputs. [#2387] - Fixed a bug where the
GaussianPSFandGaussianPRFbounding boxes treated a floatthetavalue (in degrees) as radians, producing incorrect bounding-box extents for rotated models. [#2388] - Fixed a bug where
AiryDiskPSFreturned the peak value instead of NaN for NaN input coordinates. [#2388] - Fixed the default lower bound of the
MoffatPSFbetaparameter, which rounded to exactly 1.0 instead of being strictly greater than 1. [#2388] CircularGaussianPSFandCircularGaussianPRFnow raise aUnitsErrorduring fitting when the x and y inputs have different units, consistent with the other Gaussian models. [#2388]- Fixed the normalization prefactor shown in the
AiryDiskPSFdocstring and documented that the rotatedGaussianPRFpixel integration is performed along the rotated principal axes of the Gaussian. [#2388] - Fixed
stdpsf_readerandSTDPSFGridto accept an already-openastropy.io.fits.HDUListor file object. Such inputs were previously accepted by the low-level reader but then raised aTypeErrorwhen parsing the metadata. [#2388] - Fixed
webbpsf_readerto correctly read files containing a single 2D PSF. The data was previously reshaped with the new axis in the wrong position, raising aValueError. [#2388] GriddedPSFModelnow raises aValueErrorifgrid_xyposcontains duplicate positions. Previously, duplicate positions could silently produce an invalid grid. [#2388]- Fixed
GriddedPSFModel.copyso that the copy has its ownmetadictionary. Previously, setting theoversamplingon a copy also changed themetadictionary of the original model. [#2388] - Fixed
plot_gridfor integer-dtype ePSF grids, which raised a casting error withdeltas=Trueorpeak_norm=True. Also, with bothdeltas=Trueandpeak_norm=True, the differences are now normalized by the average ePSF peak, as documented, instead of the maximum difference value. [#2388] - Fixed
GriddedPSFModel.evaluateandImagePSF.evaluateto accept scalar coordinates when called directly. [#2388] - Fixed
GriddedPSFModel.readto raise the standard format identification error for a corrupt file with a FITS extension instead of anOSError. [#2388] - Fixed a bug where
SourceGrouperraised an error for scalar x and y inputs whenreturn_groups_object=True. 2D coordinate arrays now raise a clearValueError, andSourceGroupsnow validates that the input coordinates are finite. [#2389] - Fixed a bug where the interpolation of masked pixels in ePSF building raised an error for integer-dtype star data. The interpolation is now always performed in float. [#2389]
- Fixed a bug in
make_psf_model_imagewhere thefluxkeyword was silently ignored for models whose flux parameter has a different name (e.g., models output frommake_psf_model). The keyword is now mapped to the model's flux parameter name. [#2389] - Fixed a bug where the
EPSFStarsstar counts and flat star list were stale after deleting a star from the container. [#2390] - Fixed a bug where
extract_starscould modify a user-supplied weights uncertainty array when masking pixels. [#2390] extract_starsno longer requires every input image to have a WCS when multiple catalogs are input. A WCS is now required only for images whose catalog provides only sky coordinates. [#2390]EPSFStarnow raises aTypeErrorforQuantityinput data. Previously,Quantitydata produced confusing downstream errors. [#2390]- Fixed a bug where an even
EPSFBuildershapevalue raised an error instead of being made odd by adding one (with a warning), as documented. [#2390] - Fixed the
EPSFBuilderminimum-shape validation to match the automatically derived ePSF shape. Previously, ashapeequal to the derived shape could be rejected as too small when the star size times the oversampling factor was odd. [#2390] EPSFBuildernow raises aValueErrorif the initial ePSF model passed tobuild_epsfhas an oversampling that does not match the builder oversampling. [#2390]- Fixed a bug where a fitter that raised a
TypeErrorduring ePSF fitting was silently retried without weights. Whether the fitter supports weights is now determined from its call signature. [#2390] - Fixed a bug where the
make_model_imageandmake_residual_imagemethods raised an error withinclude_local_bkg=Truewhen no local background values were available. The local background is now treated as zero. [#2391] - Fixed a bug where the initial flux estimates in
fit_2dgaussianandfit_fwhmincluded pixels masked by themaskkeyword, corrupting the fit starting point. [#2395] - Fixed a bug where interpolating missing data during ePSF
building raised a
QhullErrorwhen fewer than three valid pixels remained or all valid pixels were collinear. Nearest-neighbor interpolation is now used as a fallback. [#2395] - Fixed a bug where the
near_boundflag (bit 32) was only set for bounds applied via thexy_boundskeyword. The flag is now set when any fitted parameter is very close to its bounds, including bounds set directly on the PSF model. [#2395] AiryDiskPSFnow evaluates to zero at infinite radial distance, matching the other PSF models. Previously, it returned NaN. [#2395]- Fixed the
CircularGaussianPSF.fit_derivpartial derivative with respect tofwhm. This affected only fits in which thefwhmparameter was unfixed. [#2347] - Fixed
ImagePSFto discard its cached interpolator when thedataattribute is set. Previously, assigning a new image to an existing model silently continued to evaluate the old image. Thedataandoversamplingattributes are now also validated when set, not only when the model is created. [#2347] - Fixed the
GriddedPSFModel.originattribute, which returned a three-element array instead of the documented(x, y)pair. The spurious third element was derived from the number of ePSFs in the grid. Model evaluation was unaffected because it used only the first two elements. [#2347] - Fixed the
filtermetadata parsed from the filename when reading a gzipped STDPSF file (e.g.,.fits.gz). The file extension was not removed, so the filter name included the extension. [#2346] - Fixed
webbpsf_readerto swap theDET_YX{i}FITS header values when defininggrid_xypos. The reference ePSFs were previously swapped to the wrong detector positions for any grid whose x and y positions differ. [#2347] - Fixed
SourceGroups.plotto sample a user-supplied colormap over its full range. Previously the colormap was indexed by the group number, which gave nearly identical colors for every group (and raised anIndexErrorfor more than 256 groups). [#2347] - Fixed reading a STDPSF file from an already-open
astropy.io.fits.HDUList. Such input was accepted but then raised aTypeError. [#2347] - Fixed the
plot_gridtitle when the instrument, detector, or filter metadata is missing. The missing values left stray spaces in the title. [#2347]
- Fixed a bug where calling
photutils.psf_matchingmake_wiener_kernelnow validates a custompenaltyarray. It must be 2D with odd dimensions in both axes, contain only finite values, and not be all zeros. [#2372]make_kernelandmake_wiener_kernelnow raise aValueErrorif the computed kernel contains non-finite values, which can occur when the Fourier-space denominator is zero at frequencies where the numerator is also zero. [#2372]
photutils.segmentation- Fixed
SourceCatalog.orientationto return a value in the range (-90, 90] degrees instead of incorrectly wrapping it to [0, 360) degrees (which only ever produced values in the disjoint ranges [0, 90] and (270, 360)). This also makes it consistent withApertureStats.orientation. [#2317] SegmentationImage.remove_border_labelsnow raises aValueErrorfor non-positiveborder_widthvalues. Previously,border_width=0(and negative widths) silently removed every label because the entire array was treated as the border region. [#2378]- Fixed
SourceCatalogslicing so that the sliced catalog no longer shares its custom-properties list (and other mutable containers, such asmeta) with the parent catalog. [#2378] - Fixed
SourceCatalog.segment_fluxso that the local-background subtraction uses the number of unmasked pixels actually summed. Previously, with adetection_cataloginput and a different mask, the local background was multiplied by the detection catalog'sarea, oversubtracting the background. [#2378] deblend_sourceswithcontrast=1(no deblending) now honorsrelabel=True, relabeling non-consecutive input labels like every other code path. [#2378]SourceCatalog.add_propertynow raises aValueErrorfor names of built-in methods (e.g.,to_table). [#2378]- Fixed the
SourceCatalogkron_flux_errandcircular_photometryflux errors so that each pixel variance is weighted by the squared aperture overlap fraction. [#2398]
- Fixed
photutils.utils- Fixed a thread-safety issue in
ImageDepthby using a copy of the user's SigmaClip instance. [#2364] - Fixed
ImageDepthso that repeated calls on the same instance no longer accumulate thefluxesattribute across calls. The result attributes now always reflect only the most recent call. [#2375] - Fixed a crash in
calc_total_errorwhen the inputdataarray has an integer data type. [#2375]
- Fixed a thread-safety issue in
photutils.aperture- The
PixelAperture.do_photometrymethod is now deprecated and will be removed in version 4.0. Use the newAperturePhotometryclass instead. [#2324, #2328] - The default
ApertureStats.to_table()columns now include a'flags'column. [#2327, #2379] - The
ApertureStats.idsattribute is now deprecated and will be removed in version 4.0. Use theApertureStats.idattribute instead. [#2331] - The
ApertureStats.n_aperturesattribute is now deprecated and will be removed in version 4.0. Use the newApertureStats.n_positionsattribute instead, which matchesAperturePhotometry.n_positions. [#2362] AperturePhotometryandApertureStatsnow validate themethod/sum_methodandsubpixelskeywords when the object is created instead of when a measured attribute is first accessed. [#2348]ApertureStatsnow stores thesegmentation_image,labels, andmask_methodinputs as public attributes, matchingAperturePhotometry. [#2348]- The
'aperture_photometry_args'metadata in theAperturePhotometry.to_table()output now also records themask_methodkeyword. [#2348] BoundingBox.__eq__now returns NotImplemented instead of raising aTypeErrorwhen the other object is not aBoundingBox, so that comparing aBoundingBoxto another type returns False rather than raising. [#2348]- The
maskinput to aperture photometry and the aperturearea_overlapmethod must now be a boolean array (or None). [#2362] - The
PixelAperture.plotmethod now returns a list of patches for scalar apertures, as documented, instead of a tuple. [#2362]
- The
photutils.datasetsmake_model_imagenow also skips sources that have a non-finite'local_bkg'value. Previously, a non-finite local background was added to the source region, propagating NaN or inf values into the output image. [#2374]make_model_imagenow determines the output image units up front from the parameter table column units, so the output units no longer depend on whether any sources are actually rendered (e.g., a zero-row table or sources that are skipped or do not overlap the image). [#2374]make_model_imagenow validates thediscretize_methodkeyword and the values in a'model_shape'column (which must be finite and positive) up front with clear error messages. Previously, invalid values raised cryptic errors from within the source loop or silently rendered nothing. [#2374]- The
make_model_imageshapeargument now also accepts a single integer, which is used for both dimensions, consistent withmake_model_params. [#2374] - The
make_model_paramsoutput table now includes the creation date and photutils version metadata, consistent withmake_random_models_table. [#2384]
photutils.detection- The
reprandstroutput ofStarFinderCatalogBasenow labels the number of sources asn_sourcesinstead ofnsourcesfor naming consistency. [#2338] - The star-finder cutout centers used for the shape and flux measurements now round half-integer pixel positions half away from zero instead of half to even, consistent with the rounding convention used elsewhere in photutils. [#2375]
- The
photutils.geometry- The
circular_overlap_grid,elliptical_overlap_grid, andrectangular_overlap_gridfunctions now validate theuse_exactandsubpixelsinputs, raising aValueErrorfor values outside the documented ranges. [#2369]
- The
photutils.psf- The
PSFPhotometry.decode_flagsandIterativePSFPhotometry.decode_flagsmethods now return a dictionary mapping each source id from the results table to its list of active flag names (or bit values), instead of a positional list of lists. This is a backward-incompatible change, made so that decoded flags can be looked up directly by source id (which may not be sequential when custom ids are input) and for consistency with the new aperture and segmentationdecode_flagsmethods. The module-leveldecode_psf_flagsfunction is unchanged and still returns lists. [#2400] - The
EPSFBuildResultclass returned byEPSFBuilderhas been renamed toEPSFBuildResults. The oldEPSFBuildResultname is deprecated and will be removed in a future version. [#2326] - The
nxpsfsandnypsfsmetadata keys of theGriddedPSFModelreturned when reading a STDPSF file have been removed. They were redundant with thegrid_shapeattribute, which contains the same information as(nypsfs, nxpsfs). [#2344] - The
'grid_shape'key has been removed from theGriddedPSFModelmetadictionary. Use the newGriddedPSFModel.grid_shapeattribute instead. [#2360] - The
grid_xypos,oversampling, andgrid_shapekeys have been removed from theSTDPSFGridmetadictionary. Themetadictionary now contains only the metadata parsed from the filename (e.g.,STDPSF,detector, andfilter). Use thegrid_xyposandoversamplingattributes instead. [#2344] - The
STDPSFGridgrid_xyposattribute is now anumpyarray instead of a list, matching theGriddedPSFModelattribute of the same name. Theoversamplingattribute is now a read-only property. [#2344] - The
GriddedPSFModelmetadictionary now always stores'grid_xypos'as the sorted array of grid positions and'oversampling'as a normalized(y, x)tuple, so that both always match the attributes of the same name. Previously, these keys held the input values unchanged, which could differ from the attributes in ordering, type, or shape. [#2344] - The
reprandstroutput ofGriddedPSFModel,ImagePSF, andSTDPSFGridnow show the oversampling as a tuple (e.g.,(4, 4)) instead of a list ornumpyarray. TheSTDPSFGridoutput now labels the grid shape asGrid shapeinstead ofGrid_shape. [#2344] decode_psf_flagsnow raises aTypeErrorfor boolean flag values instead of treating True as bit value 1. [#2375]- The
EPSFBuildercoord_transformerattribute is now deprecated and will be removed in a future version. It is an internal helper object that was never intended to be public. [#2390] EPSFBuildernow supportssigma_clip=Noneto disable sigma clipping when stacking the ePSF residuals, as its docstring already documented. [#2390]- The
maskanderrorkeywords ofPSFPhotometryandIterativePSFPhotometrynow raise aValueErrorwhen the input data is anNDDatainstance. Previously, they were silently ignored in favor of theNDDataattributes. NDData input is now also documented in the__call__docstrings. [#2395] - The error message raised for non-positive or non-finite
errorvalues within a fit region now includes the location of the fit region. [#2395] EPSFStarsnow explicitly supports array conversion (e.g.,np.asarrayor passing it to matplotlib'simshow). A container holding a single star (e.g., from indexing) converts to that star's 2D cutout, and a container holding multiple stars converts to a 3D stack of the cutouts. [#2395]
- The
photutils.segmentation- The
deblend_sources"too many markers" warning key stored in the returnedSegmentationImage.info['warnings']dictionary has been renamed from'nmarkers'to'n_markers', consistent with then_*naming used elsewhere in photutils. [#2346] - The deblending warning information stored by
deblend_sourcesin the returnedSegmentationImageinfodictionary has been restructured. The affected input labels are now stored as arrays directly under'nonposmin_labels'and'n_markers_labels'keys. The nestedinfo['warnings']dictionary, including its'message'entries, has been removed. The emitted warning is now aDeblendWarning(a subclass of astropy'sAstropyUserWarning) instead of anAstropyUserWarning. [#2378] SegmentationImagenow raises aTypeErrorfor masked array input. [#2381]- The conditions for the
SourceCatalogcentroid_winfallback to the isophotal centroid have been expanded. The windowed centroid is reset when it diverged far from the isophotal centroid and lies outside the 1-sigma ellipse, the total weighted flux is non-positive, the windowed second-order moments are negative, or the windowed covariance determinant is negative. Previously, only the ellipse condition was applied. [#2397] - The
SourceCatalogprogress_barkeyword is now deprecated and will be removed in version 4.0. All property calculations are now computed for all sources at once in compiled code, so no progress bar is displayed and the keyword has no effect. [#2406] - The
deblend_sourcesandSourceFinderprogress_barandn_processeskeywords are now deprecated and will be removed in version 4.0, and both keywords no longer have any effect. Deblending is now dominated by compiled code, so no progress bar is displayed, and the multiprocessing implementation has been removed because its process startup and data-pickling overheads made it slower than the serial implementation at any number of sources. [#2408] - The
deblend_sourcesandSourceFinderdeblending-mode fallback for sources with non-positive minimum data values (used withmode='exponential', for which such sources are undefined) was changed from "linear" to "sinh". The sinh spacing keeps the threshold levels concentrated near the source minimum, recovering faint companions of bright sources that the linear spacing misses, so deblending results can change for the affected sources. The'nonposmin_labels'info key and thedeblend_nonposminflag are unchanged and continue to record the affected sources. [#2410]
- The
photutils.utils- The
ShepardIDWInterpolatorncoordsattribute has been renamed ton_coords, consistent with then_*naming used elsewhere in photutils. The oldncoordsname is deprecated and will be removed in version 4.0. [#2346] ImageDepthnow creates a fresh random generator initialized withseedon every call instead of consuming a generator shared across calls. With a fixed seed, every call on the same instance now produces identical results. [#2375]ShepardIDWInterpolatornow returns a NumPy scalar for a single input position whenn_neighbors=1, consistent with then_neighbors > 1case. Previously it returned a Python float. [#2375]
- The
- 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, #2256] - 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]. - Added a
use_future_column_namescontext manager for temporarily enabling future column names in a scoped, thread-safe, and async-safe way without modifying the globalphotutils.future_column_namesflag. [#2258]
- 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,
and 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,
and 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. Use thesharpness_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
SourceCatalogto_tabledefault columns no longer includeslocal_background. [#2252]
- 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] - 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.