im_centroid

jwst.extract_1d.ifu.im_centroid(data, mask_target)[source]

Compute the mean location of the target.

Parameters:
datandarray

This is the 3D science image data array.

mask_targetndarray

This is a 2D or 3D array of the same type and shape as one plane of the science image (or the same type and shape of the entire 3D science image), but with values of 0 or 1, where 1 indicates a pixel within the source.

Returns:
y0, x0float

The centroid of pixels flagged as source.