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

updating the list of possible samplling parameters. for 1 param any of the 4,...

updating the list of possible samplling parameters.  for 1 param any of the 4, 2 param either dQuadMon1 and dQuadMon2 or dQuadMonS and dQuadMonA for any other combination default sampling on dQuadMon1 and dQuadMon2  and for greater than 2 dQuadMon1 and dQuadMon2 is the default option.
parent d68d1474
......@@ -2318,14 +2318,8 @@ static void LALInferenceInitNonGRParams(LALInferenceRunState *state, LALInferenc
REAL8 dbeta_min=-1.;
REAL8 dsigma_max=1.;
REAL8 dsigma_min=-1.;
REAL8 dQuadMon1_min=-200.0;
REAL8 dQuadMon1_max=200.0;
REAL8 dQuadMon2_min=-200.0;
REAL8 dQuadMon2_max=200.0;
REAL8 dQuadMonS_min=-200.0;
REAL8 dQuadMonS_max=200.0;
REAL8 dQuadMonA_min=-200.0;
REAL8 dQuadMonA_max=200.0;
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;
......@@ -2345,6 +2339,7 @@ static void LALInferenceInitNonGRParams(LALInferenceRunState *state, LALInferenc
}
else LALInferenceAddVariable(model->params,"nonGR_alpha", &nonGR_alpha, LALINFERENCE_REAL8_t, LALINFERENCE_PARAM_FIXED);
}
UINT4 nParams_dQuadMon= 0;
/* Relative shifts for inspiral phase PN coefficients (absolute value for dchi1) */
if (checkParamInList(ppt->value,"dchi0")) LALInferenceRegisterUniformVariableREAL8(state, model->params, "dchi0", tmpVal, dchi_min, dchi_max, LALINFERENCE_PARAM_LINEAR);
if (checkParamInList(ppt->value,"dchi1")) LALInferenceRegisterUniformVariableREAL8(state, model->params, "dchi1", tmpVal, dchi_min, dchi_max, LALINFERENCE_PARAM_LINEAR);
......@@ -2414,7 +2409,48 @@ 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");
if (ppt)
{
......
......@@ -358,25 +358,57 @@ 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.;
/* ==== Spin induced quadrupole moment PARAMETERS ==== */
if(LALInferenceCheckVariable(model->params, "dQuadMonS")&&LALInferenceCheckVariable(model->params, "dQuadMonA")){
REAL8 dQuadMon1=0.;
REAL8 dQuadMon2=0.;
REAL8 dQuadMonS = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonS");
REAL8 dQuadMonA = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonA");
LALInferencedQuadMonSdQuadMonA(dQuadMonS,dQuadMonA,&dQuadMon1,&dQuadMon2);
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
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")){
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.;
dQuadMonS = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonS");
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);
}
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"));
......@@ -859,25 +891,57 @@ 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.;
/* ==== Spin induced quadrupole moment PARAMETERS ==== */
if(LALInferenceCheckVariable(model->params, "dQuadMonS")){
if(LALInferenceCheckVariable(model->params, "dQuadMonS")&&LALInferenceCheckVariable(model->params, "dQuadMonA")){
REAL8 dQuadMon1=0.;
REAL8 dQuadMon2=0.;
dQuadMonS = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonS");
REAL8 dQuadMonS = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonS");
REAL8 dQuadMonA = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonA");
LALInferencedQuadMonSdQuadMonA(dQuadMonS,dQuadMonA,&dQuadMon1,&dQuadMon2);
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
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")){
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);
}
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"));
......@@ -1464,23 +1528,58 @@ 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.;
/* ==== Spin induced quadrupole moment PARAMETERS ==== */
if(LALInferenceCheckVariable(model->params, "dQuadMonS")&&LALInferenceCheckVariable(model->params, "dQuadMonA")){
REAL8 dQuadMon1=0.;
REAL8 dQuadMon2=0.;
REAL8 dQuadMonS = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonS");
REAL8 dQuadMonA = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonA");
LALInferencedQuadMonSdQuadMonA(dQuadMonS,dQuadMonA,&dQuadMon1,&dQuadMon2);
XLALSimInspiralWaveformParamsInsertdQuadMon1(model->LALpars,dQuadMon1);
XLALSimInspiralWaveformParamsInsertdQuadMon2(model->LALpars,dQuadMon2);
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")){
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.;
dQuadMonS = *(REAL8*) LALInferenceGetVariable(model->params, "dQuadMonS");
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);
}
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