% Stellar Atmospheres
% Computer Lab 1
% Fall 2002
% 7 October 2002
% Michelle Mizuno-Wiedner

% Computer exercises on ``Radiative Transfer and Line Formation''
% using software by Mats Carlsson and Oivind Wikstol
% (Institutt for Astrofysikk, Oslo).
%
% 950915        Exercises written by Nils Ryde
% 011008  MMW   Modified
% 020907  MMW   Modified again slightly


\documentclass[12pt]{article}

\setlength{\textwidth}{14cm}
\setlength{\textheight}{24cm}
\setlength{\topmargin}{-15mm}
\setlength{\parindent}{0cm}
\setlength{\parskip}{2mm}

\begin{document}

\begin{center}
  {\Large \bf
   Stellar Atmospheres, Ht 2002 \\[2mm]
   Lab 1: Spectral Line Formation} \\[4mm]
   Lab report due: Tuesday, 22 October 2002
\end{center}


%----------------------
\section{Literature}
%----------------------

The following sections in your course texts may be helpful in
understanding this lab.
%
\begin{itemize}
\item D.~F.~Gray,
      {\it The observation and analysis of stellar photospheres\/}
      (1992): pp.~202--209 on the line absorption coefficient,
      pp.~225--229 on Doppler width and Voigt function, chapter 13 on
      the behavior of spectral lines, and pp.~27--30 on convolutions.
\item R.~J.~Rutten,
      {\it Radiative Transfer in Stellar Atmospheres\/}: parts of
      3.3; 4.2.1; ``surface values'' in 4.3.2; 7.3.1; and 8.2.
\end{itemize}


%----------------------
\section{Introduction}
%----------------------

This computer exercise is a continuation of last semester's exercise
on line formation in a homogeneous slab. Here, you will study spectral
line formation in a one-dimensional model atmosphere. You will use a
computer program that allows you to vary the parameters that determine
the emergent line profile. The Voigt profile (the absorption profile
of the spectral line), the total opacity and the source function are
plotted together with the emergent intensity of the line, which is
given by:
%
\begin{equation}
I^{+}_{\nu}(\tau_{\nu}=0,\mu) \;\; = \;
  \int^\infty_0 S_{\nu}(t_\nu) e^{-t_\nu/\mu} \, dt_{\nu}/\mu
\end{equation}

The idea is to play around with the interactive software and to write
a report on radiative transfer and line formation. The questions in
this text are offered as a guide for writing your report.

%----------------------
\section {Procedure}
%----------------------

The programs are written in the IDL programming language. After
logging on with your user name and password, go to a terminal window
(or open one, e.g., by right-clicking on the workspace background and
choosing ``Hosts/This Host'' from the pull-down menu). Then type
%
\begin{verbatim}
     cd /u1/local/lab/stjarnatmos/Lab1
     idl
\end{verbatim}
%
to start IDL. If you have any problems, the README file in the Lab1
directory describes a couple of things you can try before asking for
help.

Once you have launched IDL, you can start this computer exercise by
typing the command {\tt xtransp}. The program uses sliders to change
the values of the different variables, which are explained very
briefly in a window invoked by the {\tt Help} button. Later, for the
lab report, you may want to use the {\tt Print} button to save screen
output as a Postscript file in your home directory; you will be asked
to type the file name in the terminal window from which you started
IDL. To quit the program, press the {\tt Done} button, then type
\texttt{exit} to quit IDL.


%----------------------
\section {Line Formation}
%----------------------

The five variables of interest here are: the Voigt damping parameter
{\tt a} which determines the shape and maximum value of the Voigt
function; the continuous and line opacities relative to the continuum
absorption coefficient at the reference wavelength 500 nm; the cosine
$\mu$ of the angle between the ray and the normal of the atmosphere;
and the plot range on the $x$-axis in units of the number of Doppler
widths from the line center.

The \texttt{Source} button enables you to choose between two different
source functions $S_\nu$, one for LTE and one for the calcium
line. Give an explanation of the different parameters and what you see
in the different panels. When working on the questions below, draw
what you see and write down important values. Pay attention to the
automatic scales.

Begin by playing around to get the feeling for the different
parameters. For example, choose {\tt xmax}$=20$ and {\tt mu}$=1$. How
is {\tt xmax} defined, and which part of the Sun are you observing
with this value of {\tt mu}?

\begin{enumerate}
\item Explore the damping constant. Explain what a Voigt profile is
      and how its maximum and its shape are determined by the damping
      constant $a$. What kind of profile results for small and large
      values of $a$? When you are finished with this section, set the
      damping constant to $\log a=-3$.
\item Explore the extinction coefficient.
      \begin{enumerate}
      \item How are the damping profile and the extinction coefficient
        related? What does the extinction-coefficient profile look like for
        large and for small line opacities? Try to explain why the extinction
        coefficient appears different in the two cases.
      \item What happens if you increase the continuous opacity? Examine
        different cases by varying the line and continuous opacities. How does
        the line opacity and the continuous opacity relate to the emergent
        profile for weak lines, assuming Eddington-Barbier? What is a weak
        line?
      \end{enumerate}
\item Explore the emergent line profile in the LTE case.  In the
  following, you can keep the damping constant, the continuous opacity
  $\log(\alpha_c / \alpha_{500})=0$ and {\tt xmax} constant.
  %
  \begin{enumerate}
  \item Set the continuous opacity ratio to
    $\log(\alpha_c/\alpha_{500})=0$. Explain what you see in the
    different panels (such as the value of
    $\alpha_{\rm{tot}}/\alpha_{500}$ and the values of
    $\tau\equiv\tau_{tot}$ and $\tau_c$). Calculate the expected
    values of the optical depths. Are the relations the same for any
    $\alpha_c/\alpha_{500}=\alpha_{\ell}/\alpha_{500}$?
  \item What happens if you increase the line opacity moderately? Why? What
    does increasing $\alpha_\ell$ correspond to physically?
  \item Increase the line opacity even more. Do so until an emission peak
    appears. What is happening? Try to explain the situation with the
    Eddington-Barbier approximation. When is this approximation valid? What
    would you expect according to Eddington-Barbier? See what happens if you
    put $\tau_{tot}=1$ (the unit optical depth in the line) in the minimum of
    the source function. Are there other, more correct ways of explaining it?
  \item Can you manipulate the opacities in order to get
        \begin{enumerate}
        \item a pure emission line?
        \item an emission line with absorption in the center, i.e. the
          opposite situation to the one above?
        \end{enumerate}
  \end{enumerate}
  %
\item Explore the the emergent line profile in the Ca case. Change to the
  source function to the one for the calcium line.  Also in the following, you
  should let the damping constant and {\tt xmax} be constant. Start off by
  putting log($\alpha_{c}/\alpha_{500}$)=0.
  \begin{enumerate}
  \item Let the line opacity grow. What happens? Did you expect that? Give an
    explanation. Can one observe this phenomenon in reality? Give an example.
  \item Repeat the performance but for fundamentally different values of the
    continuous opacity. How many different cases can you find?
  \item Can you manipulate the opacities in order to get
        \begin{enumerate}
        \item a pure emission line?
        \item an emission line with absorption in the center, i.e. the
          opposite situation to the one above?
        \end{enumerate}
  \end{enumerate}
\item Discuss the source function. Give
  a qualitative explanation for the LTE source function. Compare
  it to the source function for the calcium line. What is the
  difference? Why?
\item Explore the $\mu$-dependence of the spectral line. Can you explain
  limb darkening?
\item Summarize what you have learned about how absorption and emission lines
  are formed.

\end{enumerate}


%----------------------
\section {Report}
%----------------------

A written report is required. It should contain a description of what
you have been investigating and the results you obtained, both in text
and pictures.  You should answer as many of the questions in this text
as you can, but please feel free to discuss what points were unclear,
pose your own questions, and elaborate on any other things you
learned.


\vfill
\footnotesize

This computer exercise was adapted from the one written by Nils Ryde,
Uppsala Astronomical Observatory, September~15,~1995.  The software
was developed by Mats Carlsson and Oivind Wikstol at Institutt for
Astrofysikk in Oslo. Minor additions were made by Michelle Mizuno. We
would appreciate your comments/suggestions on this laboratory exercise
in order to improve it further.

\end{document}
