# public documents.sextractor_doc

## [/] [detect_deblend.tex] - Diff between revs 19 and 25

Rev 19 Rev 25
Line 1... Line 1...
\section{Deblending}
\section{Deblending}
\label{chap:deblending}
\label{chap:deblending}
Each time an object extraction is completed, the connected set of
Each time an object extraction is completed, the connected set of
pixels passes through a \hide{sort of} filter that tries to split it into
pixels passes through a \hide{sort of} filter that tries to split it into
eventual overlapping components. This case appears more frequently
eventual overlapping components. This case appears more frequently
when the field is crowded or when the detection threshold is set very
when the field is crowded or when the detection \index{threshold} threshold is set very
low. The deblending method adopted in {\sc SExtractor}, is based on
low. The \index{deblending} deblending method adopted in {\sc SExtractor}, is based on
{\em multi-thresholding}, and works on any kind of object; but it is
{\em \index{multi-thresholding} multi-thresholding}, and works on any kind of object; but it is
unable to deblend components that are so close that no saddle is
unable to deblend components that are so close that no saddle is
present in their profile. However, as no assumption has to be made on
present in their profile. However, as no assumption has to be made on
the shape of the objects, it is perfectly suited for galaxies as well
the shape of the objects, it is perfectly suited for galaxies as well
as for high galactic latitude stellar fields.
as for high galactic latitude stellar fields.

Typical problematic cases for deblending include patchy, extended {\bf
Typical problematic cases for \index{deblending} deblending include patchy, extended {\bf
Sc} galaxies (which must be considered as single entities), and
Sc} galaxies (which must be considered as single entities), and
close or interacting pairs of optically faint galaxies (which should
close or interacting pairs of optically faint galaxies (which should
be considered as separate objects). Basically, the multi-thresholding
be considered as separate objects). Basically, the \index{multi-thresholding} multi-thresholding
algorithm employs a multiple isophotal analysis technique similar to
algorithm employs a multiple isophotal analysis technique similar to
those in use at the APM \gam{Reference?} and the COSMOS machines
those in use at the \index{APM} APM \gam{Reference?} and the \index{COSMOS} COSMOS machines
\cite{beard:al:1991}; in a first pass, each extracted set of connected
\cite{beard:al:1991}; in a first pass, each extracted set of connected
pixels is re-thresholded at $N$ levels linearly or exponentially
pixels is re-thresholded at $N$ levels linearly or exponentially
spaced between its primary extraction threshold and its peak value.
spaced between its primary extraction \index{threshold} threshold and its peak value.
This gives us a 2-dimensional model'' of the light
This gives us a 2-dimensional model'' of the light
distribution within the object(s), which is stored in the form of a
distribution within the object(s), which is stored in the form of a
tree structure (fig. \ref{figsegmentmeth}). Then the algorithm goes
tree structure (fig. \ref{figsegmentmeth}). Then the algorithm goes
downwards, from the tips of branches to the trunk, and decides at each
downwards, from the tips of branches to the trunk, and decides at each
junction whether it shall extract two (or more) objects or continue
junction whether it shall extract two (or more) objects or continue
its way down. To meet the conditions described earlier, the following
its way down. To meet the conditions described earlier, the following
simple decision criteria are adopted: at any junction threshold
simple decision criteria are adopted: at any junction \index{threshold} threshold
$t_{i}$, any branch will be considered as a separate component if
$t_{i}$, any branch will be considered as a separate component if
\begin{enumerate}
\begin{enumerate}
\item[(1)] the integrated pixel intensity (above $t_{i}$) of the
\item[(1)] the integrated pixel intensity (above $t_{i}$) of the
branch is greater than a certain fraction $\delta_{c}$ of the total
branch is greater than a certain fraction $\delta_{c}$ of the total
intensity of the composite object;
intensity of the composite object;
\item[(2)] condition (1) is verified for at least one more branch at the same level $i$.
\item[(2)] condition (1) is verified for at least one more branch at the same level $i$.
\end{enumerate}
\end{enumerate}
Note that ideally, condition (1) is both flux- and scale-invariant.
Note that ideally, condition (1) is both flux- and scale-invariant.
However for faint, poorly resolved objects, the efficiency of the
However for faint, poorly resolved objects, the efficiency of the
deblending is limited mostly by seeing and sampling. From the analysis
\index{deblending} deblending is limited mostly by seeing and sampling. From the analysis
of both small and extended galaxy images, a compromise value for the
of both small and extended galaxy \index{image} images, a compromise value for the
contrast parameter $\delta_{c}$ $\sim$ 0.005 proved to be optimum.
contrast parameter $\delta_{c}$ $\sim$ 0.005 proved to be optimum.
This should normally separate objects with a difference in
This should normally separate objects with a difference in
magnitude greater than $\approx 6$.
magnitude greater than $\approx 6$.

%---------------------------------- Fig. segmentmeth --------------------------------
%---------------------------------- Fig. segmentmeth --------------------------------
\begin{figure}[htbp]
\begin{figure}[htbp]
\centerline{\includegraphics[width=10cm]{ps/segment.ps}}
\centerline{\includegraphics[width=10cm]{ps/segment.ps}}
\caption{ A schematic diagram of the method used to deblend a
\caption{ A schematic diagram of the method used to deblend a
composite object. The area profile of the object (\emph{smooth curve}) can be
composite object. The \index{area} area profile of the object (\emph{smooth curve}) can be
described in a tree-structured way (\emph{thick lines}). The decision to
described in a tree-structured way (\emph{thick lines}). The decision to
regard or not a branch as a distinct object is determined according to
regard or not a branch as a distinct object is determined according to
its relative integrated intensity (\emph{tinted area}). In that case above,
its relative integrated intensity (\emph{tinted \index{area} area}). In that case above,
the original object shall split into two components A and B. Remaining
the original object shall split into two components A and B. Remaining
pixels are assigned to their most credible progenitors'' afterwards.
pixels are assigned to their most credible progenitors'' afterwards.
}
}
\label{figsegmentmeth}
\label{figsegmentmeth}
\end{figure}
\end{figure}

The outlying pixels with flux lower than the separation thresholds
The outlying pixels with flux lower than the separation \index{threshold} thresholds
have to be reallocated to the proper components of the merger. To do
have to be reallocated to the proper components of the merger. To do
so, we have opted for a {\em statistical} approach: at each faint
so, we have opted for a {\em statistical} approach: at each faint
pixel, we compute the contribution expected from each
pixel, we compute the contribution expected from each
sub-object, using a bivariate Gaussian fit to its profile, and then derive
sub-object, using a bivariate Gaussian fit to its profile, and then derive
the probability for that pixel to belong to the sub-object. For
the probability for that pixel to belong to the sub-object. For
instance, a faint pixel lying halfway between two close bright stars
instance, a faint pixel lying halfway between two close bright \index{stars} stars
having the same magnitude will be appended to one of these with equal
having the same magnitude will be appended to one of these with equal
probabilities. One important advantage of this technique is that the
probabilities. One important advantage of this technique is that the
morphology of any object is completely defined simply through its list
morphology of any object is completely defined simply through its list
of pixels.
of pixels.

To test the effects of deblending on photometry and astrometry
To test the effects of \index{deblending} deblending on photometry and astrometry
measurements, we made several simulations of photographic images of
measurements, we made several simulations of photographic \index{image} images of
double stars with different separations and magnitudes under typical
double \index{stars} stars with different separations and magnitudes under typical
observational conditions (fig. \ref{figsegmentsim}). It is obvious
observational conditions (fig. \ref{figsegmentsim}). It is obvious
that multiple isophotal techniques fail when there is no saddle point
that multiple isophotal techniques fail when there is no saddle point
present in profiles (i.e. for distance between stars $< 2 \sigma$ in
present in profiles (i.e. for distance between \index{stars} stars $< 2 \sigma$ in
the case of Gaussian images). We measured a magnitude error $\leq the case of Gaussian \index{image} images). We measured a \index{magnitude error} magnitude error$ \leq
0.2$mag and a shift of the centroid ($\leq 0.4$pixels) for the 0.2$ mag and a shift of the \index{centroid} centroid ($\leq 0.4$ pixels) for the
fainter star in the very worst cases, but no other systematic effects
fainter star in the very worst cases, but no other systematic effects
were noticeable.
were noticeable.

%---------------------------------- Fig. segmentsim ---------------------------------
%---------------------------------- Fig. segmentsim ---------------------------------
\begin{figure}[htbp]
\begin{figure}[htbp]
\centerline{\includegraphics[width=10cm]{ps/sepsim_pos.ps}}
\centerline{\includegraphics[width=10cm]{ps/sepsim_pos.ps}}
\centerline{\includegraphics[width=10cm]{ps/sepsim_mag.ps}}
\centerline{\includegraphics[width=10cm]{ps/sepsim_mag.ps}}
\caption{
\caption{
Centroid and corrected isophotal magnitude errors for a
Centroid and corrected isophotal \index{magnitude error} \index{magnitude errors} magnitude errors for a
simulated $19^{th}$ magnitude star blended with a $11, 15, 19$ and
simulated $19^{th}$ magnitude star blended with a $11, 15, 19$ and
$21^{th}$ mag. companion as a function of distance (expressed in
$21^{th}$ mag. companion as a function of distance (expressed in
pixels). Lines stop at the left when the objects are too close to be
pixels). Lines stop at the left when the objects are too close to be
deblended. The \emph{dashed vertical line} is the theoretical limit for
deblended. The \emph{dashed vertical line} is the theoretical limit for
unsaturated stars with equal magnitudes. In the centroid plot, the
unsaturated \index{stars} stars with equal magnitudes. In the \index{centroid} centroid plot, the
\emph{arrow} indicates the direction of the neighbour. The simulation assumes
\emph{arrow} indicates the direction of the \index{neighbour} neighbour. The simulation assumes
a 1 hour exposure with the CERGA telescope on a IIIaJ plate and Moffat
a 1 hour exposure with the CERGA telescope on a IIIaJ plate and Moffat
profiles with a seeing FWHM of 3 pixels ($2''$). }
profiles with a seeing \index{FWHM} FWHM of 3 pixels ($2''$). }
\label{figsegmentsim}
\label{figsegmentsim}
\end{figure}
\end{figure}

The user can control the multi-thresholding operation through 3
The user can control the \index{multi-thresholding} multi-thresholding operation through 3
parameters. The first one is the number of deblending thresholds ({\tt
parameters. The first one is the number of \index{deblending} deblending \index{threshold} thresholds ({\tt
DEBLEND\_NTHRESH}). A good value is 32. Higher values are generally
DEBLEND\_NTHRESH}). A good value is 32. Higher values are generally
useless, except perhaps for images having an unusually high dynamic
useless, except perhaps for \index{image} images having an unusually high dynamic
range. In case of memory problems, decreasing the number of thresholds
range. In case of \index{memory} memory problems, decreasing the number of \index{threshold} thresholds
to say, 8 or even less may be a solution. But then, of course, a
to say, 8 or even less may be a solution. But then, of course, a
degradation of the deblending performances may occur. The second
degradation of the \index{deblending} deblending performances may occur. The second
parameter is the contrast parameter ({\tt DEBLEND\_MINCONT}). As
parameter is the contrast parameter ({\tt DEBLEND\_MINCONT}). As
described above, values from 0.001 to 0.01 give the best results. Putting
described above, values from 0.001 to 0.01 give the best results. Putting
{\tt DEBLEND\_MINCONT} to 0 means that even the faintest local peaks
{\tt DEBLEND\_MINCONT} to 0 \index{mean} means that even the faintest local peaks
in the profile will be considered as separate objects. Putting it to 1
in the profile will be considered as separate objects. Putting it to 1
means that no deblending will be authorized. The last parameter
\index{mean} means that no \index{deblending} deblending will be authorized. The last parameter
concerns the kind of scale used for the thresholds. If the image comes
concerns the kind of scale used for the \index{threshold} thresholds. If the \index{image} image comes
from photographic material, then a linear scale has to be used ({\tt
from photographic material, then a linear scale has to be used ({\tt
DETECTION\_TYPE  PHOTO}). Otherwise, for an image obtained with a
DETECTION\_TYPE  PHOTO}). Otherwise, for an \index{image} image obtained with a
linear device like a CCD, an exponential scale is more appropriate
linear device like a \index{CCD} CCD, an exponential scale is more appropriate
({\tt DETECTION\_TYPE  CCD}).
({\tt DETECTION\_TYPE  \index{CCD} CCD}).

No newline at end of file
No newline at end of file