Commit c4936b1a authored by John Douglas Veitch's avatar John Douglas Veitch 💬
Browse files

Make changes to enable parallax and enable distance and dec priors

parent 941c1c8a
......@@ -561,6 +561,18 @@ REAL8 priorFunction( LALInferenceRunState *runState, LALInferenceVariables *para
XLAL_CALLGSL( gsl_vector_free( vm ) );
}
/* hardcoding distance prior uniform in volume, while uniform in Sin for declination */
if (LALInferenceCheckVariable(threadState->currentParams,"DIST"){
REAL8 distance = LALInferenceGetREAL8Variable( threadState->currentParams, "DIST" );
prior += 2.0*log(distance);
}
if (LALInferenceCheckVariable(threadState->currentParams,"DEC"){
REAL8 declination = LALInferenceGetREAL8Variable( threadState->currentParams, "DEC" );
prior += log(cos(declination));
}
return prior;
}
......
......@@ -1050,7 +1050,7 @@ XLALBarycenter ( EmissionTime *emit, /**< [out] emission-time information */
{
REAL8 r2 = 0.e0; /*squared dist from SSB to center of earth, in sec^2 */
REAL8 dr2 = 0.e0; /*time deriv of r2 */
if (baryinput->dInv > 1.0e-11){ /*implement if corr. > 1 microsec*/
if (baryinput->dInv > 0.0){ /*implement if corr. > 1 microsec*/
for (j=0;j<3;j++){
r2 += earth->posNow[j]*earth->posNow[j];
dr2 += 2.e0*earth->posNow[j]*earth->velNow[j];
......@@ -1391,7 +1391,7 @@ XLALBarycenterOpt ( EmissionTime *emit, /**< [out] emission-time information *
REAL8 dr2 = 0; /* time deriv of r2 */
REAL8 finiteDistCorr, dfiniteDistCorr; /*correction to Roemer delay due to finite dist D to source; important for D < 100pc */
if (baryinput->dInv > 1.0e-11) /* implement if corr. > 1 microsec */
if (baryinput->dInv > 0.0) /* implement if corr. > 1 microsec */
{
for ( UINT4 j=0; j<3; j++ )
{
......
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