In [1]:
%matplotlib inline
In [2]:
from iuvs import io, meta, plotting
In [34]:
metadf = meta.l1a_summary()
In [35]:
muvdark = metadf[(metadf.filename.str.contains('muvdark'))]
In [36]:
muvdark = muvdark[muvdark.convert_objects(convert_numeric=True).MCP_HV == 0]
In [38]:
muvdark.MCP_HV.value_counts()
Out[38]:
In [42]:
cols = 'INT_TIME NX NY NZ BINX BINY'.split()
In [43]:
plotting.plot_pie_overview(muvdark, cols, 'MUV Darks');
In [10]:
metadf[metadf.filename.str.contains('muvdark')].MCP_HV.value_counts()
Out[10]:
In [41]:
muv60000 = muvdark[muvdark.INT_TIME == 60000]
muv14400 = muvdark[muvdark.INT_TIME == 14400]
muv10200 = muvdark[muvdark.INT_TIME == 10200]
In [47]:
for item in [muv60000, muv14400, muv10200]:
print(len(item))
In [48]:
plotting.plot_pie_overview(muv14400, cols, 'muv 14400');
In [55]:
ffmuvdark = meta.get_full_frames(muvdark)
In [57]:
plotting.plot_pie_overview(ffmuvdark, cols, 'ffmuvdark');
In [58]:
ffmuvdark60000 = ffmuvdark[ffmuvdark.INT_TIME==60000]
In [59]:
ffmuvdark6000 = ffmuvdark[ffmuvdark.INT_TIME==6000]
In [61]:
ffmuvdark6000.info()
In [62]:
ffmuvdark6000['DET_TEMP CASE_TEMP'.split()].plot()
Out[62]:
In [66]:
ffmuvdark6000.columns
Out[66]:
In [94]:
cols = ['MODE', 'CYCLE', 'DET_TEMP']
In [95]:
ffmuvdark6000[cols].head(20)
Out[95]:
In [97]:
ffmuvdark60000.MODE.plot(style='*')
Out[97]:
In [98]:
ffmuvdark6000.info()
In [101]:
from iuvs import io
import numpy as np
In [141]:
means60000 = []
for fname in ffmuvdark60000.filename:
print(fname)
l1a = io.L1AReader(fname)
p2, p98 = np.percentile(l1a.img[~np.isnan(l1a.img)], (2,98))
data = l1a.img[l1a.img < p98]
data = data[data> p2]
means60000.append(np.nanmean(data))
In [142]:
ffmuvdark60000['means'] = means60000
In [143]:
ffmuvdark60000['time'] = ffmuvdark60000.filename.map(lambda x: io.Filename(x).time)
In [118]:
ffmuvdark6000.columns
Out[118]:
In [144]:
ffmuvdark60000.set_index('time', inplace=True)
In [125]:
def calc_4_3(width):
return (width, int(3/4*width))
In [134]:
import matplotlib.pyplot as plt
In [137]:
plt.style.use('bmh')
plt.rcParams['figure.figsize'] = calc_4_3(12)
In [153]:
ffmuvdark6000.plot(y='means', x='DET_TEMP', kind='scatter',
title="MUV Dark Full Frames MEAN between (P2, P98) vs DET_TEMP\nINT_TIME: 6s", fontsize=15)
plt.savefig('/home/klay6683/MUV_dark_ff_inttime_6s_means_vs_dettemp.png', dpi=150)
In [154]:
ffmuvdark6000.plot(y='means', x='CYCLE', kind='scatter',
title="MUV Dark Full Frames MEAN between (P2, P98) vs CASE_TEMP\nINT_TIME: 6s", fontsize=15)
plt.savefig('/home/klay6683/MUV_dark_ff_inttime_6s_means_vs_case_temp.png', dpi=150)
In [ ]: