pro te_fwhm,te=te,fwhm=fwhm,inv=inv,lam0=lam0 if n_elements(te) eq 0 then te=10. ;te=10 eV if n_elements(fwhm) eq 0 then fwhm=1. ;fwhm=1 A if n_elements(lam0) eq 0 then lam0=6500. ;rest laser wavelength ti=te ;this calculates the relavent number for temperuature calculations q=1.6021892e-19 ; electron charge (Coulombs) amukg=9.109e-31 ; electron mass unit (kg) c=2.99792458e8 ; speed of light (m/sec) amu=amukg*c^2/q/1.e6 ; atomic mass unit (MeV/c^2) (0.511) Mion=1.0 ;only 1 electron scattering at a time lambda0=lam0 Cfwhm=sqrt(8.*alog(2.)/amu/1.e6) ; FWHM=Cfwhm*lambda0*sqrt(Ti(eV)/Mion(amu)) cf=cfwhm*lambda0*sqrt(1.e3/Mion) ; FWHM=Cf*sqrt(Ti[keV]) for Carbon if not keyword_set(inv) then begin ; print,'Ti =',ti,'(eV)' fwhm_C=cfwhm*lambda0*sqrt(ti/mion) ; print,'FWHM C at 4650 = ',fwhm_C,'('+angstrom()+')' endif if keyword_set(inv) then begin ti_c=mion*(fwhm/cfwhm/lambda0)^2 ; print,'FWHM C at 4650 = ',fwhm,'('+angstrom()+')' ; print,'Ti =',ti_c,'(eV)' endif if not keyword_set(inv) then begin fwhm=fwhm_c endif if keyword_set(inv) then begin ti=ti_c endif te=ti end