JWST POPPY:docs

measure_centroid

poppy.measure_centroid(HDUlist_or_filename=None, ext=0, slice=0, boxsize=20, verbose=False, units=u'pixels', relativeto=u'origin', **kwargs)[source]

Measure the center of an image via center-of-mass

The centroid method used is the floating-box center of mass algorithm by Jeff Valenti et al., which has been adopted for JWST target acquisition measurements on orbit. See JWST technical reports JWST-STScI-001117 and JWST-STScI-001134 for details.

Parameters:

HDUlist_or_filename : string

Either a fits.HDUList object or a filename of a FITS file on disk

ext : int

Extension in that FITS file

slice : int, optional

If that extension is a 3D datacube, which slice (plane) of that datacube to use

boxsize : int

Half box size for centroid

relativeto : string

either ‘origin’ for relative to pixel (0,0) or ‘center’ for relative to image center. Default is ‘origin’

units : string

either ‘pixels’ for position in pixels or ‘arcsec’ for arcseconds. Relative to the relativeto parameter point in either case.

Returns:

CoM : array_like

[Y, X] coordinates of center of mass.

Page Contents