\part{A study of episodic mass loss: The detached shells of 
some AGB-stars seen in scattered stellar light}

\chapter{Imaging techniques}

Imaging circumstellar envelopes around AGB-stars through 
scattered stellar light in the optical has proven to be a very elaborate
technique.  Successful detections were preceded by failed attempts. 
The problems being clearly due to the faintness of the envelopes when
probed in scattered stellar light.  The reduction of the data also
turned out to be a rather complicated matter.  The difficulty lies in
separating the contribution of the stellar light scattered in the
circumstellar medium from that scattered in the Earth's
atmosphere and the telescope.  In what follows it is given a
description of the observational strategies that led to detections
both in direct and polarimetric imaging as well as the method used to
reduce the data.

\section{Observations}
The performance of the observations was a constantly evolving issue.
Many different instrumental setups have been tried out to maximise the
probability of detecting the envelopes in scattered stellar light.
The experience obtained in previous runs proved to be a key factor for
progressively improving the quality of the detections.  The weather
has also contributed in many occasions. It, rather than the setups,
determined the success or failure of the different runs.

\subsection{The telescopes}
Needless to say that the larger the telescope collecting area the
better results one can expect.  Only two medium size telescopes were
available for this project: The ESO 3.6m telescope in the
southern hemisphere and the 2.5m Nordic Optical Telescope (NOT) in the
northern hemisphere.

\subsubsection{ESO 3.6m}
It is situated in La Silla Observatory (Chile) and therefore it was 
used to observe the southern targets. It turned out to be a unique 
telescope for the outcome of this project. Its equatorial mounting and the 
existence of a focal reducer camera were crucial for obtaining the 
best quality images presented in {\bf Papers~I \&~II}.

\subsubsection{NOT}
This telescope is grounded on El Roque de los Muchachos in the island of La 
Palma. Apart from a smaller mirror, it uses an alt-az mounting. The 
latter clearly reduced the chances for detecting scattered stellar light 
from the envelopes, complicated the data reduction process and 
impoverished the quality of the images. The reason being that in 
alt-az telescopes the spider diffraction pattern of the secondary 
mirror is spread over the images by the rotation of the instrument 
during the observations. The situation is worse in long exposures or 
if the star is closed to the zenith. In most cases a significant loss 
of azimuthal information is irremediable.

\subsection{The cameras}
The flux of the stellar light scattered in the circumstellar medium is
very low when compared to the direct stellar flux.  They typically
differ by three orders of magnitude.  In addition, the weak scattered
light is spread over an area substantially larger than the dominating
part of the stellar point spread function (PSF).  Therefore, the use
of a coronograph is essential if we are to separate the light
scattered in the circumstellar medium from the direct stellar light
which is scattered in the Earth's atmosphere and the telescope.  The
coronograph also allows for long exposure times that would otherwise
lead to saturation of the CCDs.

A coronographic mask requires the use of a focal reducer camera, i.e.,
a camera that focuses two times the incoming light.  The coronograph
is placed in the first focal plane.  The second focus with a reduced focal
ratio occurs at the CDD. This requirement lowers the number
of telescopes where this type of observations can be performed.

\subsubsection{EFOSCs}

These are the cameras mounted on the ESO 3.6m telescope.  EFOSC1 was
used in our early observations but it is no longer on offer. It was
replaced by EFOSC2.  Some of the images presented in {\bf Papers~I
\&~II} were taken with this camera.

The observations were always done in binned $\times$2 mode,
irrespective of the CCD used.  The reason being that the spatial
resolution given in the binned $\times$2 mode was in all cases
sufficient [as compared to typical seeing values at the different
sites].  Furthermore, binned images allowed lower exposure times for
the scarce scattered stellar photons stemming from the envelopes to
overcome the threshold of the readout noise. They also decreased the
CCD reading time.  The binned $\times$2 plate scale of EFOSC1 was
0\arcsec.61/pixel.  Eventually EFOSC1 was replaced by EFOSC2.  The
angular resolution of the images taken with EFOSC2 is
0\arcsec.32/pixel.

\subsubsection{ALFOSC}

It is the camera mounted on the NOT. As mentioned above it rotates
during the exposures as the telescope tracks the star.  The binned $\times$2
pixel plate scale is 0\arcsec.38.  Only in one object, due to the
small angular size of its detached shell, unbinned images of
0\arcsec.19/pixel were preferred.

\subsection{The instrumental setups}

The instrumental setup varied for the different runs. Apart from 
a coronographic mask, a set of filters and Lyot stop was used. In 
imaging polarimetry a polarimeter was also employed (see
Fig~\ref{instsetup}).

\begin{figure*} \centering \vspace{9.6 cm}
\special{psfile=efosc.eps hoffset=50 voffset=275 hscale=50 vscale=50 angle=-90}
\caption{A schematic view of the most efficient instrumental setup used for imaging polarimetry with the ESO 3.6m telescope and the EFOSC2 camera} 
  \label{instsetup}
\end{figure*}

\subsubsection{Direct imaging}

\paragraph{The coronographic mask}
The use of a coronograph is essential in order to detect the faint
stellar light that is scattered in the envelopes.  An important issue
here is the size of the mask to be employed.  The ideal occulting mask
is small enough to allow probing of light scattered in regions close to
the stars, but large enough that the direct stellar flux does not
dominate the detected light or saturate the detector in too short
exposure times.  The latter was the case when we used a mask of
5\arcsec~in radius.  In very short exposures ($<$60~sec) the direct
stellar fluxes saturated the CCD while the number of scattered stellar
photons from the envelopes was well below the readout noise.  Under
these circumstances, no matter how many exposures are added up (i.e.,
how much the total integration time is) the result is always a
non-detection.  After several tests in the first runs we came up with
a coronographic mask of 8\arcsec in radius as the optimal size for our
observations irrespective of the target. In only one case we wanted to
probe regions close to the star due to the small angular size of its
detached shell. We were then forced to decrease the size of the mask
despite the disadvantages.  The design of the coronographic masks was
improved throughout the succeeding runs.  

The first observations were taken using a black spot on a glass plate
placed in the focal plane.  Such a coronograph has clear
disadvantages.  The glass plate introduces optical distortions that
appear in the images as spikes and striations.  It also changes the
telescope focus for observations in different filters, which implies
that more time has to be used in the overheads.  In subsequent runs we
tried out a needle/spot coronograph instead.  The results were better
but still not optimal since the images contained light diffracted
along the supporting needle.  We finally used a small, black metal
disk on top of 7 \micron-wide kevlar spiders.  This turned out to be
by far the best coronograph design, providing very neat images.


\paragraph{The filters}

Two high-quality filters that were especially acquired for this
project have been extensively used in the different runs.  They
provided us with the main detections of stellar light scattered in the
circumstellar envelopes.  They are narrow band filters ($\approx$
50\AA~FWHM) centred on the resonance lines of NaI (5890\AA~and
5896\AA; the D lines) and KI (7699\AA).  They are referred to,
respectively, as the Na~D and the K~I filters in {\bf Paper~I} and as
the F59 and F77 filters in {\bf Paper~II}.

In the case of resonance line scattering, i.e., if the gas atoms are
responsible for the bulk of the stellar light scattered in the
envelopes, narrow filters are most desirable.  They reduce the amount
of direct photospheric light in the images, and thereby increase the
contrast of the circumstellar line-scattered stellar light.  An ideal filter
would be one centred on the considered line and with the typical
width of that line under the conditions commonly present in the CSEs
of AGB stars.  However, such a narrow filter would introduce unwanted
difficulties in the observations, such as a temperature dependence
of the transmitted wavelengths, and wavelength shifts over the image
that are greater than the filters widths (produced by the large
difference in angle at which light passes through the filter from one
side of the field to the other in a parallel beam instrument). 

The drawback of using 50\AA~wide filters is that the resonance lines
of NaI and KI ($<\approx$0.5\AA~wide under the conditions in the CSEs)
only cover a small fraction of the filter bandwidths.  Therefore,
observations taken in these filters contain information on the
scattering by both the gas and the dust particles in the envelopes,
clearly a weakness for the interpretation of the data.  Observations
taken with continuum filters, i.e, filters that do not contain strong
resonance lines are then essential in order to estimate the amount of
stellar light scattered by the dust grains in the envelopes.  We used
a number of Str\"omgren filters with more or less success.
The Str\"omgren v centred on 4110
\AA~with a 180 \AA~FWHM turned out to be too blue for the red AGB stars.
These stars experience a dramatic drop in their brightness towards
short wavelengths (B - V $\approx$ 3).  Therefore, the number of
stellar photons that can be scattered in the circumstellar medium
decreases drastically, pushing the circumstellar brightness down below
the detection limit, even if the dust scattering efficiency increases
further at shorter wavelengths. The Str\"omgren b centred on 4680
\AA~with a 200 \AA~FWHM was the only continuum filter to provide us
with a successful detection of scattered light in one of our targets,
thereby confirming the existence of dust scattering (see {\bf
Paper~I}).  Images taken with a red filter, Gunn z ($\lambda$=9000
\AA, $\Delta\lambda_{f}$=200 \AA), turned out to be very difficult to
reduce since the stars are so bright that the stellar light scattered
in the circumstellar medium is swamped by the direct photospheric
light even in the presence of a coronographic mask.  Furthermore, the
scattering efficiency is also lower.  Finally, we used a 62\AA~FWHM
filter centred on the SII line at 6730 \AA. In the cold CSEs around
AGB stars there is no ionization of sulphur atoms.  Therefore, it can
be used as a continuum filter for this purpose.  Observations done in
such a filter were expected to produce successful results since the
filter is centred on the wavelength range between the Na~D and KI
lines where most of the detections of stellar light scattered in
envelopes has been done.  Thus, the stellar flux and the dust
scattering efficiency lies in between their values in the resonance
lines filters.  Imaging through a very narrow filter which is tunable
over the KI or Na~D lines was also considered but never carried out.

\paragraph{The Lyot stop}
A conventional Lyot stop is a baffle at the pupil plane shaped to
block light mainly from the secondary spider but can also be used to 
avoid the effects of mirror sag and the primary edge.  Such
apodising mask was always used in direct imaging to remove diffraction
patterns on the images.  In general, however, it did not prevent from
getting two highly saturated stripes, corresponding to the segments of
the spider, along the horizontal and vertical directions of the images. 
The information contained in these directions was not usable and some
cleaning was done in the images during the reduction process.

\subsubsection{Imaging polarimetry}

\paragraph{The polarimeter}
An additional component is needed in imaging polarimetry that can
discriminate between light of different polarisation.  Like the
coronographic mask, the polarimeter varied throughout the
different runs.

The first polarimetric observations were done with the use of a
Wollanston prism as a polarising beam splitter.  Under this
configuration one of the two orthogonally polarised beams is deflected
off 18\arcsec.2 onto an adjoining region of the CCD. To avoid
overlapping between different parts of the field of view (FOV), a
mask, specially designed for this purpose, was placed at the telescope
focal plane.  A number of rectangular dark bands occulted alternate
regions of the FOV (exactly 18\arcsec.2 wide) to allow detection of
both deflected beams.  A single exposure provided us with the
polarimetric information of half the FOV. After shifting the mask, we
obtained a second exposure containing the polarimetric information of
the other half of the field of view.  This configuration has clear
disadvantages, e.g., the fact that during the reduction of the images
the whole FOV, at a given polarisation angle, has to be assembled from
two frames.

In order to overcome the difficulties encountered with the Wollaston
prism, we used a set of four high-quality polaroids in subsequent
polarimetric observations.  The polaroids were set with their axes
oriented at intervals of 45$^\circ$.  With this configuration, four
exposures were required in order to obtain the full (redundant)
polarimetric information.  The use of polaroids has the inconvenience
of losing half of the photons in each exposure, i.e, those with a
polarisation orthogonal to the polaroid axis.  However, it produces
clean, easily reducible images.  

The observations performed in the final runs were done with the use of
a half-wave plate and a fixed polaroid.  By rotating the half-wave
plate in steps of 22.5$^\circ$ we reproduced the configuration
obtained with the four polaroids.  This avoided the difficult task of
aligning the polaroid axes.

\subsection{The observing runs}

The data published in {\bf Papers~I} and {\bf II} were taken during
different runs. Table~\ref{t:obsruns} summarises the different runs,
the type of observations performed and the success in detection of
scattered stellar light. 

The 1994 run at the 3.6m telescope was a test run to check the
feasibility of this type of observations and its suitability for
detecting the stellar light weakly scattered in the CSEs of
AGB-stars. Several detections (of very low S/N-ratio) were made. In
1999 we made use of the new camera EFOSC2 and an improved instrumental
setup to directly image the CSE around U~Ant in scattered stellar
light. It yielded very nice images showing details of the structure of
the CSE (see picture in the thesis cover). We switched to imaging
polarimetry in the runs of 2001 and 2002. In the former we obtained
data on the polarisation of the scattered light in the CSEs around
U~Ant and R~Scl. The weather, however, was not good and the resulting
images are of low S/N-ratio. In 2002, we performed a new run at the
3.6m to obtain better quality data and to expand the study to other
wavelengths and sources (S~Sct). These observations are not material of the
publications (see Appendix) and they will be included in a future work.

The northern-sky sources were observed at NOT, also in several
runs. In 2000 we performed polarimetric observations on TT~Cyg and
U~Cam, yielding detections of scattered stellar light in the first
object. A new attempt to obtain higher S/N-ratio images and to observe
at different wavelengths was done in 2002. Again, the most recent data
still remain unpublished.

\begin{table*}
     \caption[]{Observing runs: ``Direct'' stands for direct imaging and ``Polarim.'' for imaging polarimetry. Bold face indicates the data containing detections of scattered stellar light. Underline text refers to runs which yielded the data presented in {\bf Papers I} and {\bf II}}
      \label{t:obsruns}
      \[
      \begin{tabular}{|l|c|ccc|cc|}
      \hline
      Target & 
      EFOSC1 & 
      \multicolumn{3}{c|}{EFOSC2} & 
      \multicolumn{2}{c|}{ALFOSC}  \\

      \hline
 & 1994$^1$ & 1999 & 2001 & 2002$^2$ & 2000 & 2002$^2$ \\	
      \hline
      R~Scl   & \underline{{\bf Direct}} &   & \underline{{\bf Polarim.}} &   &   &   \\
      U~Ant   & {\bf Direct} & \underline{{\bf Direct}} & \underline{{\bf Polarim.}} & {\bf Polarim.} &   &   \\
      S~Sct   & {\bf Polarim.} & Direct &   & {\bf Polarim.} &   &   \\
      TT~Cyg  &   &   &   &   & {\bf Polarim.} & {\bf Polarim.} \\
      U~Cam   &   &   &   &   & {\bf Polarim.} &            \\
      U~Hya   &   & Direct  &   &    &          & \\
      R~Hya   &   & Direct  &   &    &          & \\
      X~TrA   &   & Direct  &   &    &          & \\
      VX~Sgr  &   & Direct  &   &    &          & \\
      \hline
      \noalign{\smallskip}
      \noalign{$^1$Not involved in the observations performed in this run}
      \noalign{$^2$Unpublished data. See Appendix}
      \end{tabular}
      \]
\end{table*}


\section{Data Reduction}

The large dynamic ranges of the images severely complicate the
reduction of the data.  In particular, the difficulty in the reduction
of our observational data lies in separating the contribution of the
stellar light scattered in the circumstellar medium from the stellar light
scattered in the Earth's atmosphere and telescope.  

\subsection{PSF subtraction}

Even the use of a coronograph cannot eliminate the wings of the stellar
PSF in the images.  For a quantitative analysis of the data, the
presence of such a remaining stellar component needs to be removed. 
Therefore, the reduction of the direct images as well as the
polarimetric images containing the total intensity information is
specially elaborate and it requires of a method to estimate the
contribution of the stellar PSF in the images.

The polarimetric images containing the polarised intensity information
are easier to reduce.  The (unpolarised) stellar PSF is essentially
cancelled out after the reduction since these images are obtained from the
subtraction of observations taken at orthogonal polarisation angles.

A detailed description of the reduction of the direct images is given
in {\bf Paper~I}.  The reduction of the polarimetric observations is
clearly described in {\bf Paper~II}.  Here, we will just refer to
different methods for the PSF subtraction. They can be grouped in two
different categories: convolution techniques and the use of template
stars.

\subsubsection{Convolution methods}

Two popular deconvolution methods, maximum likelihood and maximum
entropy, can in principle be used to eliminate the stellar PSF present
in the images.  Both techniques require a deconvolution kernel
consisting of the best known representation of the instrumental PSF.
One then makes an initial estimate of the "true" source intensity
distribution, i.e., the source intensity distribution that would be
detected in the absence of instrumental broadening.  This image is
convolved with the PSF and is then compared with the observed image
intensity distribution.  The resulting difference image, or residual
image, is stored for reference.  The "true" image intensity
distribution is then modified accordingly (following either the
maximum likelihood or the maximum entropy algorithm prescription), and
the process is repeated.  The change in residual image statistics
(e.g., residual image maximum and standard deviation) over successive
iterations can be used to assess the progress of image deconvolution.

This method is extensively found in the literature and yields
relatively good results.  However, it cannot be used for the reduction
of our observations.  The use of a coronograph implies that the
centres of the stellar PSFs are masked out in the images.  This and
the poor knowledge of the extended PSF hamper the convergence of any
procedure based on convolution techniques.

\subsubsection{Template stars}

An alternative method for the subtraction of the stellar PSFs consists
in observing template stars.  These are stars of about the same
magnitude and spectral type as our targets but do not show scattered
light of a stellar origin.  By being of the same magnitude, the exposure
time required to reach a certain level of counts (ADUs) in the CCD,
which is important when it comes to the normalisation of the PSFs, is
similar to that of the target stars.  Furthermore, the stellar PSFs
are in both cases affected in a similar way, e.g., by temporal
variations in the atmospheric seeing and the telescope focus.  Being
of the same spectral type assures that the variation of the stellar
flux with wavelength is also similar to that of the target stars,
which is important when the objects are observed in different filters.

\begin{figure*} \centering \vspace{9.6 cm}
\special{psfile=startemprof.ps hoffset=120 voffset=-10 hscale=40 vscale=40 angle=0}
\caption{Azimuthally averaged radial brightness profiles of U~Ant (solid line) and a template star (dot-dashed line) in the F77 filter.}
  \label{instsetup}
\end{figure*}

This procedure allows the subtraction of the stellar PSFs in a more or 
less accurate fashion, depending on the seeing conditions, the 
telescope stability,... The use of a coronograph in the observations 
complicates the reduction process since the locations of the stars 
behind the occulting mask are not known, and the central peaks of the 
stellar PSFs are not observed. An IRAF task was developed to allow an 
experimentation with the positions of the target and template star 
behind the coronographic mask, the background levels and the 
normalisation.

The quality of a subtraction is therefore somehow subjective, based on
a visual examination of the residuals. The goal was always to produce
results which optimise the chance of detecting scattered stellar
light. This situation is not necessarily obtained by a minimum
chi-square subtraction due to differences between the PSFs
structures. Nevertheless, the reduced images contain, in the best
case, diffraction spikes and radial stripes that are impossible to
eliminate.

Fig.~2.2 evidences the weakness of the scattered emission. It shows
the azimuthally averaged radial brightness profiles of U~Ant (solid
line) and a template star (dot-dashed line) in the F77 filter,
presented in {\bf Paper~I}. The exposure times of these images are
about 10 minutes. Without the use of a coronographic mask these bright
stars saturate the CCD (above 60000 counts) in about 0.1 seconds.

\subsection{Data calibration}

The calibration of the data is essential in order to make the analysis
more rigorous than a simple qualitative description of the results. 
In order to make an accurate calibration, different types of standard stars
must be observed.  Weather limitations prevented us from observing
standard stars in the majority of the runs.  We were then forced to do
an order of magnitude calibration using indirect methods.

\subsubsection{Direct imaging}

A calibration in physical units of the scattered light fluxes requires
observations of spectrophotometric standards.  This could only be done
(due to bad weather conditions during the runs) in observations of one
of our targets.  The standard was taken from the sample by Hamuy et
al. (1992).  For the rest of objects, estimates of the
scattered light fluxes were done by considering all possible effects
that determine the detected number of ADUs in the CCD.

However, in order to study the nature of the detected light, it is
enough to estimate the total flux of the stellar light scattered in
the circumstellar medium relative to the stellar total flux (in ADUs).
The latter cannot be derived directly from the images since the
central parts of the stellar PSF are masked out by the coronograph.
Images taken without the coronograph are the obvious solution.
However, once more we could not perform such observations either
because of the weather conditions or due to the bright stars
saturating the CCD even with the shortest possible exposure time.

One alternative option was to fit an extended point spread function of
the type found by King (1971) and Piccirillo
(1973) to the wings of the observed stellar PSFs. 
However, the resulting values appear too low by about two orders of
magnitude.  We could not identify the reason for this but we suspect
that the use of a coronographic mask may be part of the problem. 

A second alternative was to calculate the stellar fluxes based on
published magnitudes and spectra.  The variability of the stars
($\approx$0.5 mag at visual wavelengths) introduces some uncertainty
in the calculation, but the obtained values are expected to be within
a factor of two of the actual fluxes.  This alternative also required
that the scattered light fluxes were somehow converted from CCD units
to physical units.  To do so the counts/s were transformed to fluxes
above the atmosphere by correcting for atmospheric absorption,
telescope aperture with a central obstruction, telescope reflectivity,
instrument transmission, and the quantum efficiencies and gains of the
CCDs.  In all, we estimated that the flux ratios derived in this
manner are accurate to within a factor of five.

\subsubsection{Imaging polarimetry}

In imaging polarimetry another type of standards is needed to estimate
the contribution of spurious polarised light in the images.  Thus,
spectropolarimetric standards are used to determine the polarisation
introduced by the telescope and the instrument.  These stars could not
be observed.  However, there is no evidence in the images of such
polarised light, which would have quite a distinct pattern of constant
polarisation degree and angle if introduced by the optical system.
From polarimetric observations done for other projects, the telescopes
and instruments we used are known to introduce polarisation in the
light to not larger degrees than $\approx$ 1\%.  This is well below
the polarisation degrees observed in the light scattered in the
circumstellar envelopes and therefore can be neglected. Furthermore,
the polarimetric observations of target stars with no detections of
scattered light and the template stars provide with an additional
proof of the low instrumental polarisation in the images. A key
factor for the low polarisation introduced by the telescopes/optics
that have been used in this project is that they are Cassegrain
telescopes.  As long as the telescope is symmetrical with respect to
the optical axis, one would expect only small effects, very likely due
to inhomogeneities of the aluminum coating.

For an accurate calibration of the data one needs to observe regions
close to the target stars in order to measure the sky polarisation. 
This can be high in the presence of moonlight.  All our runs were
allocated in dark/grey nights, i.e., in the absence of the moon. 
Therefore, we estimated that such polarisation has a negligible effect
on our results.

Finally, the targets observed in polarimetry imaging are nearby
sources and some of them at high galactic altitudes.  Thus, only very
little polarisation was expected to be introduced by the interstellar
medium.
