Commit 5107059a authored by Ian Harry's avatar Ian Harry

Add in termination frequency for TaylorF2 only

parent e851abf2
......@@ -825,6 +825,26 @@ void LALInferenceTemplateXLALSimInspiralChooseWaveform(LALInferenceModel *model)
k2_2 = XLALSimNeutronStarLoveNumberK2(m2*LAL_MSUN_SI, eos_fam);
lambda2 = (2./3.)*k2_2 * pow(r2/(m2*LAL_MRSUN_SI), 5.0);
}
/* Calculate maximum frequency */
/* Start with ISCO */
f_max = 1. / (pow(6,1.5) * LAL_PI * (m1*lal_MTSUN_SI + m2*lal_MTSUN_SI));
/* If both lambdas are non-zero compute EOS-dependent f_max */
if((lambda1 > 0) && (lambda2 > 0))
{
REAL8 log_lambda1 = log(lambda1);
REAL8 log_lambda2 = log(lambda2);
REAL8 compactness1 = 0.371 - 0.0391 * log_lambda1 + 0.001056 * log_lambda1 * log_lambda1;
REAL8 compactness2 = 0.371 - 0.0391 * log_lambda2 + 0.001056 * log_lambda2 * log_lambda2;
REAL8 rad1 = m1*lal_MTSUN_SI / cness1;
REAL8 rad2 = m2*lal_MTSUN_SI / cness2;
REAL8 fmax_eos = 1. / LAL_PI * pow((m1*lal_MTSUN_SI + m2*lal_MTSUN_SI) / pow((rad1 + rad2),3.0),0.5)
if (fmax_eos < f_max)
{
f_max = fmax_eos;
}
fprintf(stderr, "%e %e \n", f_max, fmax_eos);
}
/* Add derived quantities for output */
LALInferenceAddVariable(model->params, "radius1", &r1, LALINFERENCE_REAL8_t, LALINFERENCE_PARAM_OUTPUT);
......
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