Commit 57d1cc56 authored by Katerina Chatziioannou's avatar Katerina Chatziioannou Committed by Meg Millhouse
Browse files

Extend orientation proposal to the whole parameter space for psi and phi

parent bd731c37
......@@ -2603,7 +2603,7 @@ void EvolveExtrinsicParameters(struct Data *data, struct Prior *prior, struct Mo
if(ic==0)sky=1;
sky_ring_proposal(paramsx,paramsy,data,seed);
if(data->orientationProposalFlag && uniform_draw(seed)<0.5){
network_orientation_proposal(paramsx, paramsy, data, &logJ);
network_orientation_proposal(paramsx, paramsy, data, &logJ, seed);
}
else{
uniform_orientation_proposal(paramsy, seed);
......
......@@ -1796,7 +1796,7 @@ static void update_orientation_parameters(double *paramsx, double *paramsy, stru
}
void network_orientation_proposal(double *paramsx, double *paramsy, struct Data *data, double *logJ)
void network_orientation_proposal(double *paramsx, double *paramsy, struct Data *data, double *logJ, gsl_rng *seed)
{
int i, j;
double detJ;
......@@ -1844,6 +1844,12 @@ void network_orientation_proposal(double *paramsx, double *paramsy, struct Data
detJ = matrix_jacobian(J, NJ);
if(uniform_draw(seed) > 0.5)
{
paramsy[4] += LAL_PI;
paramsy[2] += LAL_PI_2;
}
for(i=0; i<NJ; i++)free(J[i]);
free(J);
free(paramsyp);
......
......@@ -95,7 +95,7 @@ void sky_fix_proposal(double *x, double *y, struct Data *data, gsl_rng *seed);
void uniform_orientation_proposal(double *y, gsl_rng *seed);
void network_orientation_proposal(double *paramsx, double *paramsy, struct Data *data, double *logJ);
void network_orientation_proposal(double *paramsx, double *paramsy, struct Data *data, double *logJ, gsl_rng *seed);
/* ********************************************************************************** */
......
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