Commit 6bd6a5b2 authored by Evan Goetz's avatar Evan Goetz
Browse files

Add error if dfmax is smaller than templateTestDf

  Fixes #1515
Original: d9060f647de1958faf787e9ab1332d321f69f4e7
parent e75cdbc4
......@@ -2577,6 +2577,10 @@ INT4 readTwoSpectInputParams(inputParamsStruct *params, struct gengetopt_args_in
params->dfmin = 0.5*round(2.0*params->dfmin*params->Tcoh)/params->Tcoh;
params->dfmax = 0.5*round(2.0*params->dfmax*params->Tcoh)/params->Tcoh;
//Error if dfmax is smaller than templateTestDf or if dfmax is smaller than the templateSearch largest modulation depth
XLAL_CHECK( params->dfmax >= args_info.templateTestDf_arg, XLAL_EINVAL, "templateTestDf is larger than dfmax\n" );
XLAL_CHECK( params->dfmax >= LAL_TWOPI*(params->fmin+params->fspan)*(args_info.templateSearchAsini_arg+3.0*args_info.templateSearchAsiniSigma_arg)/args_info.templateSearchP_arg, XLAL_EINVAL, "templateSearch parameters would make the largest modulation depth larger than dfmax\n");
//Upper limit settings take span of search values unless specified
if (args_info.ULfmin_given) params->ULfmin = args_info.ULfmin_arg; //Upper limit minimum frequency (Hz)
else params->ULfmin = params->fmin;
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