fit_upper_harmonic¶

photutils.isophote.
fit_upper_harmonic
(phi, intensities, order)[source]¶ Fit upper harmonic function to a set of (angle, intensity) pairs.
With
order
set to 3 or 4, the resulting amplitudes, divided by the semimajor axis length and local gradient, measure the deviations from perfect ellipticity.The harmonic function that is fit is:
\[y(phi, order) = y0 + An*\sin(order*phi) + Bn*\cos(order*phi)\] Parameters
 phifloat or
ndarray
The angle(s) along the elliptical path, going towards the positive y axis, starting coincident with the position angle. That is, the angles are defined from the semimajor axis that lies in the positive x quadrant.
 intensities
ndarray
The intensities measured along the elliptical path, at the angles defined by the
phi
parameter. orderint
The order of the harmonic to be fitted.
 phifloat or
 Returns
 y0, An, Bnfloat
The fitted harmonic values.