In [1]:
import sunpy.map
import matplotlib.pyplot as plt
%matplotlib inline
import matplotlib.cm as cm

In [2]:
m = sunpy.map.Map(sunpy.AIA_171_IMAGE)

In [3]:
fig = plt.figure(figsize=(20, 15))
fig.add_subplot(1, 4, 1)
m.plot()
fig.add_subplot(1, 4, 2)
m.rotate(180).plot()
fig.add_subplot(1, 4, 3)
m.rotate(90).plot()
fig.add_subplot(1, 4, 4)
m.rotate(27).plot()
plt.show()


/Users/schriste/Dropbox/Developer/python/sunpy/sunpy/map/mapbase.py:1056: Warning: This map is not aligned. Plot axes may be incorrect
  Warning)

In [4]:
ms = sunpy.map.Map(sunpy.AIA_171_IMAGE).submap([-800,1200],[0,1000])

In [5]:
fig = plt.figure(figsize=(20, 15))
fig.add_subplot(1, 4, 1)
ms.plot()
ms.draw_limb()
fig.add_subplot(1, 4, 2)
ms.rotate(180).plot()
ms.draw_limb()
fig.add_subplot(1, 4, 3)
ms.rotate(90).plot()
ms.draw_limb()
fig.add_subplot(1, 4, 4)
ms.rotate(27).plot()
ms.draw_limb()
plt.show()



In [6]:
ms = sunpy.map.Map(sunpy.AIA_171_IMAGE).submap([0,1000],[0,1000])

In [7]:
fig = plt.figure(figsize=(20, 15))
fig.add_subplot(1, 4, 1)
ms.plot()
ms.draw_limb()
fig.add_subplot(1, 4, 2)
ms.rotate(180).plot()
ms.draw_limb()
fig.add_subplot(1, 4, 3)
ms.rotate(90).plot()
ms.draw_limb()
fig.add_subplot(1, 4, 4)
ms.rotate(27).plot()
ms.draw_limb()
plt.show()



In [63]:
scipy_rmap = ms.rotate(27, use_scipy=True, order=4)
norm_rmap = ms.rotate(27, order=4)

In [64]:
np.shape(norm_rmap.data)


Out[64]:
(417, 417)

In [65]:
diff_data = scipy_rmap.data - norm_rmap.data

In [66]:
diff_data.max()


Out[66]:
8.1854523159563541e-12

In [67]:
diff_data.min()


Out[67]:
-6.9375

In [68]:
diff_data.mean()


Out[68]:
-1.0349058882390492

In [69]:
diff_data.std()


Out[69]:
2.4715641610440393

In [70]:
plt.figure()
plt.hist(diff_data)
plt.title('N = ' + str(len(diff_data)**2))
plt.show()



In [71]:
fig = plt.figure(figsize=(20, 15))
fig.add_subplot(1, 3, 1)
norm_rmap.plot()
plt.colorbar(shrink=0.3)
fig.add_subplot(1, 3, 2)
scipy_rmap.plot()
plt.colorbar(shrink=0.3)
fig.add_subplot(1, 3, 3)
plt.imshow(diff_data, vmin=-1000, vmax=1000, origin='lower', cmap=cm.bwr)
plt.colorbar(shrink=0.3)
plt.show()



In [17]:
file = '/Users/schriste/Downloads/hmi.M_720s.20110411_000000_TAI.fits'
hmi = sunpy.map.Map(file)

In [18]:
hmi.meta['CROTA2']


Out[18]:
0.082565

In [19]:
fig = plt.figure(figsize=(20, 15))
fig.add_subplot(1, 2, 1)
hmi.plot()
fig.add_subplot(1, 2, 2)
hmi.rotate().plot()
plt.show()



In [20]:
file = '/Users/schriste/Downloads/hmi.Ic_45s_nrt.20130514_020000_TAI.2.continuum.fits'
hmi = sunpy.map.Map(file)
hmi.meta['CROTA2']


Out[20]:
179.929657

In [21]:
fig = plt.figure(figsize=(20, 15))
fig.add_subplot(1, 2, 1)
hmi.plot()
fig.add_subplot(1, 2, 2)
hmi.rotate().plot()
plt.show()



In [21]: