![]() |
SOHO/MDIExample of Basic MDI Data Manipulation Using IDL |
data = rfits('fd_Ic_6h_01d.4599.0000.fits',head=hd,/scale)
obs_time = strtrim(sxpar(hd, 'T_OBS'),2) pangle = sxpar(hd, 'P_ANGLE') radius = sxpar(hd,'R_SUN') x0 = sxpar(hd, 'X0') y0 = sxpar(hd, 'Y0') dattim = strmid(obs_time,0,16) print, ' TIME: ', dattim, ' P_ANGLE: ', pangle TIME: 2005.08.05_00:00 P_ANGLE: -179.99999
cropped = circle_mask(data, x0, y0, 'GE', radius, mask=0) rotated = rot(cropped, pangle, 1, x0, y0) writefits, 'fd_Ic_cr_rot.4599.0000.fits', rotated
IDL> xtv, rotated(*,*)
sunspot_profile = intarr(2,936) for x = 45, 980 do begin i = x - 45 sunspot_profile(0,i) = x sunspot_profile(1,i) = rotated(x,366) end
pix = sunspot_profile(0,*) int = sunspot_profile(1,*) title = 'Sunspot Profile' ylabel = 'Intensity' xlabel = 'Pixel' plot, pix, int, title=title, xtitle=xlabel, ytitle = ylabel write_gif, 'sunspot_profile.gif', tvrd()
scaled = bytscl(rotated, min=1000, max=14000) im = rebin(scaled,512,512) tv2, 512, 512, /init tv2, im(*,*) title = 'MDI Intensitygram: ' + dattim xyouts2, 100, 500, title, charsize=1.5 write_gif, 'im.gif', tvrd()
total = 0 for x = 251, 260 do begin for y = 251, 260 do begin total = total + im(x,y) endfor endfor avg = total / 100 print, 'AVERAGE: ', avg end AVERAGE: 228