# public documents.sextractor_doc

## [/] [handle.tex] - Diff between revs 40 and 42

Rev 40 Rev 42
\chapter{Handling of \index{image} image data}
\chapter{Handling of \index{image} image data}
 
 
\section{Image format}
\section{Image format}
{\sc SExtractor} accepts \index{image} images stored in FITS\footnote{\it Flexible Image Transport System}
{\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}).
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)
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
\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
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
are concatenated in one big file; the {\tt EXT\_NUMBER} catalogue parameter must be used to tell
which extension the source belongs to.
which extension the source belongs to.
 
 
For \index{image} images with ${\tt NAXIS} > 2$, only the first data-plane is loaded.
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,
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
{\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
header, it is automatically used by {\sc SExtractor} to compute astrometric parameters. Other
astrometric descriptions
astrometric descriptions
like AST ({\it Starlink} format) \gam{Provide URL in footnote} or the solution coefficients of the DSS
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.
\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
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.
{\tt X} axis, and FITS axis 2'' as the {\tt Y} axis.
 
 
\section{Double image mode}
\section{Double image mode}
If data are available for the same field in several photometric bands,
If data are available for the same field in several photometric bands,
it is usually desirable to measure object characteristics such as
it is usually desirable to measure object characteristics such as
magnitudes exactly at the same positions and through the same apertures
magnitudes exactly at the same positions and through the same apertures
for the different bands, to derive precise colour indices for example.
for the different bands, to derive precise colour indices for example.
{\sc SExtractor} makes this possible by providing a special mode dubbed
{\sc SExtractor} makes this possible by providing a special mode dubbed
double image mode'' where detections are made on one image while
double image mode'' where detections are made on one image while
measurements are carried out on another (both images must have exactly the
measurements are carried out on another (both images must have exactly the
same number of pixels). By repeatedly running {\sc SExtractor}
same number of pixels). By repeatedly running {\sc SExtractor}
with various measurement images'' while keeping the same detection image'',
with various measurement images'' while keeping the same detection image'',
one ends up with a set of catalogues having the same sources measured through
one ends up with a set of catalogues having the same sources measured through
different channels.
different channels. The detection image will generally be chosen in the band
 
where the data are the deepest. Alternatively, using a $\chi2$ image''
In this case, Sextractor should be run first in single image mode on
\citep{szalay:al:1999} (produced e.g., by
the image with the best'' quality, usually the band where the data
\href{http://astromatic.net/software/swarp}{\sc SWarp}) as a detection image,
are the deepest and/or where the seeing is the best (hereafter image
will allow most of the sources present in at least one channel to be detected
1).
and measured.
 
 
Objects will be detected and measured in the deepest image.
Double image mode is automatically engaged by providing {\sc SExtractor} with
 
two images instead of one:
As usual before running SExtractor, make sure that you have defined
 
the parameters you want to measure on the image by editing the
\% {\tt sex detection.fits,measurement.fits}\\
default.param file. You must also edit the default1.sex file (adapted
 
to the characteristics of image 1).
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
You can then run SExtractor on image 1 by typing something like:
carried out on {\tt measurement.fits}.
 

{\tt sex image1.fits -c default1.sex}

 

In order to run SExtractor on a second image (image 2) using the

detections made on image 1, it is necessary to edit a default2.sex

file (adapted to the characteristics of image 2).

 

You can then run SExtractor on image 2 in double image mode by typing

something like:

 

{\tt sex image1.fits,image2.fits -c default2.sex}

 
 
You then obtain two different catalogues for the two images, which
You then obtain two different catalogues for the two images, which
have exactly the same numbers of lines and can be put together.
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
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
measure them in double image mode as well, always taking as a
reference image 1, and then combine all the catalogues obtained.
reference image 1, and then combine all the catalogues obtained.