;+ ; suncircs.pro ; ; PURPOSE Draw a 1.0 Rsun circle on an image. ; ; SYNTAX suncircs, fits_image_list ; ; 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. ; 12 Apr 2001: Draw circle centered at array center. ;- PRO suncircs, fits_list lct, '/home/stanger/color/chip1.lut' fits_file = '' i = 0 CLOSE, 11 OPENR, 11, fits_list WHILE (NOT EOF (11)) DO $ BEGIN READF, 11, fits_file, FORMAT= '(A)' 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') xc = (xdim - 1) * 0.5 yc = (ydim - 1) * 0.5 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 xc = xc * 0.5 yc = yc * 0.5 pixrs = pixrs / 2.0 sizimg = size (img) END IF (i EQ 0) THEN WINDOW, xsize=xdim, ysize=ydim i = i + 1 TV, BYTSCL (img, min=dispmin, max=dispmax) XYOUTS, 10, 10, fits_file, /device, color=250 radius = 1.0 FOR it = 0, 361, 1 DO $ BEGIN theta = FLOAT (it) ierr = rcoord (radius, theta, x, y, 1, roll, xc, yc, pixrs) ix = FIX (x + 0.5) iy = FIX (y + 0.5) IF (it EQ 0) THEN plots, ix, iy, /device, color=251 $ ELSE plots, ix, iy, /device, color=251, /continue END ;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 WAIT, 2 END CLOSE, 11 END