photutils.morphology.data_properties(data, mask=None, background=None)[source]

Calculate the morphological properties (and centroid) of a 2D array (e.g., an image cutout of an object) using image moments.

dataarray_like or Quantity

The 2D array of the image.

maskarray_like (bool), optional

A boolean mask, with the same shape as data, where a True value indicates the corresponding element of data 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 input data. Inputting the background merely allows for its properties to be measured within each source segment. The input background does not get subtracted from the input data, which should already be background-subtracted.

resultSourceCatalog instance

A SourceCatalog object.