Commit 165800ee authored by Marcella Wijngaarden's avatar Marcella Wijngaarden

Add back ringfind burnin with LAL detector locations

parent f90088e6
......@@ -87,9 +87,7 @@ void skymcmc(struct Net *net, int MCX, int *mxc, FILE *chain, double **paramx, d
// sky parameter order
//[0] alpha, [1] sin(delta) [2] psi [3] ciota [4] scale [5] phi0 [6] dt
// max and min of rescaling parameter
scmin = 0.1;
scmax = 10.0;
......@@ -215,7 +213,7 @@ void skymcmc(struct Net *net, int MCX, int *mxc, FILE *chain, double **paramx, d
alpha = gsl_rng_uniform(r);
if(alpha > 1.0 && net->Nifo > 1) // ring
if(alpha > 0.8 && net->Nifo > 1) // ring
{
......@@ -1234,25 +1232,26 @@ void Ring(struct Net *net, double *skyx, double *skyy, int d1, int d2, gsl_rng *
kvr = (double*)malloc(sizeof(double)* 3);
// From https://dcc.ligo.org/public/0072/P000006/000/P000006-C.pdf (note sign flip on y axis)
// Location of Hanford vertex from Geocenter in s
H1[0] = net->location[0][0]; // -2.161414928e6/CLIGHT;
H1[1] = net->location[0][1]; //3.834695183e6/CLIGHT;
H1[2] = net->location[0][2]; // 4.600350224e6/CLIGHT;
H1[0] = net->location[0][0]/CLIGHT;
H1[1] = -1*net->location[0][1]/CLIGHT;
H1[2] = net->location[0][2]/CLIGHT;
//H1mag = sqrt(H1[0]*H1[0]+H1[1]*H1[1]+H1[2]*H1[2]);
// Location of Livingston vertex from Geocenter in s
L1[0] = net->location[1][0]; // -74276.04192/CLIGHT;
L1[1] = net->location[1][1]; //5.496283721e6/CLIGHT;
L1[2] = net->location[1][2]; // 3.224257016e6/CLIGHT;
L1[0] = net->location[1][0]/CLIGHT;
L1[1] = -1*net->location[1][1]/CLIGHT;
L1[2] = net->location[1][2]/CLIGHT;
//L1mag = sqrt(L1[0]*L1[0]+L1[1]*L1[1]+L1[2]*L1[2]);
// Location of Virgo vertex from Geocenter in s
V1[0] = net->location[2][0]; //4546374.098/CLIGHT;
V1[1] = net->location[2][1]; //-842989.6972/CLIGHT;
V1[2] = net->location[2][2]; // 4378576.963/CLIGHT;
V1[0] = net->location[2][0]/CLIGHT;
V1[1] = -1*net->location[2][1]/CLIGHT;
V1[2] = net->location[2][2]/CLIGHT;
if(d1 == 0)
{
......@@ -1298,19 +1297,11 @@ void Ring(struct Net *net, double *skyx, double *skyy, int d1, int d2, gsl_rng *
// Unet->Nifot vector between the sites
for(i = 0; i <3; i++) zv[i] /= zmag;
//remap gmst back to [0:2pi]
double intpart;
double decpart;
double gmstrad = gmst/TWOPI;
intpart = (int)( gmstrad );
decpart = gmstrad - (double)intpart;
gmstrad = decpart*TWOPI;
alpha = skyx[0];
sind = skyx[1];
cosd = sqrt(1.0-sind*sind);
calpha = cos(alpha-gmstrad);
salpha = -sin(alpha-gmstrad);
calpha = cos(alpha-gmst);
salpha = -sin(alpha-gmst);
// Unusual convention on spherical angle
// propagation direction
......@@ -1348,7 +1339,7 @@ void Ring(struct Net *net, double *skyx, double *skyy, int d1, int d2, gsl_rng *
skyy[1] = kvr[2];
rot = atan2(kvr[1],kvr[0]);
rot = gmstrad - rot;
rot = gmst - rot;
if(rot < 0.0) rot += TPI;
skyy[0] = rot;
......@@ -1361,8 +1352,7 @@ void Ring(struct Net *net, double *skyx, double *skyy, int d1, int d2, gsl_rng *
free(zv);
free(uv);
free(vv);
}
......
......@@ -3090,12 +3090,6 @@ void extrinsic_burnin_cbc(struct bayesCBC *bayescbc, struct Data *data, struct M
}
printf("before skymcmc\n");
for(i=0; i<NC; i++)
{
double DL = exp(pallx[i][6])/(1.0e6*PC_SI);
printf("DL[%i][6] = %f, %f\n", i, DL, pallx[i][j]);
}
// intialize the local heat array
// run cold to force ML
for(i=0; i<NCC; i++) heat[i] = 0.25;
......
Markdown is supported
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