Commit b99d3d5e authored by NV KRISHNENDU's avatar NV KRISHNENDU Committed by NV KRISHNENDU
Browse files

accounting for LIV recent changes Template.c and InitCBC.c

parent c6d00e79
......@@ -2319,6 +2319,13 @@ void LALInferenceQ2Eta(double q, double *eta)
*eta = q/((1+q)*(1+q));
return;
}
/* Calculate dQuadMonS and dQuadMonA from dQaudMon1 and dQuadMon2 */
void LALInferencedQuadMonSdQuadMonA(REAL8 dQuadMonS, REAL8 dQuadMonA, REAL8 *dQuadMon1, REAL8 *dQuadMon2){
*dQuadMon1=(dQuadMonS+dQuadMonA);
*dQuadMon2=(dQuadMonS-dQuadMonA);
return;
}
void LALInferenceLambdaTsEta2Lambdas(REAL8 lambdaT, REAL8 dLambdaT, REAL8 eta, REAL8 *lambda1, REAL8 *lambda2){
REAL8 a=(8./13.)*(1.+7.*eta-31.*eta*eta);
......
......@@ -882,7 +882,8 @@ void LALInferenceMcQ2Masses(double mc, double q, double *m1, double *m2);
/** Convert from q to eta (q = m2/m1, with m1 > m2). */
void LALInferenceQ2Eta(double q, double *eta);
/** Convert from dQuadMonS, dQuadMonA to dQuadMon1, dQuadMon2. */
void LALInferencedQuadMonSdQuadMonA(REAL8 dQuadMonS, REAL8 dQuadMonA, REAL8 *dQuadMon1, REAL8 *dQuadMon2);
/** Convert from lambdaT, dLambdaT, and eta to lambda1 and lambda2. */
void LALInferenceLambdaTsEta2Lambdas(REAL8 lambdaT, REAL8 dLambdaT, REAL8 eta, REAL8 *lambda1, REAL8 *lambda2);
......
......@@ -2318,6 +2318,14 @@ static void LALInferenceInitNonGRParams(LALInferenceRunState *state, LALInferenc
REAL8 dbeta_min=-1.;
REAL8 dsigma_max=1.;
REAL8 dsigma_min=-1.;
REAL8 dQuadMon1_min=0.0;
REAL8 dQuadMon1_max=20.0;
REAL8 dQuadMon2_min=0.0;
REAL8 dQuadMon2_max=20.0;
REAL8 dQuadMonS_min=0.0;
REAL8 dQuadMonS_max=20.0;
REAL8 dQuadMonA_min=0.0;
REAL8 dQuadMonA_max=20.0;
REAL8 tmpVal=0.0;
if ((pptb=LALInferenceGetProcParamVal(commandLine,"--LIV_A_sign"))) {
REAL8 LIV_A_sign;
......@@ -2400,6 +2408,12 @@ static void LALInferenceInitNonGRParams(LALInferenceRunState *state, LALInferenc
LALInferenceRegisterUniformVariableREAL8(state, model->params, "log10lambda_eff", 3.0, log10lambda_eff_min, log10lambda_eff_max, LALINFERENCE_PARAM_LINEAR);
}
}
/* Adding terms for spin-induced quadrupole moments */
if (checkParamInList(ppt->value,"dQuadMon1")) LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMon1", tmpVal, dQuadMon1_min, dQuadMon1_max, LALINFERENCE_PARAM_LINEAR);
if (checkParamInList(ppt->value,"dQuadMon2")) LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMon2", tmpVal, dQuadMon2_min, dQuadMon2_max, LALINFERENCE_PARAM_LINEAR);
if (checkParamInList(ppt->value,"dQuadMonS")) LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMonS", tmpVal, dQuadMonS_min, dQuadMonS_max, LALINFERENCE_PARAM_LINEAR);
if (checkParamInList(ppt->value,"dQuadMonA")) LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMonA", tmpVal, dQuadMonA_min, dQuadMonA_max, LALINFERENCE_PARAM_LINEAR);
}
ppt=LALInferenceGetProcParamVal(commandLine,"--ppe-parameters");
if (ppt)
......
......@@ -72,9 +72,11 @@ static void q2masses(double mc, double q, double *m1, double *m2);
/* list of testing GR parameters to be passed to the waveform */
/* the first batch of parameters dchis through dsigmas refer to the parameterised tests for generation (TIGER) while the parameters log10lambda_eff through LIV_A_sign are testing coefficients for the parameterised tests for propagation using a deformed dispersion relation (LIV); new parameters may be added at the end for readability although the order of parameters in this list does not matter */
const char list_extra_parameters[38][16] = {"dchi0","dchi1","dchi2","dchi3","dchi4","dchi5","dchi5l","dchi6","dchi6l","dchi7","aPPE","alphaPPE","bPPE","betaPPE","betaStep","fStep","dxi1","dxi2","dxi3","dxi4","dxi5","dxi6","dalpha1","dalpha2","dalpha3","dalpha4","dalpha5","dbeta1","dbeta2","dbeta3","dsigma1","dsigma2","dsigma3","dsigma4","log10lambda_eff","lambda_eff","nonGR_alpha","LIV_A_sign"};
const UINT4 N_extra_params = 38;
const char list_extra_parameters[42][16] = {"dchi0","dchi1","dchi2","dchi3","dchi4","dchi5","dchi5l","dchi6","dchi6l","dchi7","aPPE","alphaPPE","bPPE","betaPPE","betaStep","fStep","dxi1","dxi2","dxi3","dxi4","dxi5","dxi6","dalpha1","dalpha2","dalpha3","dalpha4","dalpha5","dbeta1","dbeta2","dbeta3","dsigma1","dsigma2","dsigma3","dsigma4","log10lambda_eff","lambda_eff","nonGR_alpha","LIV_A_sign","dQuadMon1","dQuadMon2","dQuadMonS","dQuadMonA"};
const UINT4 N_extra_params = 42;
/* Return the quadrupole moment of a neutron star given its lambda
* We use the relations defined here. https://arxiv.org/pdf/1302.4499.pdf.
......@@ -355,6 +357,26 @@ void LALInferenceROQWrapperForXLALSimInspiralChooseFDWaveformSequence(LALInferen
}
}
/* ==== Spin-induced quadrupole moment parameters ==== */
if(LALInferenceCheckVariable(model->params, "dQuadMon1"))
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars, *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMon1"));
if(LALInferenceCheckVariable(model->params, "dQuadMon2"))
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars, *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMon2"));
REAL8 dQuadMonS = 0.;
REAL8 dQuadMonA = 0.;
if(LALInferenceCheckVariable(model->params, "dQuadMonS")){
REAL8 dQuadMon1=0.;
REAL8 dQuadMon2=0.;
dQuadMonS = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonS");
LALInferencedQuadMonSdQuadMonA(dQuadMonS,dQuadMonA,&dQuadMon1,&dQuadMon2);
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
}
/* ==== TIDAL PARAMETERS ==== */
if(LALInferenceCheckVariable(model->params, "lambda1"))
XLALSimInspiralWaveformParamsInsertTidalLambda1(model->LALpars, *(REAL8*) LALInferenceGetVariable(model->params, "lambda1"));
......@@ -837,6 +859,25 @@ void LALInferenceTemplateXLALSimInspiralChooseWaveform(LALInferenceModel *model)
}
/* ==== Spin-induced quadrupole moment parameters ==== */
if(LALInferenceCheckVariable(model->params, "dQuadMon1"))
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars, *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMon1"));
if(LALInferenceCheckVariable(model->params, "dQuadMon2"))
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars, *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMon2"));
REAL8 dQuadMonS = 0.;
REAL8 dQuadMonA = 0.;
if(LALInferenceCheckVariable(model->params, "dQuadMonS")){
REAL8 dQuadMon1=0.;
REAL8 dQuadMon2=0.;
dQuadMonS = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonS");
LALInferencedQuadMonSdQuadMonA(dQuadMonS,dQuadMonA,&dQuadMon1,&dQuadMon2);
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
}
/* ==== TIDAL PARAMETERS ==== */
if(LALInferenceCheckVariable(model->params, "lambda1"))
XLALSimInspiralWaveformParamsInsertTidalLambda1(model->LALpars, *(REAL8*) LALInferenceGetVariable(model->params, "lambda1"));
......@@ -1423,6 +1464,25 @@ void LALInferenceTemplateXLALSimInspiralChooseWaveformPhaseInterpolated(LALInfer
}
}
/* ==== Spin-induced quadrupole moment parameters ==== */
if(LALInferenceCheckVariable(model->params, "dQuadMon1"))
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars, *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMon1"));
if(LALInferenceCheckVariable(model->params, "dQuadMon2"))
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars, *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMon2"));
REAL8 dQuadMonS = 0.;
REAL8 dQuadMonA = 0.;
if(LALInferenceCheckVariable(model->params, "dQuadMonS")){
REAL8 dQuadMon1=0.;
REAL8 dQuadMon2=0.;
dQuadMonS = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonS");
LALInferencedQuadMonSdQuadMonA(dQuadMonS,dQuadMonA,&dQuadMon1,&dQuadMon2);
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
}
/* ==== TIDAL PARAMETERS ==== */
if(LALInferenceCheckVariable(model->params, "lambda1"))
XLALSimInspiralWaveformParamsInsertTidalLambda1(model->LALpars, *(REAL8*) LALInferenceGetVariable(model->params, "lambda1"));
......
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