November 6, 2013 at 7:05 pm #468
Here is the XDGNIRS script, for reducing GNIRS cross-dispersed data as far as obtaining a single 1D, roughly flux-calibrated spectrum. The manual (which is found in the “doc” subdirectory in the tar file, and also uploaded here separately for your convenience) explains the use and limitations of the code.
XDGNIRS was written for a specific research project involving XD spectra of bright galaxies, and for those data sets it produces really nice spectra with very little manual intervention. It has been tested on other data sets and in many cases also works well. However, some bugs and inconveniences undoubtedly remain, and there may well be system dependency issues that crop up as well.
Feel free to try XDGNIRS and post here if you have trouble (or to let us know if you find it useful, or if you create an improved version!). We (Rachel, Jen, Andrew) will attempt to help out as time permits, but please be aware that all support will have to be on a best-effort basis only.00
February 27, 2014 at 5:14 pm #602
- This topic was modified 4 years, 2 months ago by rachelm. Reason: Added tags
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.00February 28, 2014 at 11:32 pm #605
That looks really useful. Thanks for posting, Karen!00March 1, 2014 at 4:39 pm #606
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 3 years, 10 months ago by leighly.
You must be logged in to reply to this topic.