\documentclass[twoside]{article}[12pt]

\usepackage{listings}
\usepackage{textcomp}
\usepackage[utf8]{inputenc} 
\usepackage[eurovo]{votutorial}

\lstset{style=daiquiri, language=SQL}
\newcommand{\imgdir}{../res}


\title {Classifying the SEDs of Herbig Ae/Be stars}
\author {D.Baines, updated by H.Heinl}



\begin {document}
\maketitle

\begin {abstract}
A Herbig Ae/Be star (HAeBe) is a 2-8 Solar mass, pre-main-sequence star (that is, young objects with typical ages of <10Myr) of spectral types A or B. These stars are still embedded in gas-dust envelopes and are sometimes accompanied by circumstellar disks. They are in the gravitational contraction stage and approaching the main sequence (i.e. they are not burning hydrogen in their center).

The overall goal of this tutorial is to become familiar with VOspec and
SPLAT. For that, we are going to build the Spectral Energy Distribution (SED) of a couple of Herbig Ae/Be stars.

\end{abstract}

\usedsoftware{\VOspec \ Version 6.7, \SPLAT \ Version 3.11-1beta}

\section{Starting out}
For this tutorial we need VO spec If you do not
have it already, you can find it here:

VOspec: \url{\linkVOspec}

SPLAT: \url{\linkSPLAT}


\section {Introduction}

Herbig  Ae/Be stars show Balmer emission lines in their stellar spectrum and infrared excess due to circumstellar dust. Sometimes Herbig Ae/Be stars show significant brightness variability associated to clumps (protoplanets and planetesimals) in the circumstellar disk.

The SEDs of Herbig Ae/Be stars fall roughly into two groups: Group I
sources have a relatively strong far-IR flux, which is energetically
comparable with the flux in the near-IR showing an almost flat spectral
energy distribution. Group II sources show a similar near-IR excess as
group I sources but their flux falls off strongly towards the far-IR.
These were first classified by Meeus et al (2001, A&A, 365, 476), see
below figure.

\includegraphics[scale=.4]{\imgdir/SEDs.jpg}

Dullemond and Dominik (2004, A&A, 417, 159) provided a physical explanation for this difference: Group II sources have an outer disk which is protected against direct stellar radiation by a puffed-up inner disc. If the outer disc emerges from the inner disc's shadow, i.e. has a large flaring angle, then its SED resembles that of a Group I source.

\section{VOspec}
\tutstep[Search for spectra services]
The VO protocol to access spectra is SSAP. We will search SSAP services
for spectra of a specific object and then download some. Open VOspec and
at \key{Target} type \entry{HD 100546} and at \key{Size} enter
\entry{0.001}. These are the parameters that define a search around the
position of HD 100546. Note that in the background the name of the
object is resolved to a position by querying SIMBAD. Click on
\key{Query}. The \key{Server Selector Window} will open.  The Spectra,
Photometry and Theoretical Services available in the VO are listed on
the left hand side of the window. A click on a branch will open the
according list of SSAP services.  

\tutstep [Selecting services]
We want to cover a wider waveband range of observed spectra and where
those are missing, select photometry from services providing those from
serveys as SDSS or 2MASS. In the branch \key{Observational Spectra
Services} we check 
\begin{itemize}
\item{\menu{Far Ultraviolet Spectroscopic Explorer}}
\item{\menu{The Hubble Space Telescope Spectra }}
\item{\menu{INES: The IUE Newly Extracted Spectra}}
\item{\menu{The ISO Data Archive Interoperability System}}
\end{itemize} 

In \key{Photometric Services} check \menu{CDS Multicatalogue Photometry
Service} and then click on \key{Query}. The spectra and photometry are
then loaded into the \key{Spectra List} region of the main VOSpec window. 

\tutstep[Find spectra]
There are two different views in the spectra list. You can toggle
between them by clicking the \menu{Tree/Table view} icon on the top
right of the symbol bar. Use the table view to have more information of
the spectra displayed. Hint: make use of the features in the table view.
Double click on the spectra will give you even more metadata for the
spectra. Single click on the column headers will sort the spectra lists. 

\tutstep[Challenge 1: Get metadata of the spectra]
For the \menu{FUSE} \goto \menu{p2190401...} spectra use the
\key{Coverage.Bounds/Start/Stop} columns to get an idea of the covered spectral range. Other important information like the time coverage, the S/N ratio or the resolution can be obtained in a similar way.

\tutstep[Select spectra]
Select the following spectra:
\begin{itemize}
\item{\menu{FUSE}: p219040100000nvo4ttagfcal}
\item{\menu{HST}: O5C901080, O6GY10010 } 
\item{\menu{INES}: LWP16052RL,SWP39712RL}
\item{\menu{ISO}: SWS0, LWS01}
\end{itemize} 

In addition select the following photometric services: 2MASS, AKARI,
HIP, IRAS, SDSS, WISE. Then click on \key{Retrieve}. The selected
spectra and photometry are loaded into the main VOSpec window. 

\tutstep[Analysing the spectra]
After the download you see the spectra and photometric data plotted.
Change the Y axis from \key{Jy} to \key{erg/cm2/s} by clicking on the \key{Flux
Unit} field to the left of the main VOSpec window. Look at the spectra,
zoom in and out by using the left mouse bottom. \\

\tutstep[Challenge 2: Which group does HD100546 belong to ?] \\
Apply the criteria from the introduction to classify HD100546.

Before you continue goto \menu{File} \goto \menu{Save as} to save the
spectra to your local hard drive. As data modell use \key{VO table}. We
will need it later. 

\tutstep[Repetition]
Repeat the steps fot the Object \entry{HD 163296}. Select the following
spectra:
\begin{itemize}
\item{\menu{FUSE}: q219010...}
\item{\menu{INES}: LWP05471RL}
\item{\menu{Hubble}: O66Q01010,O66Q01020,O66Q01030.}
\item{\menu{ISO}: SWS01}
\end{itemize} 

Again take photometry from the previous services. 

\tutstep[Challenge 3: Search metadata]
Sometimes you might want to contact the collegue responsible for this
data collection. Find out the contact and Email adress of \menu{INES}:
LWP05471RL.


\tutstep[Fitting]
Of course spectra analysis is more than looking at downloaded plots.
VOspec does provide functions for fitting functions to spectra. NExt we want to do a Gaussian fit. At first set the spectral flux axis in linear scale.
Then zoom into the region with a strong spectroscopic line, e.g. at
2800\AA. Go to \menu{Select Operations} \goto \menu{Fittin Utilities}.
The \key{Fitting Window} opens. Select the \key{Gaussian} tab and click
\key{Generate}. The fitted Gaussian is plotted over the spectrum and the
parameters used in the calculation are shown in the \key{Fitting Window} (where A=amplitude, x0 = central peak, sigma = standard deviation).

\includegraphics[scale=.3]{\imgdir/gaussian.png}

\tutstep[Filtering]
To apply filtering for a range, we zoom until we fit the range between
2400 and 2800\AA. The go to \menu{Select Operations} \goto \menu{De
noising} \goto \menu{Averaging Filters} \goto \menu{Median}. Select
\entry{10} as \key{Numbers of points}. Click on \key{Filter} to generate
a filtered spectrum. 

\includegraphics[scale=.3]{\imgdir/filtering.png}

\tutstep[Identifying lines with SLAP]
The Single Line Access Protocol (SLAP) is used within the VO to retrieve
spectral lines from various Spectral Line Data Collections through a
uniform interface. We want to use this to identify atomic lines within
an area of our spectra. 
Zoom into the region with the strong spectroscopic line at 2800\AA. Then
go to \menu{Operations} \goto \menu{SLAP}. Highlight the region across
the emission line. The selected region appears yellow and the \kea{SLAP
Viewer window} opens. Within this window open the \key{SLAP Services
tree} and select the \menu{NIST} atomic spectra service. Then click
\key{select}.  A table appears for each service within the \key{Slap
Services Output} field, in our case, only NIST. Go back to the main
VOSpec window. By moving the cursor across the yellow region each atomic
line that lies closest to the cursor is displayed. One can then identify
the most likely atomic or molecular line. Our two lines are the MgII
2795A and MgII 2805A. Click again on \menu{Operations} \goto \menu{SLAP} to deactivate this functionality.

\tutstep[Model comparison]
Sometimes you want to compare spectra with models. In out case we want
to see our observed spectra in the same plot with a Blackbody model
spectra. Load the VO table of HD100546 we saved previously by clicking on
\menu{File} \goto \menu{Open spectrum} and chose the according *.vot file. 
Select \menu{Operations} \goto \menu{Fitting Utilities}. The Fitting
Window then opens. Select the \key{Blackbody}, use a
\key{Teff}:\entry{12000}K and click \key{Generate}. The blackbody will be overplotted to the observational SED.

\includegraphics[scale=.3]{\imgdir/fitting.png}

\section{SPLAT}
Within the VO there is not one single client fitting your needs.
Actually there are lots of clients for different data types that 'speak'
different protocols to retrieve, export or even send data between two
applications. Thus the VO is not about to advice which client to use,
but more likely to define standards and protocols so you can chose the
client that will fit your demands the best - or just to use your
favourite software. SPLAT ist another client for spectra access and
analysis which shall be briefly introduced here.
\tutstep[Searching spectra]
Open splat from command line. The command depends on you OS, on
UNIX-alike machines it will be similar to \key{<home>/bin/splat/splat}. 
Go to \menu{File} ßgoto {SSAP}. The \key{Query VO for Spectra} window opens.
Type \entry{Nova Cygni 1992} into the \key{Object'} field, and click
\key{Lookup}. The coordenates of the object appear in the according
fields. Select \entry{0.1} arcminutes in the \key{Radius} field. Select
\key{Query format} \entry{All} and Wave Band \key{UV}. Click on the
green \key{Send Query} at the right. A new window opens.

Click on the \key{IUE} tab. Select ten \key{lwp} spectra. Hint: look for
the \key{instrument} column label). Click \key{Display selected}. The selected spectra will be loaded into the 'Global list of spectra' on the main SPLAT window and they will be overplotted in the same graphic window. The differences in the MgII 2800 emission line are clearly visible.
\tutstep [Animate spectra]
In SPLAT main window go to \menu{View} \goto \menu{Animate spectra}.
Select several spectra and click \key{Start}. New windows open where the
selected spectra are displayed one at time, as a movie. Change the X
axis range by clicking on \key{Plot configuration window} and setting
the Lower Y to zero. Click \key{draw}. The differences in the MgII 2800 emission line are clearly visible. 


\section {Solutions}

\begin{enumerate}
\item{The covered waveband range is 900 to 1190 \AA, the S/N is 4.17}
\item{HD100546 is a group I Herbig Ae/Be star}
\item{Enrique Solano, esm@cab.inta-csic-es}
\end{enumerate}
 
\section{References}

\begin{description}

\item[]Acke and van den Ancker (2004, A&A, 426, 151)
\item[]Dullemond and Dominik (2004, A&A, 417, 159)
\item[]ESA VO Team (http://esavo.esac.esa.int/VOSpecManual/)
\item[]Meeus et al (2001, A&A, 365, 476)


\end{description}


\end{document}
