data reduction routines
Libre-ESpRIT: a dedicated data reduction package
ESpRIT is a data reduction package developed specifically for reducing echelle spectropolarimetric
data. Developed in 1995 by Donati et al. (1997, MNRAS 291, 658), it implements the main principles of
optimal extraction as devised by Horne (1986, PASP 98, 609) and further revised
by Marsh (1989, PASP 101, 1032), but generalised to retrieve polarimetric information from echelle spectra
with curved orders and tilted slits. ESpRIT was extensively used in the last decade to extract
spectropolarimetric and spectroscopic data secured with the 3.9m
Anglo-Australian Telescope (equipped
with the ucles spectrograph
and the sempol polarimeter) or with the 2m Bernard Lyot Telescope
(equipped with the MuSiCoS spectropolarimeter).
ESpRIT proceeds in 2 steps:
A pipeline reduction shell script allows to process data in a fully automatic way, and to warn
the observer if data are not compatible with expectations.
- the first step consists in performing a
from a sequence of calibration exposures; the position and shape of orders is derived from a mean flat field image while the
the details of the wavelength to pixel relation along and across each spectral order is obtained from a comparison frame;
- the second step achieves spectrum
optimal extraction in itself, using the geometrical information derived in step 1; spectra processed
with ESpRIT include not only the flux and polarisation information, but also a check spectrum (to help identifying spurious
polarisation signatures) and error bars at each wavelength point in the spectrum.
Libre-ESpRIT is the new release of ESpRIT; in addition to being much more automated than its
predecessor (the full calibration step is now performed automatically in a single command line), a number of new important
features are now available (eg possibility of extracting tilted slit spectra on a grid with bins smaller than ccd pixels)
and many critical operations (eg order tracking and order section profile determination) are significantly improved both for
reliability and accuracy.
As opposed to ESpRIT (distributed around at users' request) and to avoid repeating the same errors twice,
it has been decided that Libre-ESpRIT is not a free package ('Libre' meaning here
'autonomous' or 'independent from others' rather than 'available to others');
while the binary files will be operational at cfht for real time processing of ESPaDOnS data, observers will not be able to
bring them back home and (ab)use them for other applications of their own, unless explicit written agreement under strict and
predefined conditions is obtained before hand from the author.
Geometrical calibration (step #1)
As mentionned above, the first step starts with finding all orders present on the ccd and
tracking them across their free spectral range (full length of order); the derived positions are then fitted by a 2d
polynome (with a typical rms accuracy of better than 0.05pxl). The graphical result of this operation is shown on
the right graph, where the estimated and fitted lateral shifts of the 40 orders with respect
to their position at mid ccd are plotted as a function of row number (circles depicting measurements and lines
representing the fit). The longest orders are the red ones (order number #22 and above), while the shortest orders
are the blue ones (order #61 and below), the free spectral range of an order being inversely proportional to the order
number. Note the difference in scale between both axes.
The direction and shape of the slit formed by the image slicer at spectrograph entry is
then evaluated across each
order from a comparison frame (either a Th/Ar or a Fabry-Perot frame) and fitted by a low order 2d polynome depending
on both order number and distance from order centre (for the slit direction) plus a multi-parametric shift function
depending on distance from order center only (for the slit shape, assumed to be identical for all orders).
The previous two pieces of information are then merged together to derive a new curvilinear coordinate
system for each order,
with one coordinate being the distance from order center and the second one the distance along the order from the slit
position at the first pixel of the order. The comparison frame is then extracted within this curvilinear system to
obtain a ThAr spectrum, with flux as a function of distance along each order.
Finally, this ThAr spectrum is used to derive automatically the details of the wavelength to pixel
relationship at order
centre (ie dispersion relation); to achieve this, the code starts by searching, fitting and identifying thorium lines
iteratively in each order with no human help, then fits with a 2d polynome the position of all lines successfully identified
(up to several thousands typically) as a
function of both order number and distance along the order. With this scheme, each line effectively participates, not
only in the wavelength calibration of a single order, but also in the wavelength calibration of all orders simultaneously,
making this process very robust and accurate. The typical rms precision of the derived wavelength calibration at any given
pixel is about 150m/s.
Optimal extraction of stellar spectra (step #2)
In the second step, optimal extraction of each order in each polarisation spectrum of each subexposure
is performed, using the curvilinear coordinate system set up in step #1. The graph on the right shows an example
optimal extraction of a solar spectrum in the particular case of order #30 (centred on
750nm), in which one group of very strong telluric lines is clearly visible in the last third of the order.
The optimally extracted spectra from each subexposure and each polarisation state are then combined together in a specific
way to obtain the intensity, polarisation and check spectra, along with the
error bars associated to each spectrum
point. Finally, automatic continuum normalisation and wavelength calibration (with the dispersion polynomes
derived above) of the resulting spectra is achieved, and radial velocity corrections from earth spin and orbit
motions are applied to the wavelength scale before storing the final result into a multicolumn ascii file.
A complete spectrum obtained with ESPaDOnS and reduced with Libre-ESpRIT is worth about
190,000 data points, each point corresponding to a velocity bin of 1.8km/s.
Automatic pipeline reduction shell script
A pipeline reduction shell script enables to process data in a fully automatic way.
For a given night (whose date is
provided to the shell script as an argument), the script sequentially:
The script can be rerun whenever new frames are available for reduction - in this
case, the process restarts where it stopped after the previous call, skipping all calibrations phases
(provided no new calibration files were obtained) and processing only those spectra that have not yet been
reduced. Rerunning the script at the end of the night reprocesses all exposures, using in particular
all calibration frames collected at the beginning and at the end of the night. Numerous options are available
to provide flexibility for the various conditions in which the shell script is expected to be used.
- finds all available calibration files,
- lists all observing modes used in the night,
- checks that they are compatible with expectations
(and warn the user if not, eg if the readout noise is significantly larger than expected),
- runs the above geometrical calibration (following step #1),
- processes all available stellar frames (following step #2).
The shell script also indicates, for each reduced spectrum, the peak S/N achieved
(per 2.6 km/s spectral bin), the corresponding magnitude of the observed star
(derived from the S/N curve and assuming the instrument has behaved optimally) and the instrumental spectral shift
(resulting from thermal flexures in the spectrograph, and derived from the position of telluric lines in the
spectrum) with respect to the ThAr spectrum used in step #1.
This information is very useful to check in real time the efficiency of the instrument, and to diagnose potential
© Jean-François Donati, last update Nov. 16 2005