data_properties#
- photutils.morphology.data_properties(data, mask=None, background=None, wcs=None)[source]#
Calculate the morphological properties (and centroid) of a 2D array (e.g., an image cutout of an object) using image moments.
- Parameters:
- dataarray_like or
Quantity
The 2D array of the image.
- maskarray_like (bool), optional
A boolean mask, with the same shape as
data
, where aTrue
value indicates the corresponding element ofdata
is masked. Masked data are excluded from all calculations.- backgroundfloat, array_like, or
Quantity
, optional The background level that was previously present in the input
data
.background
may either be a scalar value or a 2D image with the same shape as the inputdata
. Inputting thebackground
merely allows for its properties to be measured within each source segment. The inputbackground
does not get subtracted from the inputdata
, which should already be background-subtracted.- wcsWCS object or
None
, optional A world coordinate system (WCS) transformation that supports the astropy shared interface for WCS (e.g.,
astropy.wcs.WCS
,gwcs.wcs.WCS
). IfNone
, then all sky-based properties will be set toNone
.
- dataarray_like or
- Returns:
- result
SourceCatalog
instance A
SourceCatalog
object.
- result