\documentclass{article}[12pt]

\usepackage[utf8]{inputenc} \usepackage{votutorial}

\title{H-alpha emitters in X-ray surveys} 
\author{Ivan Zolotukhin and Hendrik Heinl}

\titlepicture{title.png}

\begin{document}

\maketitle


\begin{abstract} 
Starting from an X-Ray catalog, this tutorial tries to find an
``interesting'' object and find out more about it using H$\alpha$ data.
It uses the VO Registry to locate catalogs and data services and,
with some simplifications and shortcuts, tells the story of the
discovery of the cataclysmic variable AX J194939+2631 reported in
Zolotukhin
(2011)\footnote{\url{http://ads.ari.uni-heidelberg.de/abs/2011A\%26A...526A..84Z}}
\end{abstract}

\usedsoftware{\Topcat, \Aladin \WIRR}

\section*{Starting out}

Download jar files of Aladin and TOPCAT if you do not have them. One can
easily find them via Google. To be on the safe side, here are the links:

$$\hbox{Aladin: \url{\linkAladin}}$$ $$\hbox{TOPCAT:
\url{\linkTopcat}}$$

\tutstep{Start TOPCAT and Aladin} On Linux machines, open a terminal,
change to the directory where you installed the software and type:

\begin{verbatim} java -jar topcat-lite.jar java -jar aladin.jar
\end{verbatim}

On Windows and Mac both applications can be started by double-clicking
on a jar-file.

\tutstep {TOPCAT VO cone search} We will do catalog searches -- in the
VO, the standard covering this is called ``Cone Search'', and a client
speaking that protocol is TOPCAT.  So, in TOPCAT do
\menu{VO}\goto\menu{Cone Search}.  Leave the new window open. 


\tutstep{Discovering the X-Ray catalog with WIRR} Assume all we know is
that a catalog of interesting X-Ray objects was published by M.~Sugizaki
and collaborators.  Services and data in the VO are discovered using the
Registry, to which TOPCAT has a built-in interface (the ``Available Cone
Services'' in the window you just opened).  As it does not (currently)
let us look for authors, we're going to use the dedicated Registry
interface WIRR (``Web Interface to the Relational Registry''), which
queries the same basic data but has a few options more.  To use it, open

$$\hbox{ \url{\linkWIRR}}$$

in a web browser.  In the search area open \menu{Text
Fields}\goto\menu{Creator} (which is VO-Jargon for ``Author'') and enter
\entry{Sugizaki}, then click on \menu{Run Query}. After a moment
you will recieve two results, both of which, incidentally, publish the
same data set (this is at the time of writing
don't worry if you get more matches, it will work out just fine).

\tutstep {Sending matches from WIRR to TOPCAT via SAMP} On the bottom of
the WIRR page you see the button \menu{Connect to SAMP hub}. As you may
already guess, clicking on this button will connect WIRR to the SAMP
hub. As SAMP clients can send you essentially arbitrary data, the SAMP
hub will ask if you allow the SAMP connection coming from the browser.
In this tutorial we assume you trust us, or
rather, that you trust http://dc.g-vo.org by clicking on ``Yes''. 
The button at the bottom of WIRR has then changed to \menu{Tabular
Services}. Click this once to transmit the services you found to TOPCAT.

\tutstep {Open Catalog in TOPCAT} Go back to the open TOPCAT VO Cone
search window. Here you now see the two catalogs listed we found via
WIRR in the step before. Click on one catalog once. At the bottom of
this TOPCAT window in \menu{Cone Parameters} you will see, that in
\menu{Cone URL} and entry appears. Click on the other catalog once and
see, that this entry changes. Now choose the catalog with
\menu{Shortname} \entry{J/ApJS/134/77}. 

We will (perhaps somewhat untypically, because in the VO it is usually a
good idea to try to download as little as possible) download the entire
catalog via the cone search. To do that, in \menu{Cone Parameters}.
enter
\menu{RA}\entry{0}\entry{degrees}, \menu{Dec}\entry{0}\entry{degrees})
at the sky and set \menu{Radius} to \entry{180} (make sure the unit is
at its dafault \entry{degrees}). Then click
OK.  The Window will close and the catalog will be downloaded.

Let's have a look
at the data: Go to \menu{Graphics}\goto\menu{Sky Plot} in the menu. You
should see a bunch of points along the Galactic plane around Galactic
center.  

\tutstep{Discovering a catalog of H$\alpha$ sources} We now want to
correlate this with infrared data.  Let us use TOPCAT's built-in
registry search this time, so open \menu{VO}\goto\menu{Cone Search}
again.  Enter \texttt{H alpha} in \menu{Keywords}; you will get back
quite a few services; it would be nice if you could say something like
``and should cover my data,'' but we're still working on that in the VO.

So, just don't discard that domain knowledge just yet.  So, let's assume
we already know we want to use data from the IPHAS survey.  The first
step is to single out the parts of ASCA for which we can expect IPHAS
data.  We will do this in a somewhat pedestrian fashion by downloading a
catalog of H$\alpha$ IPHAS sources.  So, this time in TOPCAT search for
for \texttt{H alpha IPHAS} and check the results.  A service we can
conveniently use to find the common footprint of ASCA and IPHAS is
\texttt{J/MNRAS/384/1277} by Witham and collaborators.

Since that catalog is fairly small, too, let's again pull it in in full;
your settings (\menu{RA} \entry{0} \entry{degrees}, \menu{Dec} \entry{0}
\entry{degrees} set \menu{Radius} \entry{360} \entry{degrees}) should
still be there, so a double click on the Witham entry should be enough
that happen.

\tutstep{Exploring the catalogs} Open \menu{Graphics}\goto\menu{Sky Plot}.
The catalog is displayed on a sphere.  Let us overplot our X-Ray data
now.  
Click on ``Add a new positional
plot control to the stack'' (TBD: add\_new\_positional.png einfügen)
icon. Then chose the other catalog in
\menu{Position}\menu{Table}\entry{J/ApJS/134/77}. Both catalogs are now
displayed on the sphere. By holding the left mouse button, you can move
the sphere. You can zoom in and out using the mouse wheel. We're
interested in ASCA sources where the two catalogs intersect.

\tutstep{Create a subset} To extract them from the full ASCA table,
we're going to use a particularly nifty feature of TOPCAT: subsets.
First, select the ASCA plot in the lower left pane in the plot window.
Then, in the menu of the plot window hit 
\menu{Subsets}\goto\menu{Draw Subset Region}. Now you can manually
draw a region around the X-ray sources from the ASCA catalog within the
IPHAS (in this case the Witham catalog) footprint.  Then hit
\menu{Subsets}\goto\menu{Finish Drawing Region}, after which your are
asked to enter a \menu{New Subset Name}.  You could use something like
\entry{asca/iphas} and click \menu{Add Subset}. In the plot, points of
the new subset are then drawn in a special color.

\tutstep{Make a table from the subset} Generally, you can work with
subsets as if they were tables, but sometimes -- like, when subsetting
them -- it's much easier if they are full, proper tables.  To make a
table from a subset, here's a little trick:  In TOPCAT's main window,
look for the \menu{Row Subset} selector (it's in the \menu{Current Table
Properties} pane).  With your ASCA table selected, choose
\entry{asca/iphas} in there, and then do \menu{File}\goto\menu{Duplicate
Table}.  Presto -- you now have a new table containing about 27
sources. The next steps work with this table.

\tutstep{Selecting distant hard X-Ray sources} \label{tut:seleting}
To filter out various
X-ray active stars (that behave much like the sun with coronal activity,
which is boring for what we plan here), let us select sources both
distant and hard. On average, the higher $N_H$ is, the more distant the
source is. The lower $\Gamma$ is, the harder the spectrum is.

Let us first get a feeling for what kind of data we are dealing with, so
in the TOPCAT main window hit \menu{Graphics}\menu{Plane Plot}. As
\menu{X:}, plot \entry{NH}\footnote{If you don't
find \entry{NH}, go back two steps and make sure you marked 
the right table before applying the rowset - which most likely means: mark 
the other one.} (number of hydrogen atoms on the line of
sight; it is obtained from the model which was used to fit the X-ray
spectrum of a source), for \menu{Y:} choose \entry{Gamma}.

Given that image, let's define ``hard and distant source'' as the subset
with the properties $\Gamma < 3$ and $N_H > 10^{22}\,{\rm cm}^{-2}$.
You could hand-draw that as before, but with conditions like this, it's
probably better to just let TOPCAT evaluate these conditions
numerically.  So, in TOPCAT's main window do \menu{Views}\goto\menu{Row
Subsets} and in there \menu{Subsets}\goto\menu{New Subset}.

In the resulting dialog, give ``hard/far'' as the subset name and
\entry{nh>1 \&\& gamma<3} as the expression.  This should give you about
seven objects.

\tutstep{Obtain narrow-band photometry} We now request all stars with 
H-alpha narrow band photometry existing in IPHAS around the coordinates 
we obtained in step \ref{tut:selecting} (TODO: Nachsehen, ob der Link
auch geht).
Choose \menu{VO}\goto\menu{Cone Search}. In
\menu{Keywords} enter IPHAS and click \menu{Submit Query}.
Among the catalogs found choose ``IPHAS IDR service'' and in the secondary
selection opening then select  ``IDR, PhotoObjBest.'' 

We now want to arrange things such that IPHAS IDR is queried whenever
you select an object from ``asca/iphas''.  To do that, in TOPCAT's main
window select that table and hit \menu{Activation Action}.
In the window opening then activate \menu{Transmit Coordinates} 
and click "OK". Check the box \menu{Broadcast Row}. 

In the plot window click on the source with $\Gamma \approx 2.61$, 
${\rm NH} \approx 3.39$. In the Cone Search window you see
these values are now used in the cone parameters; they will follow
whatever you select in either the plot or the table.

The error boxes of our X-ray sources are about $1.2\,{\rm arcmin}$, so
enter this as the search radius
hen press OK. There should be the table with ~400
rows loaded.

\tutstep{}Add 2 new columns with colors in the table to be able to plot
a
color-color diagram from IPHAS data easily. Views $\to$ Column Info
$\to$
Columns $\to$ New Synthetic Column. Fill Name (R - I and R - Halpha) and
Expression (coremag\_r - coremag\_i and coremag\_r - coremag\_ha,
correspondingly) only.

\tutstep{} We now what to apply the method of Drew at al.
2005\footnote{http://adsabs.harvard.edu/abs/2005MNRAS.362..753D} to ???

Plot the color-color diagram for these sources. Graphics $\to$ Plot. X
axis: R - I column, Y axis: R - Halpha column. First, zoom to the valid
measurements area by holding left mouse button and dragging a rectangle
around central cloud of points. The wider and brighter H-alpha emission
in object's spectrum is, the higher is its position on this diagram.
Press Add auxiliary axis button in the plot window and add brightness as
a third axis, e.g. coremag\_r column (do not forget to tick axis Flip
checkbox, so that brighter stars are in red which seems to be more
intuitive). Add uncertainties to the diagram: press Toggle X error bars
on/off, and same for Y axis. Either choose coremagerr\_r column, or more
honest, add expression coremagerr\_r + coremagerr\_i and the same for
H-alpha as an error column. Note that sources on the very top are violet
(i.e. very faint) and one can hardly trust their measurements, their
errors are quite big as well. Then we must say, that here we have not
IPHAS sources but IPHAS detections. It means that 1 point corresponds to
1 measurement of a source and for a single object there can be several
measurements. 

Click on Edit style for row subset All in Row Subsets
area, then click Linear Correlation in the new window and press OK. This
is just for clearness because this straight line roughly corresponds to
main sequence stars which do not exhibit H-alpha emission. At the same
time outlier points correspond to H-alpha emitters. We need to
understand which points at this diagram represent our X-ray object.

Do
not close this window since we will use it later. Even now we can notice
3 green points with relatively small error bars in X=0.5-0.7, Y=0.6-0.8
region, which outlie from the main cloud to the top. One can notice that
these are just 3 measurements of a single object (for example, highlight
them one by one by clicking on the points at the diagram and look
simultaneously at the Table Data window you should open before; these
all have almost identical coordinates).

\tutstep{} We now want to have a look at suspicious objects.  In the VO,
the simplest way to retrieve images is the Simple Image Access Protocol
(SIAP).  TOPCAT can speak this protocol (again, in the VO menu).
In Keywords, enter \entry{IPHAS} again and hit \menu{Submit Query}. 
Choose the ``IPHAS images'' service shown then and again click on the
row you're interested in.  Then send off the query and open the
resulting table containing metadata of matching images.

\tutstep{Sending coordinates from TOPCAT to Aladin} TOPCAT is not good in working with images. Therefor we need a different tool. Amongst VO tools, a good choice is Aladin. Now we let TOPCAT send coordinates to Aladin using SAMP. We launch Aladin. Then we return to the TOPCAT main window and highlight the IPHAS images table. Then open \menu{Interop}\goto\menu{Broadcast table}. The table will now be send to all "listening" SAMP clients. Right now, besides TOPCAT (remember that we sent data from WIRR to TOPCAT) the only listening client is Aladin. Going to Aladin now, we see, that a Server Selector has been raised, which is listing all IPHAS images grouped by filters.

\tutstep{Downloading images with Aladin}
Since we are interested in H-alpha sources, we choose the H-alpha filter. Now check the box next to one of the images and click on \menu{submit}. Aladin will now load the FITS file. Images can be big, so be patient at this step. 
You can tune cuts of the image by holding the right mous button and moving the mouse to left and right. Easy zooming works with the mouse wheel and double clicking will center the image. 
In TOPCAT click on the IPHAS sources table on the left of the
main window and then broadcast it. Note that Aladin plotted these
sources over the IPHAS images.

\tutstep{} Check if there are deep X-ray observations of this field in
Aladin. Unzoom it first to see the whole image and then choose File
$\to$
Load catalog $\to$ Missions in VizieR $\to$ logChandra. There is one observation
available for this field in Chandra archive. Click on this point
overplotted on IPHAS image and check that this is observation with ObsID
8236 (will be shown in the table below the image in Aladin window).
Press High button there to load high resolution X-ray imaging dataset
from Chandra archive. Wait a bit and there will be X-ray image loaded
with the single black object in the center. Tick the box in front of
H-alpha image in Aladin data stack (on the right in the main window) and
note that there is small stick appeared in front of the IMAGE[0] X-ray
image. You can move it by holding left mouse button to change
transparency of this layer. Note that the only X-ray object visible
corresponds to a single star from H-alpha image. Turn on IPHAS catalog
layer in Aladin (tick the box next to it) and click on the markers
plotted over our H-alpha and X-ray object. When you click on a marker in
Aladin, it is highlighted in TOPCAT color-color diagram window, which is
very convenient, you need not to match sources manually. Note that our
X-ray source is H-alpha emitter since it lies higher than main sequence
linear regression. You can discover that these 3 points correspond to a
single object which do exhibit H-alpha emission, probably even variable.
Therefore, using Chandra and IPHAS data we can suspect this optical
object to be unknown ASCA source counterpart indeed.

\tutstep{} Write down all the information available in the Virtual
Observatory about this source. Estimate H-alpha equivalent width using
narrow band photometry (see fig. 2 in Witham et al. 2006,
http://adsabs.harvard.edu/abs/2006MNRAS.369..581W).

If you are willing to go further, try to check the remaining hard and
distant ASCA sources in IPHAS.


\end{document}
