JWST POPPY:docs

measure_centroid

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

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, ext : string, int

Same as above

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