leighly

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: GNIRS XD reduction script #606

    leighly
    Participant

    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:
    http://nhn.nhn.ou.edu/~leighly/example_result_star.pdf

    Karen

    • This reply was modified 5 years, 7 months ago by  leighly.
    in reply to: GNIRS XD reduction script #602

    leighly
    Participant

    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:
    http://www.nhn.ou.edu/~leighly/gnirs_2_spex.tar

    This procedure requires that the telluric standard be a A0V star. The
    xtellcor procedure is described in detail in this paper:
    http://adsabs.harvard.edu/abs/2003PASP..115..389V

    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
    xtellcor.

    An example IDL session is below.

    IDL> input_gemini_image=’vtarget_comb.fits’
    IDL> output_image_name=’target_out.fits’
    IDL> template_directory=’/home/Directory_where_tar_file_was_unpacked/’
    – 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.
    IDL> write_image,input_gemini_image,output_image_name,im_out,template_directory

    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
    SpeX spectra.

    Notes:
    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
    xtellcor.
    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.

Viewing 2 posts - 1 through 2 (of 2 total)