;This function returns the extinction for a Fitzpatrick and Massa ;extinction parameterization. The input wavelength is in angstroms ;Started 7-24-96 by SRM function fm,lam,x0,gam,c1,c2,c3,c4 x=10000./lam ;converts angstroms to mircons^-1 drude=(x^2)/((x^2-x0^2)^2+(gam*x)^2) pol=0.5392*(x-5.9)^2+0.05644*(x-5.9)^3 smallx=where(x lt 5.9) nsmall=n_elements(smallx) if smallx(0) ne -1 then pol(smallx(0))=pol(smallx)*0. fm=c1+c2*x+c3*drude+c4*pol ;window,6 goto,skipplot plot,x,fm,yrange=[-4,25],xr=[5,12] xyouts,max(x),max(fm),'fm' oplot,x,c1+x*0.,color=50 xyouts,max(x),max(c1),'c1' oplot,x,c2*x,color=100 xyouts,max(x),max(c2*x),'c2 (linear)' oplot,x,c3*drude,color=150 xyouts,max(x),max(c3*drude),'c3 (drude)' oplot,x,c4*pol,color=200 xyouts,max(x),max(c4*pol),'c4 (poly)' skipplot:dum=0;print,'skipping plot' return,fm end