The goals of this notebook are:

  1. Apply the mean-level corrections to the transmission spectra
  2. Apply the chromatic corrections to the transmission spectra
  3. Save the corrected spectra.

In [1]:
%pylab inline

import seaborn as sns
sns.set_context("notebook", font_scale=1.5, rc={"lines.linewidth": 2.5})
cmap = sns.cubehelix_palette(light=1, as_cmap=True)
sns.palplot(sns.cubehelix_palette(light=1))
import pandas as pd
pd.set_option('display.max_columns', 100)


Populating the interactive namespace from numpy and matplotlib

In [55]:
df = pd.read_csv('../data/cln_20150206_cary5000.csv')
df.set_index('wavelength', inplace=True)
df.drop('empty_4_2', axis=1, inplace=True)
df.head()


Out[55]:
Baseline 100%T empty_1 empty_2_1 empty_2_2 empty_2_3 empty_2_4 empty_2_5 empty_2_6 empty_2_7 empty_2_8 empty_2_9 empty_2_10 empty_2_11 empty_2_12 empty_2_13 empty_2_14 empty_2_15 empty_3_1 empty_3_2 empty_3_3 empty_3_4 empty_3_5 VG05_1_1 VG05_1_2 VG05_1_3 VG05_1_4 VG05_1_5 Baseline 100%T.1 empty_4_1 VG09-12_1_0 VG09-12_1_2 VG09-12_1_4 VG09-12_1_6 VG09-12_1_8 VG09-12_1_10 VG09-12_1_12 VG09-12_1_14 VG09-12_1_16 VG09-12_1_18 VG09-12_1_20 VG09-12_1_22 VG09-12_1_24 VG09-12_1_26 VG09-12_1_28 VG09-12_1_30 VG09-12_1_32 VG09-12_1_34 VG09-12_1_36 VG09-12_1_38 VG09-12_1_40 VG09-12_1_42 VG09-12_1_44 VG09-12_1_46 VG09-12_1_48 VG09-12_1_50 empty_5_1 empty_5_2 empty_5_3 empty_5_4 empty_5_5
wavelength
1775 0.054900 0.996738 0.994788 0.993000 0.992427 0.992727 0.992566 0.993178 0.993542 0.993699 0.993695 0.994273 0.994382 0.994913 0.995192 0.997182 0.996089 1.000317 1.000646 1.000757 1.001592 1.001691 0.531966 0.532362 0.532803 0.532895 0.533078 0.055321 1.000382 1.001493 0.874571 0.520288 0.513987 0.520696 0.522658 0.526750 0.526497 0.571637 0.535314 0.535065 0.534981 0.534620 0.535057 0.535745 0.536009 0.536586 0.536681 0.537011 0.537481 0.517272 0.491913 1.005398 1.008597 1.009794 1.010392 1.011241 1.011373 1.011569 1.011567 1.011826
1765 0.056587 0.996698 0.994949 0.993029 0.992323 0.992540 0.992392 0.993101 0.993253 0.993590 0.993916 0.994138 0.994222 0.994880 0.995069 0.997146 0.996170 1.000276 1.000489 1.000754 1.001109 1.001378 0.532075 0.532165 0.532466 0.532575 0.532848 0.057007 1.000621 1.001283 0.875052 0.519546 0.514007 0.520622 0.522183 0.526571 0.525914 0.571612 0.535326 0.534940 0.534768 0.534424 0.535212 0.536067 0.535856 0.536452 0.536578 0.537032 0.537514 0.517388 0.491351 1.005273 1.008588 1.010112 1.010448 1.011166 1.011300 1.011852 1.011722 1.012028
1755 0.058528 0.996616 0.994781 0.993856 0.992115 0.992431 0.992578 0.993081 0.993325 0.993445 0.993944 0.994041 0.994368 0.994741 0.995185 0.995766 0.996120 1.000049 1.000574 1.000839 1.001166 1.001465 0.531898 0.532115 0.532214 0.532562 0.532866 0.058966 1.000626 1.001497 0.875337 0.518847 0.513831 0.520083 0.521865 0.526216 0.525509 0.571603 0.535314 0.534978 0.534978 0.534248 0.535097 0.535835 0.535614 0.536186 0.536287 0.536813 0.537127 0.517123 0.491549 1.005627 1.008868 1.009983 1.010426 1.011105 1.011550 1.011774 1.011923 1.011949
1745 0.060380 0.996552 0.994699 0.993798 0.992180 0.992515 0.992373 0.992759 0.993148 0.993443 0.993975 0.994108 0.994200 0.994774 0.994995 0.995585 0.996152 0.999933 1.000622 1.000973 1.001230 1.001656 0.531830 0.532072 0.532285 0.532506 0.532870 0.060837 1.000456 1.001119 0.875349 0.518504 0.513229 0.519425 0.521210 0.526331 0.525357 0.571421 0.534957 0.534713 0.534617 0.533917 0.534785 0.535579 0.535679 0.536352 0.536031 0.536497 0.537138 0.516903 0.491059 1.005182 1.008798 1.010065 1.010098 1.011155 1.011324 1.011586 1.011805 1.011863
1735 0.062304 0.996772 0.994961 0.993465 0.992449 0.992538 0.992429 0.993018 0.993122 0.993576 0.994022 0.994134 0.994595 0.994813 0.995260 0.995902 0.996312 1.000246 1.000612 1.000831 1.001297 1.002066 0.531885 0.532085 0.532417 0.532486 0.532722 0.062780 1.000677 1.001375 0.875580 0.518685 0.513199 0.518752 0.520695 0.526437 0.525202 0.571170 0.534776 0.534700 0.534697 0.534020 0.534712 0.535287 0.535903 0.535945 0.536309 0.536709 0.536990 0.516755 0.491418 1.005340 1.008855 1.010012 1.010301 1.011332 1.011411 1.011607 1.011826 1.011643

In [56]:
corr = pd.read_csv('../data/rebaseline_20150206_cary5000.csv', index_col=0)
corr.T


Out[56]:
Baseline 100%T empty_1 empty_2_1 empty_2_2 empty_2_3 empty_2_4 empty_2_5 empty_2_6 empty_2_7 empty_2_8 empty_2_9 empty_2_10 empty_2_11 empty_2_12 empty_2_13 empty_2_14 empty_2_15 empty_3_1 empty_3_2 empty_3_3 empty_3_4 empty_3_5 VG05_1_1 VG05_1_2 VG05_1_3 VG05_1_4 VG05_1_5 Baseline 100%T.1 empty_4_1 VG09-12_1_0 VG09-12_1_2 VG09-12_1_4 VG09-12_1_6 VG09-12_1_8 VG09-12_1_10 VG09-12_1_12 VG09-12_1_14 VG09-12_1_16 VG09-12_1_18 VG09-12_1_20 VG09-12_1_22 VG09-12_1_24 VG09-12_1_26 VG09-12_1_28 VG09-12_1_30 VG09-12_1_32 VG09-12_1_34 VG09-12_1_36 VG09-12_1_38 VG09-12_1_40 VG09-12_1_42 VG09-12_1_44 VG09-12_1_46 VG09-12_1_48 VG09-12_1_50 empty_5_1 empty_5_2 empty_5_3 empty_5_4 empty_5_5
time 2015-02-06 13:45:42 2015-02-06 13:48:36 2015-02-06 13:50:53 2015-02-06 13:51:57 2015-02-06 13:52:58 2015-02-06 13:53:58 2015-02-06 13:54:59 2015-02-06 13:55:59 2015-02-06 13:57:00 2015-02-06 13:58:00 2015-02-06 13:59:01 2015-02-06 14:00:01 2015-02-06 14:01:01 2015-02-06 14:02:01 2015-02-06 14:03:02 2015-02-06 14:04:02 2015-02-06 14:05:03 2015-02-06 14:20:40 2015-02-06 14:21:41 2015-02-06 14:22:42 2015-02-06 14:23:42 2015-02-06 14:24:43 2015-02-06 14:27:37 2015-02-06 14:28:38 2015-02-06 14:29:39 2015-02-06 14:30:39 2015-02-06 14:31:40 2015-02-06 14:39:58 2015-02-06 14:41:17 2015-02-06 14:50:46 2015-02-06 14:51:43 2015-02-06 14:52:40 2015-02-06 14:53:37 2015-02-06 14:54:35 2015-02-06 14:55:32 2015-02-06 14:56:30 2015-02-06 14:57:27 2015-02-06 14:58:24 2015-02-06 14:59:22 2015-02-06 15:00:19 2015-02-06 15:01:17 2015-02-06 15:02:14 2015-02-06 15:03:12 2015-02-06 15:04:09 2015-02-06 15:05:06 2015-02-06 15:06:04 2015-02-06 15:07:01 2015-02-06 15:07:58 2015-02-06 15:08:56 2015-02-06 15:09:53 2015-02-06 15:10:50 2015-02-06 15:11:48 2015-02-06 15:12:45 2015-02-06 15:13:42 2015-02-06 15:14:40 2015-02-06 15:18:03 2015-02-06 15:19:05 2015-02-06 15:20:05 2015-02-06 15:21:06 2015-02-06 15:22:06
mean 0.1087186 0.9957872 0.9926498 0.9908314 0.9906155 0.9904822 0.9908665 0.9912781 0.9916097 0.991675 0.9919954 0.992257 0.992545 0.9928936 0.9934452 0.9939193 0.9941676 0.9978184 0.9979871 0.9984328 0.998799 0.9992173 0.5280796 0.5283065 0.5285396 0.5287853 0.5289416 0.1097686 1.005132 1.005681 0.8794889 0.5120914 0.5047801 0.5123605 0.5162238 0.5217098 0.5219908 0.5664048 0.534421 0.5340435 0.53402 0.5330458 0.5340295 0.5346758 0.5350179 0.5352743 0.5355544 0.5359295 0.5363229 0.5136548 0.4928453 1.009119 1.012637 1.014035 1.014353 1.015114 1.015346 1.015579 1.015728 1.015885
stddev 0.03012316 0.000618184 0.00164418 0.001584798 0.001256841 0.001314182 0.001264141 0.001367735 0.00138019 0.00146376 0.001553155 0.00156878 0.001540197 0.001684987 0.001548717 0.001740542 0.001793219 0.002767232 0.002900688 0.002739297 0.002767122 0.002787385 0.002919238 0.002918341 0.002909277 0.002906488 0.00297041 0.03014187 0.0002875276 0.0004298377 0.000952451 0.007618797 0.007591666 0.005078568 0.005340543 0.004817525 0.004523641 0.007110308 0.002309255 0.002301742 0.002319278 0.002619655 0.002424139 0.00238429 0.002301456 0.002366789 0.002320788 0.002333405 0.002355324 0.004050169 0.001377504 0.0007203449 0.0006533268 0.0006116508 0.0005912818 0.0006968267 0.0006525894 0.0006781845 0.0006851215 0.0006973577
rebaseline 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817 1.004817
time_num 1.42323e+18 1.423231e+18 1.423231e+18 1.423231e+18 1.423231e+18 1.423231e+18 1.423231e+18 1.423231e+18 1.423231e+18 1.423231e+18 1.423231e+18 1.423231e+18 1.423231e+18 1.423231e+18 1.423231e+18 1.423231e+18 1.423232e+18 1.423232e+18 1.423233e+18 1.423233e+18 1.423233e+18 1.423233e+18 1.423233e+18 1.423233e+18 1.423233e+18 1.423233e+18 1.423233e+18 1.423234e+18 1.423234e+18 1.423234e+18 1.423234e+18 1.423234e+18 1.423234e+18 1.423234e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423235e+18 1.423236e+18 1.423236e+18 1.423236e+18 1.423236e+18 1.423236e+18 1.423236e+18 1.423236e+18 1.423236e+18 1.423236e+18
est_mean 0.9882757 0.9891132 0.9897726 0.9900806 0.9903742 0.990663 0.9909566 0.9912454 0.991539 0.9918278 0.9921214 0.9924102 0.992699 0.9929878 0.9932814 0.9935702 0.9938638 0.9983737 0.9986673 0.9989609 0.9992497 0.9995433 1.000381 1.000674 1.000968 1.001257 1.00155 1.003947 1.004328 1.007066 1.007341 1.007615 1.007889 1.008169 1.008443 1.008722 1.008996 1.009271 1.00955 1.009824 1.010103 1.010378 1.010657 1.010931 1.011206 1.011485 1.011759 1.012033 1.012313 1.012587 1.012861 1.013141 1.013415 1.013689 1.013968 1.014945 1.015244 1.015533 1.015826 1.016115

In [57]:
corrT = corr.T
#corrT.loc['rebaseline']

The net output is:
$T_{corr} = T_{obs} \times b / m$

where $b$ is the baseline correction and
$m$ is the model drift


In [58]:
cspec = df*b/m

In [59]:
plt.plot([-99, -91],sns.xkcd_rgb['scarlet'], alpha=1.0, label='raw', );
plt.plot(df.index, df, sns.xkcd_rgb['scarlet'], alpha=0.13);

b = corrT.loc['rebaseline']
m = corrT.loc['est_mean']

plt.plot([-99, -91], sns.xkcd_rgb['ocean blue'], alpha=1.0, label='corrected')
plt.plot(df.index, cspec, sns.xkcd_rgb['ocean blue'], alpha=0.33)
plt.xlim(1250, 1780)
plt.ylim(0.98, 1.02)
plt.xlabel('$\lambda$ (nm)')
plt.ylabel('$T$')
plt.legend(loc='best')
plt.title('Correct mean-level of spectra')


Out[59]:
<matplotlib.text.Text at 0x11089aed0>

In [92]:
VG05_cols = [col_name[0:4] == 'VG05' for col_name in cspec.columns.values]
empty_3_cols = [col_name[0:7] == 'empty_3' for col_name in cspec.columns.values]
empty_3 = cspec[cspec.columns[empty_3_cols]].mean(axis=1)
cVG05 = cspec[cspec.columns[VG05_cols]].div(empty_3, axis=0)
cVG05_mean = cVG05.mean(axis=1)
cVG05_std = cVG05.std(axis=1)

In [99]:
plt.plot([-99, -91],sns.xkcd_rgb['scarlet'], alpha=1.0, label='raw', );
plt.plot(cspec.index, cspec[cspec.columns[VG05_cols]], sns.xkcd_rgb['scarlet'], alpha=0.53);

plt.plot([-99, -91], sns.xkcd_rgb['ocean blue'], alpha=1.0, label='corrected')
plt.plot(df.index, cVG05, sns.xkcd_rgb['ocean blue'], alpha=0.53)

plt.errorbar(df.index, cVG05_mean, yerr=cVG05_std, fmt='k.')

plt.xlim(1250, 1780)
plt.ylim(0.52, 0.535)
plt.xlabel('$\lambda$ (nm)')
plt.ylabel('$T$')
plt.legend(loc='best')
plt.title('Correct spectral shape of VG05')


Out[99]:
<matplotlib.text.Text at 0x111e28dd0>

In [127]:
cln_corr = pd.DataFrame()
cln_corr['VG05'] = cVG05_mean
cln_corr.set_index(df.index)
cln_corr['VG05_e'] = cVG05_std
cln_corr.head()


Out[127]:
VG05 VG05_e
wavelength
1775 0.531022 0.000221
1765 0.530933 0.000081
1755 0.530829 0.000148
1745 0.530777 0.000158
1735 0.530716 0.000099

VG09-12


In [128]:
cspec.head()


Out[128]:
Baseline 100%T empty_1 empty_2_1 empty_2_2 empty_2_3 empty_2_4 empty_2_5 empty_2_6 empty_2_7 empty_2_8 empty_2_9 empty_2_10 empty_2_11 empty_2_12 empty_2_13 empty_2_14 empty_2_15 empty_3_1 empty_3_2 empty_3_3 empty_3_4 empty_3_5 VG05_1_1 VG05_1_2 VG05_1_3 VG05_1_4 VG05_1_5 Baseline 100%T.1 empty_4_1 VG09-12_1_0 VG09-12_1_2 VG09-12_1_4 VG09-12_1_6 VG09-12_1_8 VG09-12_1_10 VG09-12_1_12 VG09-12_1_14 VG09-12_1_16 VG09-12_1_18 VG09-12_1_20 VG09-12_1_22 VG09-12_1_24 VG09-12_1_26 VG09-12_1_28 VG09-12_1_30 VG09-12_1_32 VG09-12_1_34 VG09-12_1_36 VG09-12_1_38 VG09-12_1_40 VG09-12_1_42 VG09-12_1_44 VG09-12_1_46 VG09-12_1_48 VG09-12_1_50 empty_5_1 empty_5_2 empty_5_3 empty_5_4 empty_5_5
wavelength
1775 0.05555102 1.007709 1.005067 1.002948 1.002073 1.002084 1.001624 1.001949 1.00202 1.001886 1.001586 1.001877 1.001696 1.001939 1.001923 1.003635 1.002239 1.001946 1.001981 1.001798 1.002344 1.002149 0.5317637 0.5320036 0.5322881 0.5322264 0.5322529 0.05536917 1.00087 0.9992563 0.8723805 0.5188433 0.5124204 0.5189653 0.520779 0.5247108 0.5243166 0.569115 0.532805 0.5324116 0.5321815 0.5316778 0.5319658 0.532505 0.5326229 0.5330494 0.5329984 0.533182 0.5335017 0.5133027 0.4880062 0.997138 1.000041 1.000956 1.001273 1.00115 1.000986 1.000896 1.000605 1.000576
1765 0.05725822 1.007668 1.00523 1.002977 1.001968 1.001895 1.001448 1.001871 1.001728 1.001777 1.001809 1.001741 1.001534 1.001905 1.001799 1.003599 1.00232 1.001905 1.001824 1.001795 1.001861 1.001835 0.5318729 0.5318065 0.5319507 0.5319062 0.5320227 0.05705611 1.001108 0.9990469 0.8728604 0.5181034 0.5124407 0.5188918 0.520306 0.5245322 0.5237363 0.5690901 0.5328167 0.5322874 0.5319697 0.5314828 0.5321198 0.5328253 0.532471 0.5329158 0.5328969 0.5332025 0.533534 0.5134181 0.4874492 0.9970148 1.000031 1.001272 1.001329 1.001076 1.000914 1.001175 1.000758 1.000775
1755 0.05922239 1.007585 1.005061 1.003813 1.001757 1.001785 1.001636 1.001852 1.001801 1.001631 1.001837 1.001644 1.001682 1.001766 1.001916 1.00221 1.00227 1.001678 1.001909 1.00188 1.001918 1.001922 0.5316957 0.5317562 0.5316996 0.5318935 0.532041 0.05901726 1.001114 0.999261 0.8731446 0.5174065 0.5122651 0.5183538 0.5199886 0.5241794 0.5233323 0.5690809 0.532805 0.5323254 0.5321782 0.5313076 0.5320049 0.5325948 0.5322304 0.5326517 0.532607 0.5329856 0.5331505 0.513155 0.4876448 0.9973654 1.000309 1.001144 1.001307 1.001016 1.001161 1.001098 1.000957 1.000697
1745 0.06109606 1.007521 1.004978 1.003755 1.001823 1.001869 1.001429 1.001527 1.001623 1.001628 1.001869 1.001711 1.001512 1.001799 1.001725 1.002028 1.002303 1.001562 1.001957 1.002014 1.001982 1.002114 0.5316271 0.5317139 0.5317707 0.5318373 0.5320451 0.06088938 1.000944 0.9988838 0.8731559 0.5170642 0.5116649 0.517698 0.5193364 0.5242939 0.5231811 0.5688993 0.5324489 0.5320617 0.5318196 0.5309783 0.5316946 0.5323399 0.5322948 0.5328164 0.532353 0.5326719 0.5331606 0.5129363 0.4871587 0.996924 1.000239 1.001225 1.000982 1.001065 1.000938 1.000913 1.00084 1.000613
1735 0.06304293 1.007743 1.005242 1.003418 1.002095 1.001892 1.001486 1.001788 1.001597 1.001763 1.001915 1.001737 1.00191 1.001838 1.001992 1.002347 1.002463 1.001875 1.001947 1.001872 1.002049 1.002524 0.5316829 0.5317261 0.5319026 0.5318179 0.5318973 0.06283404 1.001165 0.9991389 0.8733867 0.5172453 0.5116343 0.5170272 0.518823 0.5243987 0.523027 0.5686497 0.5322686 0.5320488 0.531899 0.5310815 0.5316227 0.5320492 0.532517 0.5324118 0.5326293 0.5328823 0.5330139 0.5127898 0.487515 0.9970811 1.000297 1.001172 1.001183 1.00124 1.001024 1.000933 1.00086 1.000395

In [129]:
VG09_12_cols = [col_name[0:7] == 'VG09-12' for col_name in cspec.columns.values]
empty_5_cols = [col_name[0:7] == 'empty_5' for col_name in cspec.columns.values]
empty_5 = cspec[cspec.columns[empty_5_cols]].mean(axis=1)
cVG0912 = cspec[cspec.columns[VG09_12_cols]].div((cspec['empty_4_1']+empty_5)*0.5, axis=0)
cVG0912.head()


Out[129]:
VG09-12_1_0 VG09-12_1_2 VG09-12_1_4 VG09-12_1_6 VG09-12_1_8 VG09-12_1_10 VG09-12_1_12 VG09-12_1_14 VG09-12_1_16 VG09-12_1_18 VG09-12_1_20 VG09-12_1_22 VG09-12_1_24 VG09-12_1_26 VG09-12_1_28 VG09-12_1_30 VG09-12_1_32 VG09-12_1_34 VG09-12_1_36 VG09-12_1_38 VG09-12_1_40 VG09-12_1_42 VG09-12_1_44 VG09-12_1_46 VG09-12_1_48 VG09-12_1_50
wavelength
1775 0.9984016 0.8716343 0.5183996 0.5119821 0.5185214 0.5203335 0.524262 0.5238681 0.5686282 0.5323493 0.5319562 0.5317263 0.531223 0.5315108 0.5320495 0.5321674 0.5325935 0.5325425 0.5327259 0.5330454 0.5128637 0.4875888 0.9962851 0.9991854 1.0001 1.000416
1765 0.9980249 0.8719674 0.5175733 0.5119164 0.5183609 0.5197737 0.5239956 0.5232005 0.5685079 0.5322716 0.5317428 0.5314255 0.5309391 0.5315754 0.5322802 0.5319262 0.5323706 0.5323517 0.532657 0.5329882 0.5128928 0.4869505 0.9959948 0.9990083 1.000247 1.000304
1755 0.998213 0.8722288 0.5168638 0.5117278 0.5178101 0.5194432 0.5236297 0.5227835 0.5684841 0.5322463 0.5317671 0.5316201 0.5307504 0.5314469 0.5320362 0.5316722 0.5320931 0.5320484 0.5324266 0.5325914 0.5126168 0.4871334 0.9963194 0.9992598 1.000094 1.000257
1745 0.9979769 0.8723632 0.5165948 0.5112003 0.5172279 0.5188649 0.5238179 0.5227061 0.5683828 0.5319654 0.5315786 0.5313367 0.5304962 0.5312118 0.5318566 0.5318116 0.5323326 0.5318697 0.5321883 0.5326765 0.5124706 0.4867164 0.9960189 0.999331 1.000316 1.000073
1735 0.9981129 0.8724899 0.5167141 0.5111089 0.5164963 0.5182902 0.5238602 0.5224899 0.5680657 0.531722 0.5315024 0.5313528 0.5305361 0.5310768 0.5315029 0.5319702 0.5318651 0.5320823 0.5323351 0.5324666 0.5122632 0.4870144 0.9960572 0.9992694 1.000144 1.000155

In [130]:
plt.plot([-99, -91],sns.xkcd_rgb['scarlet'], alpha=1.0, label='raw', );
plt.plot(cspec.index, cspec[cspec.columns[VG09_12_cols]], sns.xkcd_rgb['scarlet'], alpha=0.53);

plt.plot([-99, -91], sns.xkcd_rgb['ocean blue'], alpha=1.0, label='corrected')
plt.plot(df.index, cVG0912, sns.xkcd_rgb['ocean blue'], alpha=0.53)

plt.errorbar(df.index, cVG05_mean, yerr=cVG05_std, fmt='k.', label='DSP')

plt.xlim(1250, 1780)
plt.ylim(0.52, 0.538)
#plt.ylim(0.45, 0.538)
plt.xlabel('$\lambda$ (nm)')
plt.ylabel('$T$')
plt.legend(loc='best')
plt.title('Spectral correction of VG09-12 is negligible')


Out[130]:
<matplotlib.text.Text at 0x1168edbd0>

In [136]:
VG09_12_gap = cVG0912.div(cln_corr.VG05, axis=0)

In [139]:
#plt.plot([-99, -91], sns.xkcd_rgb['ocean blue'], alpha=1.0, label='corrected')
plt.plot(df.index, VG09_12_gap, sns.xkcd_rgb['ocean blue'], alpha=0.53)

plt.xlim(1250, 1780)
plt.ylim(0.90, 1.01)
plt.xlabel('$\lambda$ (nm)')
plt.ylabel('$T$')
#plt.legend(loc='best')
plt.title('VG09-12 sample transport')


Out[139]:
<matplotlib.text.Text at 0x117216ad0>

In [140]:
VG09_12_gap.to_csv('../data/VG09_12_gap_20150206.csv')

In [ ]: