; this is the module function get_iron_flux, but for all the Ha, Hb, MgII and CIV lines ; while the get_Fe_flux in the Hbetafit_with_Fe is for a single line only function get_iron_flux, xval, Fe_FWHM, disp=disp, balmer=balmer,mgII=mgII, civ=civ common Fe_temp, wave_Fe, flux_Fe ; common block for the original Fe template c = 2.9979246d5 ; convolve the original Fe template with parameter Fe_FWHM (I Zw1 has intrinsic FWHM 900 km/s); ; initial FWHM in the template is 900 km/s, so force Fe_FWHM=910.0 if input Fe_FWHM <= 900 km/s if Fe_FWHM le 900.0 then sig_conv = sqrt(910.0^2 - 900.0^2)/2./sqrt(2.*alog(2.)) $ else sig_conv = sqrt(Fe_FWHM^2 - 900.0^2)/2./sqrt(2.*alog(2.)) ; in units of km/s ; get sigma in pixcel space ; disp = 106.3 for Boroson (Ha, Hb), 550.0 for Salviander (MgII), 92.0 for Vestergaard (CIV) if not keyword_set(disp) then begin if keyword_set(balmer) then disp=106.3 if keyword_set(mgII) then disp=103.6 ; 550.0 if using feconv_uv, 103.6 if using feconv_uv_shen if keyword_set(CIV) then disp=92.0 endif sig_pix = sig_conv/disp ; where 106.3 km/s is the dispersion for the Boroson Fe template khalfsz = round (4*sig_pix+1) xx= findgen(khalfsz*2+1) - khalfsz kernel = exp(-xx^2/(2*sig_pix^2)) kernel = kernel/total(kernel) flux_Fe_conv = convol(flux_Fe, kernel, /center, /edge_truncate) yval = spline(wave_Fe, flux_Fe_conv, xval) return, yval end