pro mag_gif, infile, fuss=fuss dat = readfits(infile,header) tobs = sxpar(header, 'T_OBS') pangle = sxpar(header, 'P_ANGLE') x0 = sxpar(header, 'X0') y0 = sxpar(header, 'Y0') rad = sxpar(header,'R_SUN') dattim = strmid(tobs,0,16) year = strmid(tobs,0,4) mo = strmid(tobs,5,2) if (mo eq '01') then month = 'January' if (mo eq '02') then month = 'February' if (mo eq '03') then month = 'March' if (mo eq '04') then month = 'April' if (mo eq '05') then month = 'May' if (mo eq '06') then month = 'June' if (mo eq '07') then month = 'July' if (mo eq '08') then month = 'August' if (mo eq '09') then month = 'September' if (mo eq '10') then month = 'October' if (mo eq '11') then month = 'November' if (mo eq '12') then month = 'December' length = strlen(infile) start = length - 27 file = strmid(infile, start, 22) if keyword_set(fuss) then begin print,'loadct,3 and set gamma = 0.667 if you want something less garish' xloadct endif !P.BACKGROUND = 0 ;im_int = bytscl(dat, min=-75, max=75 ) im_int = bytscl(dat, min=-135, max=135 ) im_crop = circle_mask(im_int, x0, y0, 'GE', rad, mask=0) im_rot = rot(im_crop, pangle, 1, x0, y0) tv2, 1024, 1024, /init if (pangle NE 0 ) then begin tv2, im_rot(*,*) title = 'MDI Magnetogram: ' + dattim xyouts2, 5, 1000, title, charsize=2 ; outfil = '/synoptic/gifs/magnetograms/' + year + '/' + month + '/MDI_mag_' + dattim + '.rotated.gif' outfil = '/synoptic//gifs/magnetograms/' + year + '/' + month + '/MDI_mag_' + dattim + '.rotated.gif' endif else begin tv2, im_crop(*,*) title = 'MDI Magnetogram: ' + dattim xyouts2, 5, 1000, title, charsize=2 ; outfil = '/synoptic/gifs/magnetograms/' + year + '/' + month + '/MDI_mag_' + dattim + '.gif' outfil = '/synoptic/gifs/magnetograms/' + year + '/' + month + '/MDI_mag_' + dattim + '.gif' endelse plots, 50, 100, /device plots, [50,50], /device, /continue plots, [100,50], /device, /continue plots, 45, 95, /device plots, [50,100], /device, /continue plots, [55, 95], /device, /continue plots, 95, 55, /device plots, [100,50], /device, /continue plots, [95,45], /device, /continue xyouts2, 43, 110, 'N', charsize=2 xyouts2, 110, 45, 'W', charsize=2 xyouts2, 10, 10, 'Plot Made '+strmid(!stime, 0, 11), charsize=1 WRITE_GIF, outfil, TVRD() print, pangle end