Home Download Tutorial 1 Tutorial 2 Tutorial 3 Tutorial 4 Tutorial 5

List of Routines

ULY_TGMDefine a TGM component
ULY_TGM_EVAL Evaluate a TGM model spectrum.
ULY_TGM_EXTR Compute a stellar template spectrum using TGM model
ULY_TGM_INIT Initialize a TGM component

Routine Descriptions

ULY_TGM

[Next Routine] [List of Routines]
 NAME:
                 ULY_TGM
 PURPOSE:
                 Define a TGM component
 USAGE:
                 cmp = uly_tgm(MODEL_FILE=model_file, LSF=lsf_file,      
                               TG=t_guess, LG=l_guess, ZG=z_guess,   
                               TL=t_limits, LL=l_limits, ZL=z_limits,
                               NAME=name, FIXPAR=fixpar, WL=lim_weight)

 KEYWORDS:
   MODEL_FILE    Name of the FITS file containing the TGM model, by default 
                 use: /models/elodie32_flux_tgm.fits.

   LSF           Name of the file containing a relative LSF to be injected in 
                 the template. 

   TG            [K] Guess value for the effective temperature (Teff), by
                 default = 7000.0. If an array is passed, the analysis will 
                 be repeated starting from each element to find the optimal 
                 solution.
   
   LG            [cm/s^2] Guess value for the surface gravity (Logg), by 
                 default = 2.0, it can also be given as an array to search 
                 the absolute minimum.

   ZG            [dex] Guess value for the metallicity ([Fe/H]), by 
                 default = 0.0, it can also be given as an array
                 to search the best minimum from the grid of guesses.

   TL            [K], dblarr(2), limits for the Teff,
                 by default = [3100.0,40000.0] see  ULY_TGM_INIT.

   LL            [dex],dblarr(2), limits for the Logg,
                 by default = [-0.25, 5.9] see ULY_TGM_INIT.

   ZL            [dex],dblarr(2), limits for the [Fe/H],
                 by default = [-2.5, 1.0] see ULY_TGM_INIT.

   NAME          A string, name of this component. By default a unique name is 
                 generated.
   
   FIXPAR        An array used to fix some the atmosphere parameters,
                 0 means that the parameter is free, and 1 that it is fixed.
                 A fixed parameter keeps its initial value.
                 The parameters are specified in the following order:
                 (Teff, Logg, [Fe/H]).
          
   WL            Limits for the weight of each model component [min_w, max_w]
                 The weight is in data units over component units.
                 By default the weight is constrained to be positive.
                 This constraint is ignored when ULySS fits a single component.
       
 DESCRIPTION:
     Return a TGM structure describing a TGM component that can be 
     passed to program ULYSS. 

     TGM stands for Temperature-Gravity-Metallicity: A TGM component 
     specifies a synthesized stellar spectrum evaluated as a function 
     of its atmospheric parameters (Teff, Logg and [Fe/H]), by
     interpolating over a stellar spectral library (e.g. ELODIE 3.2) 
     or over a grid of synthetic spectra.

 OUTPUT:
     TGM cmp struct, for detailed explanation please check uly_fit.pro        

 REQUIRED FUNCTION:
                 ULY_CMP_NAME
                         
 EXAMPLE:
     Fit a CFLIB star: 
     cmp = uly_tgm()
     star = uly_root+'/data/cflib_114642.fits'
     ulyss, star, cmp, lmin=3900.0, lmax=6800.0, /PLOT

 HISTORY:
                 Creation Yue WU 2008/06/18

(See pgm/uly_tgm.pro)


ULY_TGM_EVAL

[Previous Routine] [Next Routine] [List of Routines]
 NAME:            ULY_TGM_EVAL
 
 PURPOSE:           
                  Evaluate a TGM model spectrum.
 
 USAGE:
                  array = uly_tgm_eval(eval_data, para)
 
 ARGUMENTS:
   EVAL_DATA:     The interpolated stellar spectrum model coefficients, 
                  it contains three dimensions of data, specifying to
                  warm, hot and cold stellar regions respectively, in
                  fact, they are the coefficients of the evaluating 
                  polynomial function.

   PARA:          Input 3 atmospheric parameters (Teff, Logg, [Fe/H]),
                  they will be passed to ULY_TGM_MODEL_PARAM to
                  compute out the parameters which will be applied
                  to the polynomial function for evaluating
                  the model spectrum at this given stellar
                  atmospheric parameters (Teff, log g and [Fe/H]).

 DESCRIPTION:
      Evaluate a TGM model spectrum which is interpolated as a
      function of atmospheric parameters (effective temperature,
      surface gravity and [Fe/H]). Each wavelength point is evaluated
      by using up to 21 term polynomials.

      This function is automatically called by the minimization routines:
      ULY_FIT, ULY_FIT_LIN to evaluate a TGM model (see ULY_TGM).
 
 OUTPUT:          
                  Evaluated stellar model spectrum               

 REQUIRED FUNCTION: 
                  ULY_TGM_MODEL_PARAM, compute the parameters 
       
 AUTHOR:
                  Yue WU, 2008/06/18

(See pgm/uly_tgm_eval.pro)


ULY_TGM_EXTR

[Previous Routine] [Next Routine] [List of Routines]
 NAME:                ULY_TGM_EXTR

 PURPOSE:
             Compute a stellar template spectrum using TGM model
                      
 USAGE:               
               model = uly_tgm_extr(<spectrum>, <pars>, MODEL_FILE=<file>)

 DESCRIPTION:
      Compute a 1D stellar template spectrum by using TGM model at a given
      Teff, Log g and [Fe/H]. Rebin it according to the velscale of the input 
      <spectrum> in log scale, adopt compatible wavelength range between 
      <spectrum> and the model (for ELODIE the range is ([3900-6800] A).
       
 ARGUMENT:
      <spectrum>    filename or spectrum structure serving as a reference 
                    for the velscale.

      <pars>        array of parameters([Teff,Logg,[Fe/H]) used
                    to evaluate the template spectrum.

 KEYWORD:              
      MODEL_FILE = <file>
         Filename of the model to use, by default:
         uly_root + '/models/elodie32_flux_tgm.fits' 
 
 RETURNS:    
      A 1D stellar spectrum as a spect structure, see ULY_SPECT_ALLOC
            
 EXAMPLE:
      To compute a template spectrum at a given atmosphere parameters
      according to uly_root+'/data/cflib_114642.fits's velscale.
            model = uly_tgm_extr(uly_root+'/data/cflib_114642.fits', $
                                 [6400., 4., 0.])
 
 HISTORY:
            Yue WU 2008/08/20 

(See pgm/uly_tgm_extr.pro)


ULY_TGM_INIT

[Previous Routine] [List of Routines]
 NAME:
               ULY_TGM_INIT
 PURPOSE: 
               Initialize a TGM component
             
 USAGE:
               cmp_new = uly_tgm_init (cmp, WAVERANGE=lamrange, $
                                       VELSCALE=velscale, QUIET=quiet)

 ARGUMENTS:   
   CMP:        Component defined by using ULY_TGM, please check it for
               more details.

 KEYWORDS:
   WAVERANGE:  Wavelength range used when the model will be
               evaluated with ULY_TGM_EVAL.

   VELSCALE:   Size of one pixel in km/s. Used when the model will be
               evaluated and log-rebinned with ULY_TGM_EVAL.

   QUIET:      verbosity control

 DESCRIPTION: 
      This initialization function is automatically executed by 
      ULY_FIT_INIT when a component has been defined by using
      ULY_TGM. A TGM model component can generate a spectrum at given 
      stellar atmospheric parameters (Teff,log g and [Fe/H]). 

      The name of this function is recorded as a member of
      cmp.init_fun in the TGM component structure (see ULY_FIT for a
      complete description of the component structure).

      ULY_TGM_INIT consists in loading the basic TGM model
      coefficients from a FITS file whose name is saved in
      *cmp.init_data (by default
      /models/elodie32_flux_tgm.fits), and also loads in the cmp 
      structure the WCS.

 HISTORY:
               Creation Yue WU 2008/06/18
 

(See pgm/uly_tgm_init.pro)


This page was created by the ULySS routine uly_html_help.
Contact: ulyss at obs.univ-lyon1.fr Last modified: Fri Mar 1 14:38:46 2013.