Forum Replies Created
Hi Rachel, yes, I think it will be useful for previous SpeX users in particular.
I realized that I forgot to post a link to an example star spectrum that has been processed using this procedure. (xtellcor allows a user to output the A0 star spectrum as a sanity check.) Heres the link to that:
- This reply was modified 5 years, 11 months ago by leighly.
Some GNIRS users may be also IRTF SpeX users, and therefore may be
accustomed to using xtellcor for telluric correction, and xmergeorders
for merging the spectra. GNIRS XD spectra, extracted using XDGNIRS,
can be reformatted to use this software. Note that this is the proper
xtellcor used for SpeX data, not the xtellcor_general that can be used
on generic IR spectra.
A couple of simple IDL programs and a template SpeX spectrum that case
be used to reformat the XDGNIRS extracted spectra are provided here:
This procedure requires that the telluric standard be a A0V star. The
xtellcor procedure is described in detail in this paper:
The advantage over the method included in XDGNIRS is that it is
simpler (since an A0V star is required) and it builds a convolution
kernel to account for the instrumental response. It also has a nice
method to optimally determine shifts and merge orders.
HOW TO USE:
The XDGNIRS script is followed through extraction (step=7). The
resulting files vtarget_comb.fits and vstandard_comb.fits have
a SCI, a VAR, and a DQ extension for each order. The IDL program
simply extracts each SCI and VAR extension, and the wavelengths from
each SCI header. It builds a matrix with columns consisting of the
wavelength, the SCI extension, and error consisting of square root of
the VAR extension, for each order. It then uses modfits to insert
this into a template SpeX spectrum file. This is done for both the
star and the target, and the results can be used directly in
An example IDL session is below.
– the program needs access to ‘spex_template.fits’ which it will copy
and use to write the output to.
IDL> .run ../write_image
% Compiled module: WRITE_IMAGE.
IDL> .run ../make_image
% Compiled module: MAKE_IMAGE.
Now the target file in spex format ‘target_out.fits’, will be present
in your directory. Do the same thing for the telluric standard, and
then you will be able to use xtellcor, almost as though these were
1. The header for the output file is only minimally altered by this
procedure. In principal, one could improve the program to put more
information in the header, but it is not necessary to run
2. As noted in the GNIRS and XDGNIRS documentation, the VAR extension
may not give accurate errors. There are various ways that this
could be fixed, for example, one could measure the variance in the
spectrum at various points in the spectrum and scale the sqrt(VAR)
to match those.
3. The Paschen delta line at 1.005 microns is recommended for the
construction of the kernel in xtellcor (see xtellcor help). This
line appears in order 7 in the GNIRS spectra.