This page presents the basic usages of ULySS to fit a spectrum against
stellar templates, with a model of atmosphere or with stellar population
models.
The tutorials are written to follow a smooth progression, from commands
requiring minimal understanding of the method (ulyss, <my_spectrum>), to examples demonstrating the flexibility of the package
(make composite fits, set constraints on the parameters...).
GDL> star = uly_root+'/data/cflib_114642.fits'
GDL> ulyss, star
Use default model: Solar spectrum -------------------------------------------------------------------- INPUT PARAMETERS -------------------------------------------------------------------- The fits file to be analyze is ./data/cflib_114642.fits Name of the output file output.res Degree of multiplicative polynomial 10 No additive polynomial Component1 (cmp1) file:./models/sun.fits -------------------------------------------------------------------- Assume that the dispersion is linear (air wavelength) Dispersion axis is 1 (Air wavelength) Assume that the dispersion is linear (air wavelength) -------------------------------------------------------------------- PARAMETERS PASSED TO ULY_FIT -------------------------------------------------------------------- Wavelength range used : 3464.9160 9469.5171 [Angstrom] Sampling in log wavelength : 20.079155 [km/s] Number of independent pixels in signal: 15011 Number of pixels fitted : 15011 DOF factor : 1.00000 -------------------------------------------------------------------- number of model evaluations: 35 time= 1.3920820 Number of pixels used for the fit 15007 cz : 7.5586426 +/- 0.12022885 km/s dispersion : 75.067799 +/- 0.11098115 km/s ---------------------------- chi^2 : 63.815572 ---------------------------- Weight : 0.0057340940 +/- 4.4814766e-07 [data_unit/cmp_unit] ----------------------------
GDL> ulyss, star, MODEL_FILE=uly_root+'/models/elodie32_flux_tgm.fits', /PLOT
-------------------------------------------------------------------- INPUT PARAMETERS -------------------------------------------------------------------- The fits file to be analyze is ./data/cflib_114642.fits Name of the output file output.res Degree of multiplicative polynomial 10 No additive polynomial Component1 (cmp1) model:./models/elodie32_flux_tgm.fits Guess for Teff: 7000.0000 [K], Logg: 2.0000000 [cm/s2], Fe/H: 0.0000000 [dex] -------------------------------------------------------------------- Assume that the dispersion is linear (air wavelength) -------------------------------------------------------------------- PARAMETERS PASSED TO ULY_FIT -------------------------------------------------------------------- Wavelength range used : 3900.2338 6800.1479 [Angstrom] Sampling in log wavelength : 20.079155 [km/s] Number of independent pixels in signal: 8300 Number of pixels fitted : 8300 DOF factor : 1.00000 -------------------------------------------------------------------- number of model evaluations: 68 time= 11.852156 Number of pixels used for the fit 8216 cz : 1.3099704 +/- 0.090409959 km/s dispersion : 31.791539 +/- 0.099538877 km/s ---------------------------- chi^2 : 2.4644663 ---------------------------- Weight : 0.99036769 +/- 8.8231622e-05 [data_unit/cmp_unit] Teff : 6397.4067 +/- 2.5348006 K Logg : 4.0505782 +/- 0.0051136368 cm/s2 Fe/H : -0.15406299 +/- 0.0031368081 dex ----------------------------

GDL> galaxy = uly_root+'/data/VazMiles_z-0.40t07.94.fits' GDL> ulyss, galaxy, MODEL_FILE= uly_root+'/models/PHR_Elodie31.fits'
-------------------------------------------------------------------- INPUT PARAMETERS -------------------------------------------------------------------- The fits file to be analyze is ./data/VazMiles_z-0.40t07.94.fits Name of the output file output.res Degree of multiplicative polynomial 10 No additive polynomial Component1 (cmp1) model:./models/PHR_Elodie31.fits Guess for age: 8000.0000 [Myr], Fe/H: -0.40000000 [dex] -------------------------------------------------------------------- SDSS style Assume that the sampling is linear in wavelength The error spectrum does not contain finite values ... ignore it (ie. do as if no errors were given) Read the model ./models/PHR_Elodie31.fits read the file ./models/PHR_Elodie31.fits model reading time= 1.6575170 model deriving time= 0.21998787 -------------------------------------------------------------------- PARAMETERS PASSED TO ULY_FIT -------------------------------------------------------------------- Wavelength range used : 3900.5447 6800.7178 [Angstrom] Sampling in log wavelength : 51.501300 [km/s] Number of independent pixels in signal: 3236 Number of pixels fitted : 3236 DOF factor : 1.00000 -------------------------------------------------------------------- number of model evaluations: 47 time= 0.39454508 Number of pixels used for the fit 3172 cz : 6.4173729 +/- 0.29703594 km/s dispersion : 62.357578 +/- 0.30421540 km/s ---------------------------- chi^2 : 0.97106082 ---------------------------- Weight : 1.0981916 +/- 0.00017966427 [data_unit/cmp_unit] age : 6355.7012 +/- 109.91934 Myr Fe/H : -0.36019190 +/- 0.0065753545 dex ----------------------------
GDL> galaxy = uly_root+'/data/VazMiles_z-0.40t07.94.fits' GDL> spectrum = uly_spect_read(galaxy) GDL> specConv = uly_spect_losvdconvol(spectrum, 0., 30., 0, 0) GDL> uly_spect_free, spectrum GDL> ulyss, specConv, MODEL='models/PHR_Elodie31.fits', /QUIET, FILE_OUT='tuto_base'
GDL> uly_solut_tprint, 'tuto_base.res' GDL> uly_solut_splot, 'tuto_base.fits', WAVERANGE=[5000.,5200.]
cz : 6.3737356 +/- 0.46532314 km/s dispersion : 68.989618 +/- 0.47422728 km/s ---------------------------- chi^2 : 0.858666 ---------------------------- Weight : 1.1169695 +/- 0.00025447644 [data_unit/cmp_unit] age : 6496.8018 +/- 160.24340 Myr Fe/H : -0.36589126 +/- 0.0090835063 dex ----------------------------

GDL> galaxy = uly_root+'/data/VazMiles_z-0.40t07.94.fits' GDL> cmp1 = uly_ssp(AG=[1000.], ZG=[0], AL=[200.,3000.]) GDL> cmp2 = uly_ssp(AG=[10000.], ZG=[0], AL=[3000., 12000.]) GDL> cmp = [cmp1, cmp2] GDL> ulyss, galaxy, cmp, /PLOT
-------------------------------------------------------------------- INPUT PARAMETERS -------------------------------------------------------------------- The fits file to be analyze is ./data/VazMiles_z-0.40t07.94.fits Name of the output file output.res Degree of multiplicative polynomial 10 No additive polynomial Component1 (cmp1) model:./models/PHR_Elodie31.fits Guess for age: 1000.0000 [Myr], Fe/H: 0.0000000 [dex] Component2 (cmp2) model:./models/PHR_Elodie31.fits Guess for age: 10000.000 [Myr], Fe/H: 0.0000000 [dex] -------------------------------------------------------------------- SDSS style Assume that the sampling is linear in wavelength The error spectrum does not contain finite values ... ignore it (ie. do as if no errors were given) Read the model ./models/PHR_Elodie31.fits read the file ./models/PHR_Elodie31.fits model reading time= 1.7350779 model deriving time= 0.23873305 Read the model ./models/PHR_Elodie31.fits read the file ./models/PHR_Elodie31.fits model reading time= 1.7364459 model deriving time= 0.23813796 -------------------------------------------------------------------- PARAMETERS PASSED TO ULY_FIT -------------------------------------------------------------------- Wavelength range used : 3900.5447 6800.7178 [Angstrom] Sampling in log wavelength : 51.501300 [km/s] Number of independent pixels in signal: 3236 Number of pixels fitted : 3236 DOF factor : 1.00000 -------------------------------------------------------------------- number of model evaluations: 123 time= 12.018707 Number of pixels used for the fit 3172 cz : 6.4356177 +/- 0.29698138 km/s dispersion : 62.121316 +/- 0.29804042 km/s ---------------------------- chi^2 : 0.95599645 ---------------------------- Light fraction : 1.4939445 +/- 0.033955803 % Weight : 0.00070014333 +/- 1.5913529e-05 [data_unit/cmp_unit] age : 200.00001 +/- -0.0000000 Myr Fe/H : -0.86013718 +/- 1.1444971 dex ---------------------------- Light fraction : 98.506056 +/- 0.035755935 % Weight : 1.2051655 +/- 0.00043745349 [data_unit/cmp_unit] age : 7081.2258 +/- 176.46655 Myr Fe/H : -0.36221229 +/- 0.0077456706 dex ----------------------------

GDL> star = uly_root+'/data/cflib_114642.fits' GDL> model = uly_tgm_extr(star,[6400.,4.,0.]) ; Teff=6400K log(g)=4 [Fe/H]=0 GDL> uly_lsf, OBS=star, SUN=model, 600, 300, FIL='tuto_lsf.txt', /QUIET GDL> plotsym,0,1,/FILL GDL> uly_lsf_plot, 'tuto_lsf.txt', YST=3, PSYM=8, CONNECT='Red'

GDL> uly_lsf_smooth, 'tuto_lsf.txt', 'tuto_lsf_s.txt'
| Contact: ulyss at obs.univ-lyon1.fr |
Last modified: Thu Jul 31 13:57:09 2008. |