next up previous contents
Next: NICS software upgrading Up: GIANO Data Reduction Software Previous: Analysis Tools   Contents

Utilities Tools

Some other utilities will be provided, such a general purpose command-line FITS calculator to allow the user to easily do arithmetic computation of arbitrarily complexity between any wished number of FITS images, by also including computation of averages, weighted averages, median etc.


Automatic Wavelength calibration

Wavelength calibration of echelle spectra usually demands to identify manually a few lines from a calibration lamp exposure on at least three orders well distributed along the echellogram. By using a suitable atlas of spectral lines it is possible to compute a starting guess for the dispersion relation and iteratively refine it by adding more and more lines to the fitting process. Then a global dispersion formula can be fitted to combine the whole set of orders (in this way it is possible to get a more robust fit where only a few lines are visible, like in the red side of spectra).
Left panels: the residual of the wavelength calibration for SARG@TNG expressed in units of Å(upper panel) and pixel (lower panel): 2144 lines have been identified and $rms \approx 0.01$ Å  $\approx 0.23 ~pixel$; right panels: the same quantities for FEROS@ESO-MPI-2.2M echelle: 7526 lines identified with a resulting $rms \approx 0.009$ Å  $\approx
0.19 ~pixel$.

At present the astronomical community seems still lacking a general software able to perform a wavelength calibration without predefined solutions or user interaction. This puts serious limits to the development of data reduction pipelines working in a completely unattended mode. With Giano DRS we have tried to overcome this lack developing a program that uses a starting guess for order dispersion model enough accurate to achieve a good calibration without any user action. This is possible by making use of WCSLIB, a library developed by Mark Calabretta at the Australia Telescope National Facility to handle coordinate systems within FITS standards. Accordingly to the definitions in Greisen et al. (2006), we set:

p: Pixel coordinate (abscissa)

q: Intermediate pixel coordinate

q1: Corrected intermediate pixel coordinate

x: Intermediate world coordinate

s: World coordinate

where:

$q = p - CRPIX_m$

$q1 = c_0 + c_1 \times q + c_2 \times q^2 + c_3 \times q^3 + ....$

$x = q1 \times CDELT_m$

and $CRPIX_m$, $CDELT_m$ are the standard FITS keyword. Transformation from x to s (and back) is computed using spcx2s() and spcs2x() WCSLIB modules: these routines compute physical relation applicable for the dispersers commonly used in astronomical spectrographs to define a world coordinate function and derive spectral coordinates. The relation applies to the simple case of a single disperser and under the assumption that the radiation enters perpendicular to it. The requested physical parameters for such a transformation are the grating ruling density $\sigma$, the order number m, the angle of incidence $\beta$ and the $CRVAL_m$ ($\lambda$ value at reference point).

For each order the following starting conditions are adopted:

\begin{displaymath}
q1 = q,
\end{displaymath} (1)


\begin{displaymath}
CRVAL_m = \frac{2.0 \times \sigma \times sin (\beta) \times cos (\gamma)}{m},
\end{displaymath} (2)


\begin{displaymath}
CDELT_m = \frac{cos (\beta) \times cos (\gamma)^2 \times \sigma \times pix\_size}{f_{cam} \times m},
\end{displaymath} (3)

where pix_size and $f_{cam}$ denote the detector pixel size and the camera focal length respectively. The 1-st relation comes from the expected blaze wavelength, the 2nd from the expected linear dispersion at central wavelength.

At a first stage, for each order the task looks for the $CRPIX_m$ value which maximizes the number of matches between observed and library lines. Linearity of relations $m \times CRVAL_m ~vs.~ m$ and $m \times CDELT_m ~vs.~ m$ is used to distinguish each time well fitted orders from bad ones. In the second stage, the relation $CRVAL_m ~vs.~ m$ is definitively fixed and the task proceeds to find order by order $CRPIX_m$ values and polynomial coefficients $c_0, c_1, ..., c_n$, progressively involving lines from the ends of the orders, where deviations from linearity are more severe, and increasing the degree of polynomials. Much care has been put to avoid the incidence of false line matches as much as possible. Orders correctly modelled are used to derive a global dispersion relation which is suitable to derive an accurate dispersion relation for all missing orders.

As an example, Fig.[*] shows the residuals of the wavelength calibrations for two different spectrographs, namely SARG and FEROS. In both cases the $ rms$ is $\approx 0.2 \div 0.23 ~pixel$, corresponding to $ rms \approx 0.009 \div 0.01 $ Å.



next up previous contents
Next: NICS software upgrading Up: GIANO Data Reduction Software Previous: Analysis Tools   Contents
Marco Lolli 2006-10-23