;+ ; suncir.pro ; ; PURPOSE Draw a 1.0 Rsun circle on an image. ; ; SYNTAX suncir, fits_image_file ; ; AUTHOR Andrew L. Stanger HAO/NCAR 30 Oct 2000 ; 23 Jan 2001: set xcen/ycen to array center if < 0. ; 12 Apr 2001: Use dispmin & dispmax for intensity scaling. ;- PRO suncir, fits_file lct, '/home/stanger/color/chip1.lut' img = readfits (fits_file, hdu) xdim = fxpar (hdu, 'NAXIS1') ydim = fxpar (hdu, 'NAXIS2') xcen = fxpar (hdu, 'CRPIX1') ycen = fxpar (hdu, 'CRPIX2') pixrs = fxpar (hdu, 'CRRADIUS') roll = fxpar (hdu, 'CROTA1') dispmin = fxpar (hdu, 'DISPMIN') dispmax = fxpar (hdu, 'DISPMAX') IF (xcen LT 0.0) THEN xcen = (xdim - 1) / 2.0 IF (ycen LT 0.0) THEN ycen = (ydim - 1) / 2.0 sizimg = size (img) WHILE (sizimg [1] GT 1000 OR sizimg [2] GT 1000) DO $ BEGIN img = rebin (img, xdim/2, ydim/2) xdim = xdim / 2 ydim = ydim / 2 xcen = xcen / 2.0 ycen = ycen / 2.0 pixrs = pixrs / 2.0 sizimg = size (img) END window, xsize=xdim, ysize=ydim, retain=2 tv, bytscl (img, min=dispmin, max=dispmax) radius = 1.0 FOR it = 0, 361, 1 DO $ BEGIN theta = FLOAT (it) ierr = rcoord (radius, theta, x, y, 1, roll, xcen, ycen, pixrs) ix = FIX (x + 0.5) iy = FIX (y + 0.5) IF (it EQ 0) THEN plots, ix, iy, /device, color=253 $ ELSE plots, ix, iy, /device, color=253, /continue END END