;+ ; NAME plot_cpvignet ; ; FUNCTION Plot SMM C/P Vignetting function. ; ; EXTERNALS cpvignet.pro ; ; AUTHOR Andrew L. Stanger HAO/NCAR 3 November 2006 ;- PRO plot_cpvignet rtab = $ [0.00, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, $ 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90, $ 2.00, 2.10, 2.20, 2.30, 2.40, 2.50, 2.60, 2.70, 2.80, 2.90, $ 3.00, 3.10, 3.20, 3.30, 3.40, 3.50, 3.60, 3.70, 3.80, 3.90, $ 4.00, 4.10, 4.20, 4.30, 4.40, 4.50, 4.60, 4.70, 4.80, 4.90, $ 5.00, 5.10, 5.20, 5.30, 5.40, 5.50, 5.60, 5.70, 5.80, 5.90, $ 6.00, 6.10, 6.20, 6.30, 6.40, 6.50, 6.60, 6.70, 6.80, 6.90, $ 7.00, 7.10, 7.20, 7.30, 7.40, 7.50, 7.60, 7.70, 7.80, 7.90, $ 8.00, 8.10, 8.20, 8.30, 8.40, 8.50, 8.60] srtab = size (rtab) ntab = srtab [1] print, 'ntab: ', ntab vig = FLTARR (ntab) viginv = FLTARR (ntab) i = 0 cfac = 0.7 IF (STRLOWCASE (!version.os) EQ 'irix') THEN cfac = 1.4 IF (STRLOWCASE (!version.os) EQ 'sunos' ) THEN cfac = 0.7 cs = cfac * 1.0 ; character size WINDOW, retain=2 red = bytarr (256) green = bytarr (256) blue = bytarr (256) lct, '/home/stanger/idl/color/bwinv.lut' TVLCT, red, green, blue, /get ; Read color table into arrays. ;--- Get vignetting for each height. FOR i = 0, ntab-1 DO $ BEGIN vig [i] = cpvignet (rtab [i] * 960.0) PRINT, 'rtab: ', rtab [i], ' vig: ', vig [i] END ;--- Plot C/P Vignetting. PLOT, rtab, vig, xtitle="Radial Distance (Rsun)", $ ytitle="Vignetting Correction", charsize=cs XYOUTS, 0.5, 0.85, "SMM Coronagraph Vignetting", charsize=cs, /normal ;--- Save plot as a GIF file. gif_file = "cpvignet.gif" img_gif = TVRD () WRITE_GIF, gif_file, img_gif, red, green, blue wait, 3.0 ;--- Plot Inverse Vignetting. viginv = 1.0 / vig ; Inverse Vignetting. PLOT, rtab, viginv, xtitle="Radial Distance (Rsun)", $ ytitle="Vignetting Attenuation", $ yrange = [0.0, 1.2], charsize=cs XYOUTS, 0.5, 0.85, "SMM Coronagraph Inverse Vignetting", charsize=cs, /normal gif_file = "cpvignet_inverse.gif" img_gif = TVRD () WRITE_GIF, gif_file, img_gif, red, green, blue END