; function to get the Fe + power-law continuum function get_pseudo_conti, xval, pp, balmer=balmer,mgII=mgII, civ=civ ; xval = rest wavelength in Anstrom ; pp = [pl_norm, pl_slope, Fe_norm, Fe_fwhm, Fe_shift] common Fe_temp, wave_Fe, flux_Fe common comm_Fe, wave_Fe_balmer, flux_Fe_balmer, wave_Fe_mgii, flux_Fe_mgii if n_elements(flux_Fe_balmer) eq 0 then begin file = '/home/yshen/Research/IDL/lib/Projects/quasar/linefit/Fe_fit/irontemplate.dat' readcol, file, format = 'd,d', logwave_1, flux_1, /silent wave_Fe_balmer = 10.0D^logwave_1 flux_Fe_balmer = flux_1*1d15 ind = where(wave_Fe_balmer ge 3686. and wave_Fe_balmer le 7484.) wave_Fe_balmer = wave_Fe_balmer[ind] flux_Fe_balmer = flux_Fe_balmer[ind] endif ;if n_elements(flux_Fe_mgii) eq 0 then begin ; file = '/home/yshen/Research/IDL/lib/Projects/qsofit/iron_template/feconv_uv' ; ; wave_Fe1 [2200, 3090]; wave_Fe2 [4526, 6357] ; readcol, file, format = 'x,d,d,d,d', wave_1, flux_1, wave_2, flux_2, /silent ; wave_Fe_MgII = wave_1 ; flux_Fe_MgII = flux_1 ; read in the Salvaider/Vestergaard template for MgII file = '/home/yshen/Research/IDL/lib/Projects/qsofit/iron_template/feconv_uv_shen' readcol, file, format='d,d', logwave_1, flux_1, /silent wave_Fe_mgii = 10.D^logwave_1 flux_Fe_mgii = flux_1*1d14 ;endif if keyword_set(balmer) then begin wave_Fe = wave_Fe_balmer & flux_Fe = flux_Fe_balmer endif if keyword_set(mgII) then begin wave_Fe = wave_Fe_mgii & flux_Fe = flux_Fe_mgii endif if not keyword_set(CIV) then begin ; only add FeII flux for Balmer lines and MgII yval = pp[0]*(xval/3000.0)^pp[1] + pp[2]*get_iron_flux(xval*(1.0 + pp[4]), pp[3], balmer=balmer,mgII=mgII, civ=civ) endif else yval = pp[0]*(xval/3000.0)^pp[1] return, yval end