Isophote¶

class
photutils.isophote.
Isophote
(sample, niter, valid, stop_code)[source]¶ Bases:
object
Container class to store the results of single isophote fit.
The extracted data sample at the given isophote (sampled intensities along the elliptical path on the image) is also kept as an attribute of this class. The container concept helps in segregating information directly related to the sample, from information that more closely relates to the fitting process, such as status codes, errors for isophote parameters, and the like.
 Parameters
 sample
EllipseSample
instance The sample information.
 niterint
The number of iterations used to fit the isophote.
 validbool
The status of the fitting operation.
 stop_codeint
The fitting stop code:
0: Normal.
1: Fewer than the prespecified fraction of the extracted data points are valid.
2: Exceeded maximum number of iterations.
3: Singular matrix in harmonic fit, results may not be valid. This also signals an insufficient number of data points to fit.
4: Small or wrong gradient, or ellipse diverged. Subsequent ellipses at larger or smaller semimajor axis may have the same constant geometric parameters. It’s also used when the user turns off the fitting algorithm via the
maxrit
fitting parameter (see theEllipse
class).5: Ellipse diverged; not even the minimum number of iterations could be executed. Subsequent ellipses at larger or smaller semimajor axis may have the same constant geometric parameters.
1: Internal use.
 sample
 Attributes
 rmsfloat
The rootmeansquare of intensity values along the elliptical path.
 int_errfloat
The error of the mean (rms / sqrt(# data points)).
 ellip_errfloat
The ellipticity error.
 pa_errfloat
The position angle error (radians).
 x0_errfloat
The error associated with the center x coordinate.
 y0_errfloat
The error associated with the center y coordinate.
 pix_stddevfloat
The estimate of pixel standard deviation (rms * sqrt(average sector integration area)).
 gradfloat
The local radial intensity gradient.
 grad_errorfloat
The measurement error of the local radial intensity gradient.
 grad_r_errorfloat
The relative error of local radial intensity gradient.
 tflux_efloat
The sum of all pixels inside the ellipse.
 npix_eint
The total number of valid pixels inside the ellipse.
 tflux_cfloat
The sum of all pixels inside a circle with the same
sma
as the ellipse. npix_cint
The total number of valid pixels inside a circle with the same
sma
as the ellipse. sareafloat
The average sector area on the isophote (pixel**2).
 ndataint
The number of extracted data points.
 nflagint
The number of discarded data points. Data points can be discarded either because they are physically outside the image frame boundaries, because they were rejected by sigmaclipping, or they are masked.
 a3, b3, a4, b4float
The higher order harmonics that measure the deviations from a perfect ellipse. These values are actually the raw harmonic amplitudes divided by the local radial gradient and the semimajor axis length, so they can directly be compared with each other.
 a3_err, b3_err, a4_err, b4_errfloat
The errors associated with the
a3
,b3
,a4
, andb4
attributes.
Attributes Summary
The ellipticity of the ellipse.
The position angle (radians) of the ellipse.
The semimajor axis length (pixels).
The center x coordinate (pixel).
The center y coordinate (pixel).
Methods Summary
fix_geometry
(isophote)Fix the geometry of a problematic isophote to be identical to the input isophote.
Return the (x, y) coordinates where the image was sampled in order to get the intensities associated with this isophote.
to_table
()Return the main isophote parameters as an astropy
QTable
.Attributes Documentation

eps
¶ The ellipticity of the ellipse.

pa
¶ The position angle (radians) of the ellipse.

sma
¶ The semimajor axis length (pixels).

x0
¶ The center x coordinate (pixel).

y0
¶ The center y coordinate (pixel).
Methods Documentation

fix_geometry
(isophote)[source]¶ Fix the geometry of a problematic isophote to be identical to the input isophote.
This method should be called when the fitting goes berserk and delivers an isophote with bad geometry, such as ellipticity > 1 or another meaningless situation. This is not a problem in itself when fitting any given isophote, but will create an error when the affected isophote is used as starting guess for the next fit.
 Parameters
 isophote
Isophote
instance The isophote from which to take the geometry information.
 isophote