PRO fwhm_idl_snippet, grat ;+ ; IDL procedure to plot HETGS FWHM vs wavelength. ; Usage: ; IDL> fwhm_idl_snippet, 'MEG' ; IDL> fwhm_idl_snippet, 'HEG' ;- ; Select grating if not specified if n_elements(grat) EQ 0 then grat = 'MEG' ; Coefficients from http://space.mit.edu/technotes/ede_0102/ede_0102.html if grat EQ 'MEG' then begin c0 = 0.018851868 c1 = -0.00033946575 c2 = 2.9781558e-05 c3 = -4.1097023e-07 lam_max = 26.0 fwhm_max = 0.030 end else begin c0 = 0.010019662 c1 = -0.00014101982 c2 = 1.4591413e-05 c3 = -1.9632994e-07 lam_max = 17.0 fwhm_max = 0.015 end ; Make a wavelength array and calculate the FWHM: lams = lam_max * FINDGEN(101)/100.0 FWHMs = c0 + c1*lams + c2*lams^2 + c3*lams^3 ; and plot it plot, lams, FWHMs, $ XTITLE='Wavelength (A)', $ XRANGE=[0.0,lam_max], /XSTYLE, $ YTITLE='FWHM (A)', $ YRANGE=[0.0,fwhm_max], /YSTYLE, $ TITLE='HETGS/'+grat+ ' Resolution Curve (2/27/01)' RETURN END