In [1]:
from sunpy.map import MapCubed
from sunpy.map import Map
import glob
import astropy.units as u
from sunpy.time import parse_time
import numpy as np
In [2]:
import matplotlib.pyplot as plt
import matplotlib as mpl
mpl.rc('image', interpolation='nearest')
%matplotlib inline
%config InlineBackend.figure_format = 'svg'
In [3]:
data_dir = '/Users/schriste/Data/FOXSI-2-flight/aia/'
str_indices = {'94':'0094', '335':'0335', '193':'0193', '171':'0171', '131':'0131'}
file_list = {}
maps = {}
for key in str_indices:
file_list.update({key: glob.glob(data_dir + '*' + str_indices[key] + '.fits')})
these_files = file_list['94'][0:10]
print(these_files)
maps = []
for f in these_files:
maps.append(Map(f))
cubed = MapCubed(maps)
In [4]:
cubed.data.shape
Out[4]:
In [5]:
cubed.dtype
Out[5]:
In [6]:
cubed[0]
Out[6]:
In [7]:
cubed
Out[7]:
In [8]:
cubed._get_map(0)
Out[8]:
In [9]:
cubed.date
Out[9]:
In [10]:
for d in cubed.date:
print(d)
In [11]:
cubed.scale
Out[11]:
In [12]:
x_range = u.Quantity([-900, 0], 'arcsec')
y_range = u.Quantity([-700, 200], 'arcsec')
In [13]:
scubed = cubed.submap(x_range, y_range)
In [14]:
scubed.data.shape
Out[14]:
In [15]:
cubed.meta('exptime')
Out[15]:
In [ ]:
In [16]:
scubed.mean().plot()
plt.colorbar()
Out[16]:
In [17]:
scubed.std().plot()
plt.colorbar()
Out[17]:
In [18]:
scubed.min().plot()
plt.colorbar()
Out[18]:
In [19]:
scubed.max().plot()
plt.colorbar()
Out[19]:
In [20]:
scubed.scale
Out[20]:
In [21]:
scubed.dimensions
Out[21]:
In [22]:
sscubed = scubed.superpixel(u.Quantity([15 * u.pixel, 15 * u.pixel]))
In [23]:
sscubed.scale
Out[23]:
In [24]:
sscubed[0].plot()
plt.colorbar()
Out[24]:
In [25]:
sscubed.std().plot()
plt.colorbar()
Out[25]:
In [26]:
sscubed.lightcurve(2,0).plot()
sscubed.lightcurve(10,0).plot()
sscubed.lightcurve(20,0).plot()
Out[26]:
In [ ]: