In [1]:
%load_ext autoreload
%autoreload 2

In [2]:
from iuvs import meta, plotting

In [3]:
%matplotlib inline
import matplotlib.pyplot as plt

In [4]:
l1bmeta = meta.l1b_summary()

In [ ]:


In [28]:
l1bmeta.filename.str.contains('orbit')


Out[28]:
filenum
0          False
1          False
2          False
3          False
4          False
5          False
6          False
7          False
8          False
9          False
10         False
11         False
12         False
13         False
14         False
...
32999      True
33000      True
33001      True
33002      True
33003      True
33004      True
33005      True
33006      True
33007      True
33008      True
33009      True
33010      True
33011      True
33012      True
33013      True
Name: filename, Length: 33014, dtype: bool

In [5]:
fullframes = meta.get_full_frames(l1bmeta)

In [7]:
fullframes.info()


<class 'pandas.core.frame.DataFrame'>
Int64Index: 2101 entries, 770 to 17267
Data columns (total 25 columns):
filename      2101 non-null object
OBS_ID        2101 non-null int64
XUV           2101 non-null object
INT_TIME      2101 non-null int64
NX            2101 non-null int64
NY            2101 non-null int64
NZ            2101 non-null int64
X1            2101 non-null int64
X2            2101 non-null int64
Y1            2101 non-null int64
Y2            2101 non-null int64
BINX          2101 non-null int64
BINY          2101 non-null int64
MCP_HV        2101 non-null int64
SHUT_STATE    2101 non-null object
PHASE         2101 non-null int64
MODE          2101 non-null int64
CYCLE         2101 non-null float64
DET_TEMP      2101 non-null float64
CASE_TEMP     2101 non-null float64
FOV_DEG       2101 non-null object
STIM_STATE    2101 non-null object
FILL_BINS     2101 non-null object
TARGET        0 non-null float64
PURPOSE       0 non-null float64
dtypes: float64(5), int64(14), object(6)
memory usage: 426.8+ KB

In [8]:
cols = 'XUV INT_TIME NX NY NZ BINX BINY MCP_HV PHASE'.split()

In [9]:
plotting.plot_pie_overview(fullframes, cols, 'FULL FRAMES');



In [13]:
standard_FFs = fullframes[(fullframes.PHASE == 50) & (fullframes.MCP_HV == 796) & (fullframes.INT_TIME == 6000)]

In [14]:
standard_FFs.info()


<class 'pandas.core.frame.DataFrame'>
Int64Index: 485 entries, 776 to 12826
Data columns (total 25 columns):
filename      485 non-null object
OBS_ID        485 non-null int64
XUV           485 non-null object
INT_TIME      485 non-null int64
NX            485 non-null int64
NY            485 non-null int64
NZ            485 non-null int64
X1            485 non-null int64
X2            485 non-null int64
Y1            485 non-null int64
Y2            485 non-null int64
BINX          485 non-null int64
BINY          485 non-null int64
MCP_HV        485 non-null int64
SHUT_STATE    485 non-null object
PHASE         485 non-null int64
MODE          485 non-null int64
CYCLE         485 non-null float64
DET_TEMP      485 non-null float64
CASE_TEMP     485 non-null float64
FOV_DEG       485 non-null object
STIM_STATE    485 non-null object
FILL_BINS     485 non-null object
TARGET        0 non-null float64
PURPOSE       0 non-null float64
dtypes: float64(5), int64(14), object(6)
memory usage: 98.5+ KB

In [21]:
standard_FFs.columns


Out[21]:
Index(['filename', 'OBS_ID', 'XUV', 'INT_TIME', 'NX', 'NY', 'NZ', 'X1', 'X2', 'Y1', 'Y2', 'BINX', 'BINY', 'MCP_HV', 'SHUT_STATE', 'PHASE', 'MODE', 'CYCLE', 'DET_TEMP', 'CASE_TEMP', 'FOV_DEG', 'STIM_STATE', 'FILL_BINS', 'TARGET', 'PURPOSE'], dtype='object')

In [27]:
standard_FFs[standard_FFs.filename.str.contains('IPH2')].head().filename.values


Out[27]:
array(['mvn_iuv_l1b_IPH2-cycle00001-mode050-fuv_20140419T033853_v01_r01.fits.gz',
       'mvn_iuv_l1b_IPH2-cycle00001-mode050-muv_20140419T033853_v01_r01.fits.gz',
       'mvn_iuv_l1b_IPH2-cycle00002-mode050-fuv_20140419T113855_v01_r01.fits.gz',
       'mvn_iuv_l1b_IPH2-cycle00002-mode050-muv_20140419T113855_v01_r01.fits.gz',
       'mvn_iuv_l1b_IPH2-cycle00003-mode050-fuv_20140419T193856_v01_r01.fits.gz'], dtype=object)

In [17]:
standard_FFs.head().filename.values


Out[17]:
array(['mvn_iuv_l1b_IPH1-cycle00001-mode050-fuv_20140403T050451_v01_r01.fits.gz',
       'mvn_iuv_l1b_IPH1-cycle00001-mode050-muv_20140403T050451_v01_r01.fits.gz',
       'mvn_iuv_l1b_IPH1-cycle00002-mode050-fuv_20140403T130453_v01_r01.fits.gz',
       'mvn_iuv_l1b_IPH1-cycle00002-mode050-muv_20140403T130453_v01_r01.fits.gz',
       'mvn_iuv_l1b_IPH1-cycle00003-mode050-fuv_20140403T210455_v01_r01.fits.gz'], dtype=object)

In [5]:
IPH2 = l1b_metadata[l1b_metadata.filename.str.contains('IPH2')]

In [11]:
plotting.plot_pie_overview(IPH2, cols, "IPH2");



In [9]:
cruisecals = l1b_metadata[l1b_metadata.filename.str.contains('cruisecal')]

In [10]:
plotting.plot_pie_overview(cruisecals, 
                           cols,
                          "CruiseCals")
plt.savefig("cruisecal_pies.png", dpi=150);



In [30]:
orbits = l1bmeta[l1bmeta.filename.str.contains('orbit')]

In [33]:
orbits[(orbits.NX==256) & (orbits.NY==10) & (orbits.NZ==21)].head().filename.values


Out[33]:
array([ 'mvn_iuv_l1b_apoapse-orbit00107-mode2001-fuv_20141018T091335_v01_r01.fits.gz',
       'mvn_iuv_l1b_apoapse-orbit00107-mode2001-fuv_20141018T091856_v01_r01.fits.gz',
       'mvn_iuv_l1b_apoapse-orbit00108-mode2001-fuv_20141018T135038_v01_r01.fits.gz',
       'mvn_iuv_l1b_apoapse-orbit00108-mode2001-fuv_20141018T135558_v01_r01.fits.gz',
       'mvn_iuv_l1b_apoapse-orbit00109-mode2001-fuv_20141018T182740_v01_r01.fits.gz'], dtype=object)

In [31]:
plotting.plot_pie_overview(orbits, cols, "In Orbit")
plt.savefig("orbit_pies.png", dpi=150);



In [13]:
pwd


Out[13]:
'/home/klay6683/src/iuvs/notebooks'

In [ ]: