Windowed positional parameters

Measurements performed through a window function (an envelope) do not have many of the drawbacks of isophotal measurements. SExtractor implements “windowed” versions for most of the measurements described in the previous section:

Note

Unless otherwise noted, all parameter names given below are only prefixes. They must be followed by _IMAGE if the results shall be expressed in pixel coordinates or _WORLD, _SKY, _J2000 or _B1950 for WCS coordinates (see Positions and shapes).

Isophotal parameters

Equivalent windowed parameters

X, Y

XWIN, YWIN

ERRA, ERRB, ERRTHETA

ERRAWIN, ERRBWIN, ERRTHETAWIN

A, B, THETA

AWIN, BWIN, THETAWIN

X2, Y2, XY

X2WIN, Y2WIN, XYWIN

CXX, CYY, CXY

CXXWIN, CYYWIN, CXYWIN

The computations involved are roughly the same except that the pixel values are integrated within a circular Gaussian window as opposed to the object’s isophotal footprint. The Gaussian window is scaled to each object; the Gaussian FWHM is the diameter of the disk that contains half of the object flux (\(d_{50}\)). Note that in double-image mode (§[chap:using]) the window is scaled based on the measurement image.

Windowed centroid: XWIN, YWIN

This is an iterative process. Computation starts by initializing the windowed centroid coordinates \(\overline{x_{\tt WIN}}^{(0)}\) and \(\overline{y_{\tt WIN}}^{(0)}\) to their basic \(\overline{x}\) and \(\overline{y}\) isophotal equivalents, respectively. Then at each iteration \(t\), \(\overline{x_{\tt WIN}}\) and \(\overline{y_{\tt WIN}}\) are refined using:

(27)\[\begin{split} \begin{aligned} {\tt XWIN}^{(t+1)} & = & \overline{x_{\tt WIN}}^{(t+1)} = \overline{x_{\tt WIN}}^{(t)} + 2\,\frac{\sum_{r_i^{(t)} < r_{\rm max}} w_i^{(t)} I_i \ (x_i - \overline{x_{\tt WIN}}^{(t)})} {\sum_{r_i^{(t)} < r_{\rm max}} w_i^{(t)} I_i},\\ {\tt YWIN}^{(t+1)} & = & \overline{y_{\tt WIN}}^{(t+1)} = \overline{y_{\tt WIN}}^{(t)} + 2\,\frac{\sum_{r_i^{(t)} < r_{\rm max}} w_i^{(t)} I_i\ (y_i - \overline{y_{\tt WIN}}^{(t)})} {\sum_{r_i^{(t)} < r_{\rm max}} w_i^{(t)} I_i}, \end{aligned}\end{split}\]

where

(28)\[w_i^{(t)} = \exp \left(-\frac{r_i^{(t)^2}}{2s_{\tt WIN}^2} \right),\]

with

(29)\[ r_i^{(t)} = \sqrt{\left(x_i - \overline{x_{\tt WIN}}^{(t)}\right)^2 + \left(y_i - \overline{y_{\tt WIN}}^{(t)}\right)^2}\]

and \(s_{\tt WIN} = d_{50} / \sqrt{8 \ln 2}\). Process stops when the change in position between two iterations is less than \(2\times10^{-4}\) pixel, a condition which is achieved in about 3 to 5 iterations in practice.

Although they are slower, it is recommended to use whenever possible windowed position parameters instead of their isophotal equivalents; the measurements they provide are generally much more accurate (Fig. 6). The centroiding accuracy of XWIN_IMAGE and YWIN_IMAGE is actually very close to that of PSF-fitting on focused and properly sampled star images. Windowed measurements can also be applied to galaxies. It has been verified that for isolated objects with Gaussian-like profiles, their accuracy is close to the theoretical limit set by image noise [1].

_images/xwinprec.svg

Fig. 6 Comparison between isophotal and windowed centroid measurement residuals on simulated, background noise-limited images. Left: histogram of the difference between X_IMAGE and the true centroid in x. Right: histogram of the difference between XWIN_IMAGE and the true centroid in x.

Windowed 2nd order moments: X2, Y2, XY

Windowed second-order moments are computed on the image data once the centering process has converged:

(30)\[\begin{split} \begin{aligned} {\tt X2WIN} & = \overline{x_{\tt WIN}^2} = & \frac{\sum_{r_i < r_{\rm max}} w_i I_i (x_i - \overline{x_{\tt WIN}})^2} {\sum_{r_i < r_{\rm max}} w_i I_i},\\ {\tt Y2WIN} & = \overline{y_{\tt WIN}^2} = & \frac{\sum_{r_i < r_{\rm max}} w_i I_i (y_i - \overline{y_{\tt WIN}})^2} {\sum_{r_i < r_{\rm max}} w_i I_i},\\ {\tt XYWIN} & = \overline{xy_{\tt WIN}} = & \frac{\sum_{r_i < r_{\rm max}} w_i I_i (x_i - \overline{x_{\tt WIN}}) (y_i - \overline{y_{\tt WIN}})} {\sum_{r_i < r_{\rm max}} w_i I_i}.\end{aligned}\end{split}\]

Windowed second-order moments are typically twice smaller than their isophotal equivalent.

Windowed shape parameters: AWIN, BWIN, THETAWIN

They are computed from the windowed 2nd order moments exactly the same way as in (12) and (14) from the isophotal shape parameter section:

(31)\[\begin{split} \begin{aligned} {\tt AWIN}^2 & = & \frac{\overline{x_{\tt WIN}^2}+\overline{y_{\tt WIN}^2}}{2} + \sqrt{\left(\frac{\overline{x_{\tt WIN}^2}-\overline{y_{\tt WIN}^2}}{2}\right)^2 + \overline{xy_{\tt WIN}}^2},\\ {\tt BWIN}^2 & = & \frac{\overline{x_{\tt WIN}^2}+\overline{y_{\tt WIN}^2}}{2} - \sqrt{\left(\frac{\overline{x_{\tt WIN}^2}-\overline{y_{\tt WIN}^2}}{2}\right)^2 + \overline{xy_{\tt WIN}}^2},\\ \tan (2\,{\tt THETAWIN}) & = & 2 \frac{\overline{xy_{\tt WIN}}}{\overline{x_{\tt WIN}^2} - \overline{y_{\tt WIN}^2}}. \end{aligned}\end{split}\]

Windowed ellipse parameters: CXXWIN, CYYWIN, CXYWIN

Ellipse parameters are computed from the windowed 2nd order moments exactly the same way as in (17) describing the isophotal ellipse parameters:

(32)\[\begin{split} \begin{aligned} {\tt CXXWIN} & = & \frac{\cos^2 {\tt THETAWIN}}{{\tt AWIN}^2} + \frac{\sin^2 {\tt THETAWIN}}{{\tt BWIN}^2} = \frac{\overline{y_{\tt WIN}^2}}{\overline{x_{\tt WIN}^2} \overline{y_{\tt WIN}^2} - \overline{xy_{\tt WIN}}^2}\\ {\tt CYYWIN} & = & \frac{\sin^2 {\tt THETAWIN}}{{\tt AWIN}^2} + \frac{\cos^2 {\tt THETAWIN}}{{\tt BWIN}^2} = \frac{\overline{x_{\tt WIN}^2}}{\overline{x_{\tt WIN}^2} \overline{y_{\tt WIN}^2} - \overline{xy_{\tt WIN}}^2}\\ {\tt CXYWIN} & = & 2 \,\cos {\tt THETAWIN}\,\sin {\tt THETAWIN} \left( \frac{1}{{\tt AWIN}^2} - \frac{1}{{\tt BWIN}^2}\right) = -2\, \frac{\overline{xy_{\tt WIN}}}{\overline{x_{\tt WIN}^2} \overline{y_{\tt WIN}^2} - \overline{xy_{\tt WIN}}^2}. \end{aligned}\end{split}\]

Windowed position uncertainties: ERRX2WIN, ERRY2WIN, ERRXYWIN, ERRAWIN, ERRBWIN, ERRTHETAWIN, ERRCXXWIN, ERRCYYWIN, ERRCXYWIN

Windowed position uncertainties are computed on the image data once the centering process of the windowed centroid has converged. Assuming that noise is uncorrelated among pixels, standard error propagation applied to (27) writes:

(33)\[\begin{split} \begin{aligned} {\tt ERRX2WIN} & = {\rm var}(\overline{x_{\tt WIN}}) = & 4\,\frac{\sum_{r_i < r_{\rm max}} w_i^2 \sigma^2_i (x_i-\overline{x_{\tt WIN}})^2} {\left(\sum_{r_i < r_{\rm max}} w_i I_i\right)^2},\\ {\tt ERRY2WIN} & = {\rm var}(\overline{y_{\tt WIN}}) = & 4\,\frac{\sum_{r_i < r_{\rm max}} w_i^2 \sigma^2_i (y_i-\overline{y_{\tt WIN}})^2} {\left(\sum_{r_i < r_{\rm max}} w_i I_i\right)^2},\\ {\tt ERRXYWIN} & = {\rm cov}(\overline{x_{\tt WIN}},\overline{y_{\tt WIN}}) = & 4\,\frac{\sum_{r_i < r_{\rm max}} w_i^2 \sigma^2_i (x_i-\overline{x_{\tt WIN}})(y_i-\overline{y_{\tt WIN}})} {\left(\sum_{r_i < r_{\rm max}} w_i I_i\right)^2}. \end{aligned}\end{split}\]

Semi-major axis ERRAWIN, semi-minor axis ERRBWIN, and position angle ERRTHETAWIN of the \(1\sigma\) position error ellipse are computed from the covariance matrix elements \({\rm var}(\overline{x_{\tt WIN}})\), \({\rm var}(\overline{y_{\tt WIN}})\), \({\rm cov}(\overline{x_{\tt WIN}},\overline{y_{\tt WIN}})\), similarly to the isophotal error ellipse:

(34)\[\begin{split} \begin{aligned} {\tt ERRAWIN}^2 & = & \frac{{\rm var}(\overline{x_{\tt WIN}})+{\rm var}(\overline{y_{\tt WIN}})}{2} + \sqrt{\left(\frac{{\rm var}(\overline{x_{\tt WIN}})-{\rm var}(\overline{y_{\tt WIN}})}{2}\right)^2 + {\rm cov}^2(\overline{x_{\tt WIN}},\overline{y_{\tt WIN}})},\\ {\tt ERRBWIN}^2 & = & \frac{{\rm var}(\overline{x_{\tt WIN}})+{\rm var}(\overline{y_{\tt WIN}})}{2} - \sqrt{\left(\frac{{\rm var}(\overline{x_{\tt WIN}})-{\rm var}(\overline{y_{\tt WIN}})}{2}\right)^2 + {\rm cov}^2(\overline{x_{\tt WIN}},\overline{y_{\tt WIN}})},\\ \tan (2{\tt ERRTHETAWIN}) & = & 2 \,\frac{{\rm cov}(\overline{x_{\tt WIN}},\overline{y_{\tt WIN}})} {{\rm var}(\overline{x_{\tt WIN}}) - {\rm var}(\overline{y_{\tt WIN}})}. \end{aligned}\end{split}\]

The error ellipse parameters are:

(35)\[\begin{split} \begin{aligned} {\tt ERRCXXWIN} & = & \frac{\cos^2 {\tt ERRTHETAWIN}}{{\tt ERRAWIN}^2} + \frac{\sin^2 {\tt ERRTHETAWIN}}{{\tt ERRBWIN}^2} = \frac{{\rm var}(\overline{y_{\tt WIN}})}{{\rm var}(\overline{x_{\tt WIN}}) {\rm var}(\overline{y_{\tt WIN}}) - {\rm cov}^2(\overline{x_{\tt WIN}},\overline{y_{\tt WIN}})},\\ {\tt ERRCYYWIN} & = & \frac{\sin^2 {\tt ERRTHETAWIN}}{{\tt ERRAWIN}^2} + \frac{\cos^2 {\tt ERRTHETAWIN}}{{\tt ERRBWIN}^2} = \frac{{\rm var}(\overline{x_{\tt WIN}})}{{\rm var}(\overline{x_{\tt WIN}}) {\rm var}(\overline{y_{\tt WIN}}) - {\rm cov}^2(\overline{x_{\tt WIN}},\overline{y_{\tt WIN}})},\\ {\tt ERRCXYWIN} & = & 2 \cos {\tt ERRTHETAWIN}\sin {\tt ERRTHETAWIN} \left( \frac{1}{{\tt ERRAWIN}^2} - \frac{1}{{\tt ERRBWIN}^2}\right)\\ & = & -2 \frac{{\rm cov}(\overline{x_{\tt WIN}},\overline{y_{\tt WIN}})}{{\rm var}(\overline{x_{\tt WIN}}) {\rm var}(\overline{y_{\tt WIN}}) - {\rm cov}^2(\overline{x_{\tt WIN}},\overline{y_{\tt WIN}})}. \end{aligned}\end{split}\]

Windowed measurement flags: FLAGS_WIN

The FLAGS_WIN catalog parameter flags various issues which may happen with windowed measurements (see the Flagging section for details on how flags are managed in SExtractor):

Table 4 FLAGS_WIN description

Value

Meaning

1

Windowed second-order moments are inconsistent (\(\overline{x_{\tt WIN}^2}\overline{y_{\tt WIN}^2} \le \overline{x_{\tt WIN}y_{\tt WIN}}^2\))

2

Windowed second-order moments are less than or equal to 0

4

Windowed flux is less than or equal to 0