Commit aabb1d28 authored by Marcus Haberland's avatar Marcus Haberland
Browse files

save pre include f_1 fit

parent d3c3848f
This diff is collapsed.
Figures/Strain_1.png

256 KB | W: | H:

Figures/Strain_1.png

173 KB | W: | H:

Figures/Strain_1.png
Figures/Strain_1.png
Figures/Strain_1.png
Figures/Strain_1.png
  • 2-up
  • Swipe
  • Onion skin
Figures/Strain_2.png

266 KB | W: | H:

Figures/Strain_2.png

260 KB | W: | H:

Figures/Strain_2.png
Figures/Strain_2.png
Figures/Strain_2.png
Figures/Strain_2.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
......@@ -255,31 +255,33 @@ def test2(n=20,i=5,j=5):
def is_analytical_truly_better():
B = binary(np.arccos(.3),5.,1e3,np.arccos(-.2),4.,m1=.23,m2=.23,freq=10e-3,mP=5,P=2,theta_P=pi/2,phi_P=pi/2,T_obs=4)
arr_yr = np.linspace(0,1,1000)*yr
func = B.h_i(3,1e-6)
arr_yr = np.linspace(0,1,10000)*yr
plt.figure(dpi=300)
plt.plot(arr_yr/yr,[B.strain(t) for t in arr_yr],'-',label='numerical')
plt.plot(arr_yr/yr,[B.strain_analytical(t) for t in arr_yr],':',label='analytic')
plt.legend()
plt.title('One year strain')
#plt.plot(arr_yr/yr,[func(t) for t in arr_yr],'-',label='numerical')
plt.plot(arr_yr/yr,[B.dh_dtheta_S(t) for t in arr_yr],'-',label='analytic')
#plt.legend()
plt.title('One year strain - analytical')
plt.xlabel(r'$t$ in yr')
plt.ylabel(r'h(t)')
#plt.savefig(fig+'\d_strain_yr\d_strain_{}.png'.format(st))
plt.ylabel(r'$\partial h/\partial \theta_S (t)$')
plt.savefig(fig+'\d_strain_yr\d_strain_comparison_yr.png')
plt.show()
hour = np.linspace(0,5*60,1000)
plt.figure(dpi=300)
C = binary(np.arccos(.3),5.,1e3,np.arccos(-.2),4.,m1=.23,m2=.23,freq=10e-3,mP=0,P=100,theta_P=0,phi_P=0,T_obs=4)
plt.plot(hour,[B.strain(t) for t in hour],'-')
plt.plot(hour,[B.strain_analytical(t) for t in hour],'-')
plt.plot(hour,[C.strain(t) for t in hour],':')
plt.plot(hour,[C.strain_analytical(t) for t in hour],':')
plt.legend(['$h_I$ w/ exoplanet - num','$h_I$ w/ exoplanet - ana','$h_I$ w/o exoplanet - num','$h_I$ w/o exoplanet - ana'])
plt.xlabel('$t$ in s for five minutes')
plt.ylabel('Strain $h$ dimensionless')
plt.title(r'For $P=2$ yr and $t_0=0$ yr')
plt.savefig(fig+'Strain_1.png')
plt.show()
for add in [.5,1,1.5]:
hour = np.linspace(0,5*60,1000) + add*yr
plt.figure(dpi=300)
C = binary(np.arccos(.3),5.,1e3,np.arccos(-.2),4.,m1=.23,m2=.23,freq=10e-3,mP=0,P=100,theta_P=0,phi_P=0,T_obs=4)
funcB = C.h_i(3,1e-6)
plt.plot(hour-add*yr,[func(t) for t in hour],'-')
plt.plot(hour-add*yr,[B.dh_dtheta_S(t) for t in hour],'-.')
plt.plot(hour-add*yr,[funcB(t) for t in hour],'--')
plt.plot(hour-add*yr,[C.dh_dtheta_S(t) for t in hour],':')
plt.legend(['$h_I$ w/ exoplanet - num','$h_I$ w/ exoplanet - ana','$h_I$ w/o exoplanet - num','$h_I$ w/o exoplanet - ana'])
plt.xlabel('$t$ in s for five minutes')
plt.ylabel(r'$\partial h/\partial \theta_S (t)$')
plt.title(r'For $P=2$ yr and $t_0=$ {} yr'.format(add))
plt.savefig(fig+'\d_strain_yr\d_strain_comparison_5_min_{}e-1yr.png'.format(10*add))
plt.show()
def correlation_mat():
corr = [[ 1.04938198e-03, -4.14987183e-05, -1.04523642e-04, -2.62089676e-11, -8.63712760e-07, -5.78670634e-08, -9.75814863e-09, -2.72408696e-05, -1.28853453e-05],
......@@ -291,6 +293,7 @@ def correlation_mat():
[-9.75814863e-09, 8.89261296e-08, 3.47142736e-07, 1.39041402e-14, -9.11848427e-09, 9.90273954e-10, 7.54620550e-09, 3.78683215e-08, -4.65191159e-08],
[-2.72408696e-05, -1.29015354e-05, -7.82904460e-05, -6.91237576e-12, -5.98017584e-07, 3.61014744e-07, 3.78683215e-08, 1.09062208e-05, -1.82041472e-06],
[-1.28853453e-05, -7.29359411e-07, -6.07128660e-06, -1.92107282e-12, 7.15073872e-07, 1.86895806e-07, -4.65191159e-08, -1.82041472e-06, 4.69137210e-06]]
corr = np.array(corr)
labels=[r'K',r'P',r'$\phi_0$','$f_0$', 'ln(A)',r'$\theta_S$', '$\phi_S$', r'$\theta_L$', '$\phi_L$']
rel_unc = np.log10(np.abs(corr*(B.signal_to_noise()*5)**2))
plt.matshow(rel_unc)
......@@ -300,6 +303,17 @@ def correlation_mat():
plt.title(r'log$_{10}($Correlation matrix$\times$SNR$^2\times (M_P / M_J)^2)$')
plt.savefig(fig+'Correlation_Mat.png')
plt.show()
labels=[r'K',r'P',r'$\phi_0$', 'ln(A)',r'$\theta_S$', '$\phi_S$', r'$\theta_L$', '$\phi_L$']
corr = np.delete(np.delete(corr,3,0),3,1)
rel_unc = np.log10(np.abs(corr*(B.signal_to_noise()*5)**2))
plt.matshow(rel_unc)
plt.xticks(np.arange(8),labels=labels,rotation=40)
plt.yticks(np.arange(8),labels=labels)
plt.colorbar()
plt.title(r'log$_{10}($Correlation matrix$\times$SNR$^2\times (M_P / M_J)^2)$')
plt.savefig(fig+'Correlation_Mat_2.png')
plt.show()
pass
#test2()
......@@ -311,4 +325,5 @@ def correlation_mat():
#A = np.power(uncs[:-2,:]*uncs[1:-1,:]*uncs[2:,:],1/3)[::3,:]
#one_year_degeneracy()
#deriv_check()
#correlation_mat()
is_analytical_truly_better()
\ No newline at end of file
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment