pro HMIlatestInt, trec=trec, crota2=crota2, rsunobs=rsunobs, crpix1=crpix1, crpix2=crpix2, cdelt1=cdelt1, cdelt2=cdelt2, file=file dat = fitsio_read_image(file) rad = rsunobs / cdelt1 im_int = bytscl(dat, min=20000, max=70000) im_crop = circle_mask(im_int, crpix1, crpix2, 'GE', rad, mask=0) if (crota2 gt 179) and (crota2 lt 181) then begin im_rot = rotate(im_crop, 2) print, 'using rotate' endif else begin im_rot = rot(im_crop, crota2, 1, crpix1, crpix2) endelse !P.BACKGROUND = 0 set_plot, 'z' tv2, 128,128, /init im_sm = rebin(im_rot, 128, 128) outfil = 'hmi.Ic_720s.gif' TV2, im_sm write_gif, outfil, TVRD() tv2, 1024, 1024, /init im_big = rebin(im_rot, 1024, 1024) outfil = 'hmi.Ic_720S.gif' TV2, im_big write_gif, outfil, TVRD() end