# public documents.sextractor_doc

## [/] [handle.tex] - Rev 42

\chapter{Handling of \index{image} image data}

\section{Image format}
{\sc SExtractor} accepts \index{image} images stored in FITS\footnote{\it Flexible Image Transport System}
format (Wells \etal 1981, see also {\tt http://fits.gsfc.nasa.gov}).
Both Basic FITS'' (one single header and one single body) and Multi-Extension-FITS'' (MEF)
\index{image} images are recognized. Binary {\sc SExtractor} catalogues produced from MEF \index{image} images are MEF files
themselves. If catalogue output is in ASCII format, all catalogues from the individual extensions
are concatenated in one big file; the {\tt EXT\_NUMBER} catalogue parameter must be used to tell
which extension the source belongs to.

For \index{image} images with ${\tt NAXIS} > 2$, only the first data-plane is loaded.
If \index{WCS} WCS\footnote{\it World Coordinate System} information (Greisen \& Calabretta 1995,
{\tt http://www.cv.nrao.edu/fits/documents/wcs/wcs.all.ps}) is available in the
header, it is automatically used by {\sc SExtractor} to compute astrometric parameters. Other
astrometric descriptions
like AST ({\it Starlink} format) \gam{Provide URL in footnote} or the solution coefficients of the DSS
\footnote{{\it Digital Sky Survey} \gam{URL in footnote}} plates are not recognized by the software.

In {\sc SExtractor}, as in all similar programs, FITS axis 1'' is traditionaly referred as the
{\tt X} axis, and FITS axis 2'' as the {\tt Y} axis.

\section{Double image mode}
If data are available for the same field in several photometric bands,
it is usually desirable to measure object characteristics such as
magnitudes exactly at the same positions and through the same apertures
for the different bands, to derive precise colour indices for example.
{\sc SExtractor} makes this possible by providing a special mode dubbed
double image mode'' where detections are made on one image while
measurements are carried out on another (both images must have exactly the
same number of pixels). By repeatedly running {\sc SExtractor}
with various measurement images'' while keeping the same detection image'',
one ends up with a set of catalogues having the same sources measured through
different channels. The detection image will generally be chosen in the band
where the data are the deepest. Alternatively, using a $\chi2$ image''
\citep{szalay:al:1999} (produced e.g., by
\href{http://astromatic.net/software/swarp}{\sc SWarp}) as a detection image,
will allow most of the sources present in at least one channel to be detected
and measured.

Double image mode is automatically engaged by providing {\sc SExtractor} with
two images instead of one:

\% {\tt sex detection.fits,measurement.fits}\\

A space may be used instead of a coma. In the example above,
{\tt sex detection.fits} is used as a detection image, while measurements are
carried out on {\tt measurement.fits}.

You then obtain two different catalogues for the two images, which
have exactly the same numbers of lines and can be put together.

If you have images in other bands covering the same regions, you can
measure them in double image mode as well, always taking as a
reference image 1, and then combine all the catalogues obtained.