\section{\xlabel{SUPER_RECIP}\label{SUPER_RECIP}Superimposing and
Contouring Images}

This recipe is an example of superimposing two images in order to compare
them.  GAIA has two mechanisms for superimposing images: displaying two
or more images and rapidly blinking between them (in a manner analogous to
the `blink comparator' used to compare photographic plates), and displaying
one image as a set of contours superimposed on a display of the other.
This recipe demonstrates the latter technique.

GAIA aligns images by using their World Coordinate Systems (WCS; see
Section~\ref{WCS}).  Images that do not have a WCS are aligned by assuming
that their pixel coordinates are coincident, which can be useful in some
circumstances.  Images extracted from the Digitised Sky Survey (DSS) have
a WCS, and this recipe will use the DSS image of NGC 1275 retrieved in
Section~\ref{RETRIEV_RECIP}.  Contours constructed from an X-ray image of
the same region of sky will be drawn on top of it.  The X-ray image is
contained in file {\tt ngc1275hri.fits}.  It was obtained with the HRI (High
Resolution Imager) on-board the ROSAT X-ray astronomy satellite ({\it
R\"{o}ntgensatellit}\/).  The copy used here was retrieved from the
\htmladdnormallinkfoot{LEDAS}{http://ledas-www.star.le.ac.uk/}
data archive service at the
\htmladdnormallink{Department of Physics and Astronomy}
{http://www.star.le.ac.uk/}, University of Leicester.  The image is in
FITS format (see Section~\ref{FORMATS} for details of the data formats
available to GAIA) and it too contains a WCS.

Proceed as follows.

\begin{enumerate}

  \item It is useful to examine the X-ray image of the NGC 1275 region
   before trying to contour it.  (You could skip these steps if you
   were already familiar with the properties of the image to be contoured).
   Start GAIA and load file {\tt ngc1275hri.fits}.

  \item Adjust the colour so that the very nucleus of the X-ray emission
   is clearly visible.  For example, set the {\sf Auto Cut:} to 100\%.
   Then click on the {\sf View} menu and select the {\sf
   Colors\ldots} option.  A panel will appear.  Set the colour scale
   algorithm to {\sf Logarithmic}, the colormap to {\sf heat} and the
   intensity to {\sf ramp}.  The display should now appear similar to
   Figure~\ref{SUPER_R_HRI}.

   It is immediately obvious that the sky appears very different at X-ray
   and optical wavelengths.  Also, by moving the cursor from one edge of
   the image to the other and noting the change in Right Ascension or
   Declination it is apparent that the image is rather larger than the
   7\arcmin field extracted from the DSS.

  \begin{figure}[htbp]
     \centering
     \includegraphics[totalheight=6in]{sc17_super_r_hri.ps}
     \begin{quote}
     \caption[An X-ray image of NGC 1275]
      {An X-ray image centred on the galaxy NGC 1275.  The image was
      obtained with the HRI instrument on the ROSAT satellite
     \label{SUPER_R_HRI} }
     \end{quote}
  \end{figure}

  \item {\bf Aside:} you might be interested to check that the X-ray
   image really is centred on NGC 1275.

  \begin{enumerate}

    \item Click on the {\sf Data-Servers} menu, towards the right of the
     menu-bar at the top of the main window and choose the {\sf Catalogs}
     option.  Select the {\sf RC3 at CADC} catalogue, which is a version
     of the {\it Third Reference Catalogue of Bright Galaxies}\/\cite{RC3}
     provided by the
     \htmladdnormallinkfoot{CADC (Canadian Astronomy Data Center)}
     {http://cadcwww.dao.nrc.ca/}.

     A window similar to Figure~\ref{RETRIEV_R_PMM} should appear.  Click
     on the {\sf Search} button (in the bottom left of the window) and
     after a couple of moments the galaxies in the RC3 which overlay the
     X-ray image will be listed in the {\sf Search Results} box and plotted
     in the main window.

    \item One of the plotted objects is almost exactly coincident with the
     centre of the X-ray emission.  If you click on this symbol the line
     for NGC 1275 is highlighted in the {\sf Search Results} box.

    \item If you double-click on the line for NGC 1275 in the {\sf Search
     Results} box the corresponding symbol in the image is labelled as
     NGC 1275.

  \end{enumerate}

  \item Before contouring an image it is useful to have some idea of the
   range of numbers that it contains.  One possibility is to draw a slice
   through the image.  Click on the {\sf View} button on the menu-bar
   along the top of the main window and choose the {\sf Slice\ldots} item.
   You can interactively define a slice through the image which is then
   plotted as a graph (see Figure~\ref{PHOTOM_R_SLICE} in
   Section~\ref{PHOTOM_RECIP}, below, for an example).

   Alternatively, click on the {\sf View} button on the menu-bar
   along the top of the main window and choose the {\sf Pixel Table\ldots}
   item.  A table showing the values of a small grid of pixels centred on
   the current  cursor position is displayed.  You can move the cursor over
   the image examining the values.  For the present purposes the largest
   grid permitted, {\sf 9x9}, is the most appropriate.

   You will probably want to experiment with these options for a while.

  \item You are now ready to proceed with contouring the X-ray image on top
   of the DSS one.  Load the DSS image {\tt ngc1275dss.sdf} into GAIA.  If
   you prefer you can substitute the DSS image that you retrieved whilst
   working through the recipe in Section~\ref{RETRIEV_RECIP}; they should
   be very similar.

  \item Set the colour table and magnification as in
   Section~\ref{RETRIEV_RECIP}: click on the {\sf View} menu and select
   the {\sf Colors\ldots} option.  Set the colour scale algorithm to {\sf
   Linear}, the colormap to {\sf ramp} and the intensity to {\sf neg}.
   Then click on the {\sf Close} button.

   Set the magnification by clicking on the {\sf Scale:} button (in the
   bottom left of the control panel in the centre top of the window) and
   setting it to {\sf 2x}.

   The appearance of the display should now be similar to
   Figure~\ref{RETRIEV_R_MAIN}.

  \item Click on the {\sf Image-Analysis} button on the menu-bar along the
   top of the main window and choose the {\sf Contouring\ldots} item.
   A window similar to Figure~\ref{SUPER_R_CONT} should appear.

  \begin{figure}[htbp]
     \centering
     \includegraphics[totalheight=3.5in]{sc17_super_r_cont.ps}
     \begin{quote}
     \caption{Window for defining contour details
     \label{SUPER_R_CONT} }
     \end{quote}
  \end{figure}

  \item Click on the {\sf Choose file\ldots} button and load file {\tt
   ngc1275hri.fits}.

  \item Click on the {\sf Generate} button (on the left hand side of the
   window, immediately below {\sf Levels}).  A window similar to
   Figure~\ref{SUPER_R_LEVELS} should appear.  Set the following values:

  \begin{center}
  \begin{tabular}{rl}
   {\sf Number:}    & {\tt 5} \\
   {\sf Algorithm:} & {\tt linear} \\
   {\sf Start:}     & {\tt 100} \\
   {\sf Increment:} & {\tt 75} \\
  \end{tabular}
  \end{center}

   The window should now appear exactly like Figure~\ref{SUPER_R_LEVELS}.
   (In this recipe the required contour levels are already prescribed,
   however, the first time you contour an image you will probably need
   to experiment to find suitable levels.  One way to do so is to set the
   {\sf Algorithm:} to {\sf automatic} and allow GAIA to generate the
   levels itself.  If these levels are not satisfactory you can adjust
   them manually.)

  \begin{figure}[htbp]
     \centering
     \includegraphics[totalheight=3.5in]{sc17_super_r_levels.ps}
     \begin{quote}
     \caption{Window for defining contour levels
     \label{SUPER_R_LEVELS} }
     \end{quote}
  \end{figure}

   Click on the {\sf Generate} button and the appearance of the window
   should revert to that in Figure~\ref{SUPER_R_CONT}.

  \item For all five of the specified contours click on the colour boxes
   and set them to red (which makes the contours easier to see if you are
   using the colour table set up above).

  \item Click on the {\sf Draw Contours} button.  Contours of the X-ray
   image will now be drawn superimposed on the X-ray image.  The
   appearance of the plot should be similar to Figure~\ref{SUPER_R_SUPER}.

  \begin{figure}[htbp]
     \centering
     \includegraphics[totalheight=6in]{sc17_super_r_super.ps}
     \begin{quote}
     \caption[X-ray contours superimposed a DSS image of NGC 1275]
      {Contours derived from the ROSAT HRI X-ray image of NGC 1275
      superimposed on a DSS image of the same region
     \label{SUPER_R_SUPER} }
     \end{quote}
  \end{figure}

   It is immediately obvious that the X-ray emission is centred on NGC
   1275 and also that it extends beyond the optical limits of the
   galaxy (recall that the faintest contour drawn corresponds to quite
   a bright level in the X-ray image).

  \item When you have finished inspecting the image click on the {\sf
   Close} button and the contours will disappear.

\end{enumerate}

