@@ -7,6 +7,10 @@ warnings.simplefilter("ignore") #Used to suppress the RuntimeWarnings. But if yo
This script calculates the RDGW150914 constraints with ptemcee - specifically, the n=1 case varying the fundamental frequencies, tshift = 0. It produces the chain plot, corner plot, parameter constraints, and data plotted with the 1-sigma band. Since we are working specifically for the n=1 case, we also compare alpha_0 and alpha_1 in a histogram, in order to demonstrate that the two are indistinguishable with each other.
--- R^a_{yne} L^i_u, 08/09/2020
Adapted to include the nmax = 0 case.
---R^a_{yne} L^i_u, 08/20/2020, don't know what to do now
@@ -104,15 +108,12 @@ omegas = [qnm.modes_cache(s=-2,l=2,m=2,n=i)(a=af)[0] for i in range (0,nmax+1)]
defmodel_dv(theta):
#x0, y0= theta
#Your nmax might not align with the dim of theta. Better check it here.
assertint(len(theta)/4)==nmax+1,'Please recheck your n and parameters'
w=(np.real(omegas))/mf
tau=-1/(np.imag(omegas))*mf
dim=int(len(theta)/4)
assertint(len(theta)/4)==dim,'Please recheck your n and parameters'
avars=theta[:(nmax+1)]
bvars=theta[(nmax+1):2*(nmax+1)]
xvars=theta[2*(nmax+1):3*(nmax+1)]
yvars=theta[3*(nmax+1):]
avars=theta[:(dim)]
bvars=theta[(dim):2*(dim)]
xvars=theta[2*(dim):3*(dim)]
yvars=theta[3*(dim):]
ifvary_fund==False:
avars[0]=0
...
...
@@ -131,24 +132,24 @@ def model_dv(theta):
#It works for the (xn*Exp[iyn]) version.
deflog_prior(theta):
#Warning: we are specifically working with nmax=1 so here individual prior to the parameters are manually adjusted. This does not apply to all other nmax's.