Commit 51fe6e29 authored by NV KRISHNENDU's avatar NV KRISHNENDU Committed by NV KRISHNENDU
Browse files

fixing the conflicts

parent bdb0f431
......@@ -810,6 +810,14 @@ LALInferenceModel *LALInferenceInitCBCModel(LALInferenceRunState *state) {
SDgamma2 SDgamma2.\n\
SDgamma3 SDgamma3.\n\
* \n\
* Spin-induced quadrupole moment test parameters:\n\
(requires --dQuadMon12)\n\
dQuadMon1 dQuadMon1.\n\
dQuadMon2 dQuadMon2.\n\
(requires --dQuadMonSA) \n\
dQuadMonS dQuadMonS.\n\
dQuadMonA dQuadMonA.\n\
(dQuadMonS and dQuadMonA are the symmetric and antisymmetric combinations of dQuadMon1 and dQuadMon2).\n\
----------------------------------------------\n\
--- Prior Ranges -----------------------------\n\
----------------------------------------------\n\
......@@ -889,6 +897,8 @@ LALInferenceModel *LALInferenceInitCBCModel(LALInferenceRunState *state) {
REAL8 lambdaTMax=3000.0;
REAL8 dLambdaTMin=-500.0;
REAL8 dLambdaTMax=500.0;
REAL8 dQuadMonMin=-200.0;
REAL8 dQuadMonMax=200.0;
REAL8 logp1Min=33.6;
REAL8 logp1Max=35.4;
REAL8 gamma1Min=2.0;
......@@ -1438,12 +1448,32 @@ LALInferenceModel *LALInferenceInitCBCModel(LALInferenceRunState *state) {
if(errnum!=XLAL_SUCCESS)
XLAL_ERROR_NULL(errnum,"%s: %s",__func__,XLALErrorString(errnum));
if(!model->eos_fam) XLAL_ERROR_NULL(XLAL_EINVAL, "Unable to initialise EOS family");
// Pull in symmetric tidal deformability (lambdaS) and the uniform variable used to marginlise over the BinaryLove fit uncertainty
} else if((ppt=LALInferenceGetProcParamVal(commandLine,"--BinaryLove"))){
else if((ppt=LALInferenceGetProcParamVal(commandLine,"--BinaryLove"))){
LALInferenceRegisterUniformVariableREAL8(state, model->params, "lambdaS", zero, lambdaSMin, lambdaSMax, LALINFERENCE_PARAM_LINEAR);
LALInferenceRegisterUniformVariableREAL8(state, model->params, "BLuni", 0.5, 0.0, 1.0, LALINFERENCE_PARAM_LINEAR);
}
}
if(LALInferenceGetProcParamVal(commandLine,"--dQuadMon12")){
LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMon1", zero, dQuadMonMin, dQuadMonMax, LALINFERENCE_PARAM_LINEAR);
LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMon2", zero, dQuadMonMin, dQuadMonMax, LALINFERENCE_PARAM_LINEAR);
}else if(LALInferenceGetProcParamVal(commandLine,"--dQuadMonSA")){
LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMonS", zero, dQuadMonMin, dQuadMonMax, LALINFERENCE_PARAM_LINEAR);
LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMonA", zero, dQuadMonMin, dQuadMonMax, LALINFERENCE_PARAM_LINEAR);
}
if((!!LALInferenceGetProcParamVal(commandLine,"--dQuadMon12") + !!LALInferenceGetProcParamVal(commandLine,"--dQuadMonSA")) > 1 )
{
fprintf(stdout,"Both options (from 12 and SA) are given . . Exiting . .\n");
XLALPrintError("Error: cannot use more than one of --dQuadMon12 and --dQuadMonSA.\n");
XLAL_ERROR_NULL(XLAL_EINVAL);
}
else
fprintf(stdout,"Only one option (from 12 and SA) is given . . Working fine . .\n");
LALSimInspiralSpinOrder spinO = LAL_SIM_INSPIRAL_SPIN_ORDER_ALL;
ppt=LALInferenceGetProcParamVal(commandLine, "--spinOrder");
if(ppt) {
......@@ -2305,6 +2335,8 @@ static void LALInferenceInitNonGRParams(LALInferenceRunState *state, LALInferenc
fprintf(stderr,"--grtest-parameters and --ppe-parameters are not simultaneously supported. Please choose one. Aborting\n");
exit(-1);
}
ppt=LALInferenceGetProcParamVal(commandLine,"--grtest-parameters");
if (ppt)
{
......@@ -2318,8 +2350,6 @@ static void LALInferenceInitNonGRParams(LALInferenceRunState *state, LALInferenc
REAL8 dbeta_min=-1.;
REAL8 dsigma_max=1.;
REAL8 dsigma_min=-1.;
REAL8 dQuadMon_min=-200.0;
REAL8 dQuadMon_max=200.0;
REAL8 tmpVal=0.0;
if ((pptb=LALInferenceGetProcParamVal(commandLine,"--LIV_A_sign"))) {
REAL8 LIV_A_sign;
......@@ -2409,46 +2439,6 @@ static void LALInferenceInitNonGRParams(LALInferenceRunState *state, LALInferenc
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);
/* Adding terms for spin-induced quadrupole moments */
if (checkParamInList(ppt->value,"dQuadMon1"))
nParams_dQuadMon++ ;
if (checkParamInList(ppt->value,"dQuadMon2"))
nParams_dQuadMon++ ;
if (checkParamInList(ppt->value,"dQuadMonS"))
nParams_dQuadMon++ ;
if (checkParamInList(ppt->value,"dQuadMonA"))
nParams_dQuadMon++ ;
if (nParams_dQuadMon == 1 )
{
if (checkParamInList(ppt->value,"dQuadMon1")) LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMon1", tmpVal, dQuadMon_min, dQuadMon_max, LALINFERENCE_PARAM_LINEAR);
if (checkParamInList(ppt->value,"dQuadMon2")) LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMon2", tmpVal, dQuadMon_min, dQuadMon_max, LALINFERENCE_PARAM_LINEAR);
if (checkParamInList(ppt->value,"dQuadMonS")) LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMonS", tmpVal, dQuadMon_min, dQuadMon_max, LALINFERENCE_PARAM_LINEAR);
if (checkParamInList(ppt->value,"dQuadMonA")) LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMonA", tmpVal, dQuadMon_min, dQuadMon_max, LALINFERENCE_PARAM_LINEAR);
}
if (nParams_dQuadMon == 2 )
{
if (checkParamInList(ppt->value,"dQuadMonS") && checkParamInList(ppt->value,"dQuadMonA"))
{
LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMonS", tmpVal, dQuadMon_min, dQuadMon_max, LALINFERENCE_PARAM_LINEAR);
LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMonA", tmpVal, dQuadMon_min, dQuadMon_max, LALINFERENCE_PARAM_LINEAR);
}
else
{
if (!checkParamInList(ppt->value,"dQuadMon1") && !checkParamInList(ppt->value,"dQuadMon2"))
fprintf(stderr, "\n For dQuadMon parameters, allowed two-parameter sampling options are either {dQuadMon1,dQuadMon2} or {dQuadMonS,dQuadMonA}. . \n Switching to default sampling option {dQuadMon1,dQuadMon2} . .\n");
LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMon1", tmpVal, dQuadMon_min, dQuadMon_max, LALINFERENCE_PARAM_LINEAR);
LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMon2", tmpVal, dQuadMon_min, dQuadMon_max, LALINFERENCE_PARAM_LINEAR);
}
}
if (nParams_dQuadMon > 2)
{
fprintf(stderr, "\n For more than two dQuadMon parameters have been specified. Only two of them are independent. \n Switching to default sampling option {dQuadMon1,dQuadMon2} . .\n");
LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMon1", tmpVal, dQuadMon_min, dQuadMon_max, LALINFERENCE_PARAM_LINEAR);
LALInferenceRegisterUniformVariableREAL8(state, model->params, "dQuadMon2", tmpVal, dQuadMon_min, dQuadMon_max, LALINFERENCE_PARAM_LINEAR);
}
}
ppt=LALInferenceGetProcParamVal(commandLine,"--ppe-parameters");
......
......@@ -96,7 +96,7 @@ const char *const splineCalibrationProposalName = "SplineCalibration";
const char *const distanceLikelihoodProposalName = "DistanceLikelihood";
static const char *intrinsicNames[] = {"chirpmass", "q", "eta", "mass1", "mass2", "a_spin1", "a_spin2",
"tilt_spin1", "tilt_spin2", "phi12", "phi_jl", "frequency", "quality", "duration","polar_angle", "phase", "polar_eccentricity","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","lambda1","lambda2","lambdaT","dlambdaT","logp1", "gamma1", "gamma2", "gamma3", "SDgamma0","SDgamma1","SDgamma2","SDgamma3","log10lambda_eff","lambda_eff","nonGR_alpha","LIV_A_sign",NULL};
"tilt_spin1", "tilt_spin2", "phi12", "phi_jl", "frequency", "quality", "duration","polar_angle", "phase", "polar_eccentricity","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","lambda1","lambda2","lambdaT","dlambdaT","logp1", "gamma1", "gamma2", "gamma3", "SDgamma0","SDgamma1","SDgamma2","SDgamma3","log10lambda_eff","lambda_eff","nonGR_alpha","LIV_A_sign","dQuadMon1","dQuadMon2","dQuadMonA","dQuadMonS",NULL};
static const char *extrinsicNames[] = {"rightascension", "declination", "cosalpha", "azimuth", "polarisation", "distance",
......
......@@ -78,6 +78,7 @@ const char list_extra_parameters[42][16] = {"dchi0","dchi1","dchi2","dchi3","dch
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.
* Note that the convention we use is that:
......@@ -371,44 +372,17 @@ void LALInferenceROQWrapperForXLALSimInspiralChooseFDWaveformSequence(LALInferen
fprintf(stdout,"Both dQuadMonS and dQaudMonA are sampled");
fprintf(stdout,"dQM1: %e, dQM2: %e, dQMS: %e, dQMA: %e \n",dQuadMon1,dQuadMon2,dQuadMonS,dQuadMonA);
}
else {
if(LALInferenceCheckVariable(model->params, "dQuadMon1")){
else if(LALInferenceCheckVariable(model->params, "dQuadMon1")&&LALInferenceCheckVariable(model->params, "dQuadMon2")){
REAL8 dQuadMon1 = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMon1");
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
fprintf(stdout,"dQuadMon1: %e \n",dQuadMon1);
}
if(LALInferenceCheckVariable(model->params, "dQuadMon2")){
REAL8 dQuadMon2 = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMon2");
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
fprintf(stdout,"dQuadMon2: %e \n",dQuadMon2);
}
if(LALInferenceCheckVariable(model->params, "dQuadMonS")){
REAL8 dQuadMon1=0.;
REAL8 dQuadMon2=0.;
REAL8 dQuadMonS = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonS");
REAL8 dQuadMonA = 0.;
LALInferencedQuadMonSdQuadMonA(dQuadMonS,dQuadMonA,&dQuadMon1,&dQuadMon2);
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
fprintf(stdout,"Only dQaudMonS is sampled");
fprintf(stdout,"dQM1: %e, dQM2: %e, dQMS: %e, dQMA: %e \n",dQuadMon1,dQuadMon2,dQuadMonS,dQuadMonA);
fprintf(stdout,"Both dQuadMon1 and dQaudMon2 are sampled");
fprintf(stdout,"dQM1: %e, dQM2: %e \n",dQuadMon1,dQuadMon2);
}
if(LALInferenceCheckVariable(model->params, "dQuadMonA")){
REAL8 dQuadMon1=0.;
REAL8 dQuadMon2=0.;
REAL8 dQuadMonA = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonA");
REAL8 dQuadMonS = 0.;
LALInferencedQuadMonSdQuadMonA(dQuadMonS,dQuadMonA,&dQuadMon1,&dQuadMon2);
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
fprintf(stdout,"Only dQaudMonA is sampled");
fprintf(stdout,"dQM1: %e, dQM2: %e, dQMS: %e, dQMA: %e \n",dQuadMon1,dQuadMon2,dQuadMonS,dQuadMonA);
}
}
/* ==== TIDAL PARAMETERS ==== */
if(LALInferenceCheckVariable(model->params, "lambda1"))
XLALSimInspiralWaveformParamsInsertTidalLambda1(model->LALpars, *(REAL8*) LALInferenceGetVariable(model->params, "lambda1"));
......@@ -891,6 +865,7 @@ void LALInferenceTemplateXLALSimInspiralChooseWaveform(LALInferenceModel *model)
}
/* ==== Spin induced quadrupole moment PARAMETERS ==== */
if(LALInferenceCheckVariable(model->params, "dQuadMonS")&&LALInferenceCheckVariable(model->params, "dQuadMonA")){
......@@ -904,45 +879,21 @@ void LALInferenceTemplateXLALSimInspiralChooseWaveform(LALInferenceModel *model)
fprintf(stdout,"Both dQuadMonS and dQaudMonA are sampled");
fprintf(stdout,"dQM1: %e, dQM2: %e, dQMS: %e, dQMA: %e \n",dQuadMon1,dQuadMon2,dQuadMonS,dQuadMonA);
}
else {
if(LALInferenceCheckVariable(model->params, "dQuadMon1")){
else if(LALInferenceCheckVariable(model->params, "dQuadMon1")&&LALInferenceCheckVariable(model->params, "dQuadMon2")){
REAL8 dQuadMon1 = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMon1");
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
fprintf(stdout,"dQuadMon1: %e \n",dQuadMon1);
}
if(LALInferenceCheckVariable(model->params, "dQuadMon2")){
REAL8 dQuadMon2 = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMon2");
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
fprintf(stdout,"dQuadMon2: %e \n",dQuadMon2);
}
if(LALInferenceCheckVariable(model->params, "dQuadMonS")){
REAL8 dQuadMon1=0.;
REAL8 dQuadMon2=0.;
REAL8 dQuadMonS = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonS");
REAL8 dQuadMonA = 0.;
LALInferencedQuadMonSdQuadMonA(dQuadMonS,dQuadMonA,&dQuadMon1,&dQuadMon2);
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
fprintf(stdout,"Only dQaudMonS is sampled");
fprintf(stdout,"dQM1: %e, dQM2: %e, dQMS: %e, dQMA: %e \n",dQuadMon1,dQuadMon2,dQuadMonS,dQuadMonA);
fprintf(stdout,"Both dQuadMon1 and dQaudMon2 are sampled");
fprintf(stdout,"dQM1: %e, dQM2: %e \n",dQuadMon1,dQuadMon2);
}
if(LALInferenceCheckVariable(model->params, "dQuadMonA")){
REAL8 dQuadMon1=0.;
REAL8 dQuadMon2=0.;
REAL8 dQuadMonA = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonA");
REAL8 dQuadMonS = 0.;
LALInferencedQuadMonSdQuadMonA(dQuadMonS,dQuadMonA,&dQuadMon1,&dQuadMon2);
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
fprintf(stdout,"Only dQaudMonA is sampled");
fprintf(stdout,"dQM1: %e, dQM2: %e, dQMS: %e, dQMA: %e \n",dQuadMon1,dQuadMon2,dQuadMonS,dQuadMonA);
}
}
/* ==== TIDAL PARAMETERS ==== */
/* ==== TIDAL PARAMETERS ==== */
if(LALInferenceCheckVariable(model->params, "lambda1"))
XLALSimInspiralWaveformParamsInsertTidalLambda1(model->LALpars, *(REAL8*) LALInferenceGetVariable(model->params, "lambda1"));
if(LALInferenceCheckVariable(model->params, "lambda2"))
......@@ -1528,9 +1479,12 @@ void LALInferenceTemplateXLALSimInspiralChooseWaveformPhaseInterpolated(LALInfer
}
}
/* ==== Spin induced quadrupole moment PARAMETERS ==== */
/* ==== Spin induced quadrupole moment PARAMETERS ==== */
if(LALInferenceCheckVariable(model->params, "dQuadMonS")&&LALInferenceCheckVariable(model->params, "dQuadMonA")){
REAL8 dQuadMon1=0.;
REAL8 dQuadMon2=0.;
......@@ -1542,44 +1496,17 @@ void LALInferenceTemplateXLALSimInspiralChooseWaveformPhaseInterpolated(LALInfer
fprintf(stdout,"Both dQuadMonS and dQaudMonA are sampled");
fprintf(stdout,"dQM1: %e, dQM2: %e, dQMS: %e, dQMA: %e \n",dQuadMon1,dQuadMon2,dQuadMonS,dQuadMonA);
}
else {
if(LALInferenceCheckVariable(model->params, "dQuadMon1")){
else if(LALInferenceCheckVariable(model->params, "dQuadMon1")&&LALInferenceCheckVariable(model->params, "dQuadMon2")){
REAL8 dQuadMon1 = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMon1");
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
fprintf(stdout,"dQuadMon1: %e \n",dQuadMon1);
}
if(LALInferenceCheckVariable(model->params, "dQuadMon2")){
REAL8 dQuadMon2 = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMon2");
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
fprintf(stdout,"dQuadMon2: %e \n",dQuadMon2);
}
if(LALInferenceCheckVariable(model->params, "dQuadMonS")){
REAL8 dQuadMon1=0.;
REAL8 dQuadMon2=0.;
REAL8 dQuadMonS = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonS");
REAL8 dQuadMonA = 0.;
LALInferencedQuadMonSdQuadMonA(dQuadMonS,dQuadMonA,&dQuadMon1,&dQuadMon2);
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
fprintf(stdout,"Only dQaudMonS is sampled");
fprintf(stdout,"dQM1: %e, dQM2: %e, dQMS: %e, dQMA: %e \n",dQuadMon1,dQuadMon2,dQuadMonS,dQuadMonA);
fprintf(stdout,"Both dQuadMon1 and dQaudMon2 are sampled");
fprintf(stdout,"dQM1: %e, dQM2: %e \n",dQuadMon1,dQuadMon2);
}
if(LALInferenceCheckVariable(model->params, "dQuadMonA")){
REAL8 dQuadMon1=0.;
REAL8 dQuadMon2=0.;
REAL8 dQuadMonA = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonA");
REAL8 dQuadMonS = 0.;
LALInferencedQuadMonSdQuadMonA(dQuadMonS,dQuadMonA,&dQuadMon1,&dQuadMon2);
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
fprintf(stdout,"Only dQaudMonA is sampled");
fprintf(stdout,"dQM1: %e, dQM2: %e, dQMS: %e, dQMA: %e \n",dQuadMon1,dQuadMon2,dQuadMonS,dQuadMonA);
}
}
/* ==== TIDAL PARAMETERS ==== */
......
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