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

Added a computation of the X-Ray binaries SNR

parent e63aeb09
......@@ -4,7 +4,8 @@ import matplotlib.pyplot as plt
from scipy import integrate, optimize
import LISA
import time
import astropy
from astropy import units
import astropy.coordinates as coord
import pickle
pi = np.pi
......@@ -14,6 +15,7 @@ yr = 24*3600*365.25 # s
M_J = 1.898e27 # kg
M_S = 1.989e30 # kg
R_S = 696340e3 # m
r_S = 2*G/c**2 # m
sqth = np.sqrt(3)/2
......@@ -388,7 +390,7 @@ def mu_dependence_ig(n=10,plot=True):
mu = np.zeros((n,n))
for i, theta in enumerate(np.arcsin(mus)+pi/2):
for j, phi in enumerate(phis+pi):
b = ig_binary(theta_S_Ec=theta,phi_S_Ec=phi,theta_L=0,phi_L=0)
b = ig_binary(theta_S_Ec=theta,phi_S_Ec=phi,theta_L=theta,phi_L=phi)
if np.abs(b.kn) == 1:
amplitude[i,j] = 0.
else:
......@@ -413,7 +415,37 @@ def mu_dependence_ig(n=10,plot=True):
plt.show()
return [amplitude,mu,mus,phis]
def XRayBinary(f=10e-3,n=10):
ra= '+13d29m43.3s'
dec= '+47d11m34.7s'
c = coord.SkyCoord(ra=ra,dec=dec,frame='icrs').transform_to(coord.BarycentricMeanEcliptic)
phi = c.lon.radian
theta = -c.lat.radian + pi/2
mStar = np.logspace(np.log10(3.4),np.log10(7.3),n+1)
mBH = np.logspace(np.log10(2),np.log10(10),n+1)
snr = np.zeros((n,n))
for i, mA in enumerate(mStar[:-1]):
for j, mB in enumerate(mBH[:-1]):
bi = binary(theta_S_Ec=theta,phi_S_Ec=phi,dist=8.6e6,theta_L=theta,phi_L=phi,m1=np.sqrt(mA*mStar[i+1]),m2=np.sqrt(mB*mBH[i+1]))
snr[i,j] = bi.sep()/R_S
print(i,j)
plt.figure(dpi=300)
plt.pcolor(mBH,mStar,snr)
plt.xscale('log')
plt.yscale('log')
plt.colorbar()
plt.xlabel(r'$M_{BH}$ in $M_\odot$')
plt.ylabel(r'$M_{Star}$ in $M_\odot$')
plt.title(r'$d/R_\odot$ for M51-ULS-1b if face-on and $f_{GW}=10$ mHz')
plt.savefig(fig+'XRay_sep.png')
plt.show()
return snr
#test2()
#uncs = test(20)
#pos_dep()
......@@ -430,4 +462,5 @@ def mu_dependence_ig(n=10,plot=True):
#strain_ig()
#hr_d_strain()
#sin_fit(ig_binary())
A = mu_dependence_ig(20,True)
\ No newline at end of file
#A = mu_dependence_ig(20,True)
#A = XRayBinary(n=10)
\ No newline at end of file
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