On-line data reduction with ESpRIT
ESpRIT (an acronym from `Echelle Spectra Reduction: an Interactive Tool') is a computer code dedicated for automatic on-line processing of unpolarised and polarised échelle spectra (such as those obtained with the MuSiCoS polarimeter). It performs rigorous optimal extraction of échelle spectra, even when the shape of orders is highly non-linear and when the slit projection onto the CCD detector is not parallel to CCD lines or columns.
Operating ESpRIT during a spectropolarimetric run is fairly easy. It consists in two main
steps, the setup procedures to be carried out at the beginning of each
night, and the reduction procedures per se to be launched throughout
the night as soon as data are collected. Note that ESpRIT is operated from the main
Valda workstation itself (keyboard and screen).
where date is a 7 character keyword coding the date of observing, for example 05feb98 for 1998 February 05. This procedure should create (within directory /users/mission/ref) subdirectories esprit, esprit/raw, esprit/spec (if these first three are not already here), esprit/raw/date and esprit/spec/date). In addition to this, it should also create files geom.in, wcal.in, night_int and night_pol in directory esprit/spec/date (if not already present) by carbon-copying the default version or the most recent ones available in your directory. Check that all these directories and files are now present (by typing successively ls, ls esprit, ls esprit/raw, ls esprit/spec and ls esprit/spec/date).
where date has the usual meaning while num1 and num2 are the lower and upper limits in file number for the files you wish to reformat. Check that the reformatted files (that should have names such as 05feb0168, in case date is 05feb98 and the file number is 168) appeared in subdirectory esprit/raw/date (by typing ls esprit/raw/date).
where num1 and num2 are the first and last file numbers of the series of flat field exposures, and ff is the name of the composite file you will create in esprit/spec/date. Check that file ff appeared (by typing ls esprit/spec/date).
You will get a lot of screen output from this command. One of the first things you should start to spot is a line looking like this:
indicating what the readout noise in ADUs is. It should not be
much more than 5.0 or so. If it reaches values larger than 10.0,
warn the night assistant quickly.
Then, you get a list of
the vertical position (in pixel) of each of about 40 orders of the
spectrum (and a 2D fit to these positions, displayed on the graphics window), as well as a
second listing that looks like this:
In this part of the listing, the negative and positive numbers do not have pretty nearly equal absolute value. It indicates that the estimated centre point of first order (that you provided to the code as the first number in the seventh line of geom.in) is slightly off: the order extends from -6.0 to 7.5 pixels with respect to the user-provided centre point, implying that your estimate is thus slightly shifted to the left of the true centre point of the order. You thus need to increase this parameter slightly (by editing file geom.in) to get things right (e.g. as in the template output). You then get a 2D graphical fit to the slit shape as tracked by ESpRIT. You should soon learn what all outputs look like, and thus be able to recognize the existence of a problem when they look odd.
The code starts with a user-provided linear dispersion relation
for one of the orders to be calibrated (fourth line of input file
wcal.in).
On the very first night of the run, you may need to adapt these parameters slightly. To do
this, display file th.s with disp (see below how to use disp),
display order #93 (by using disp option k with zooming parameters
7000 7999 -0.001 0.1), identify the lines with the help of the ThAr atlas
(available in the console room), find out the position and wavelength of at least two lines (by
choosing disp option g and clicking on both sides of each line of
interest) and work out an approximate linear dispersion relation for this order
(which should be close to that of the template wcal.in
file).
In principle, no further corrections to the input file wcal.in
should be needed throughout the whole run.
As the code runs, it prints out considerable
output
and displays the quality of the fits in a series of graphs. From these graphs and a
comparison with the template output (checking in particular
lines giving the rms accuracy of preliminary calibration polynomial
fits, which should always be lower than 1 pm = 10 mA), you can
easily recognize if everything has gone well to this point.
You then need to process each new set of observations as soon as it is collected (either a sequence of four subexposures if one is interested in polarisation spectra, or individual exposures if one is only interesting in unpolarised spectra). Go to directory esprit/spec/date (by typing cd ~/ref/esprit/spec/date) if you are not here already. Processing a new set takes two steps:
where date has the usual meaning while num1 and num2 now stand for the lower and upper limits in file number for the sequence of stellar frames you just finished collecting.
This programme will work for about five CPU minutes for each set of four observations you have given it. It produces no screen output except for a report on the cpu time expended. The reduced spectrum should be in subdirectory pol and should be called output.s (iipeg.s for instance). It is a five column ascii file, whose first three columns respectively list wavelength (in nm), normalised intensity and relative polarisation. In this same subdirectory, you should also find log file output.out containing extensive information on how processing behaved. The last 50 lines are worth a look (type tail -50 pol/output.log to see them), as they contain information on the peak signal to noise ratio within each spectrum order.
You can also attempt cross-correlating some of your processed spectra (using the new technique of Least-Squares Deconvolution or LSD). When fed with polarisation spectra, the LSD code yields an average polarimetric line profile by extracting information from all available spectral lines in the wavelength domain. To achieve this, run command:
add 05feb98 pol/iipeg K1
The programme runs for some seconds, producing a prodigious amount of
output on the screen (every line used is listed individually),
and then gives you some useful summary data on the
signal-to-noise ratio of your average line profile. At the end, the plot programme
displays the mean line, the mean noise across the line, and the mean
polarization signal (from bottom to top). Thus, a few minutes after you finish
a set of observations, you can see their essential polarimetric content.
To run LSD on an intensity (rather than polarisation) spectrum, replace subdirectory pol in add line command by int, and proceed the same way as indicated above.
If you want to save the LSD spectrum created by add, all you have to do is add
a filename (e.g. iipeg_lsd) at the end of the add command shown above, and
the spectrum will be saved to this file.
To examine visually the reduced spectra extracted with
ESpRIT (produced by scripts night_pol or
night_int) or the
LSD profiles (produced by script add), use
the display command disp. To do this, type
disp
You are then asked for the name of the file you want to display (including its pathname relative to the subdirectory you are presently in), and for the file column you want to display. The answer to this second question is