11#include <lal/GenerateInspiral.h>
12#include <lal/LALInference.h>
13#include <lal/FrequencySeries.h>
15#include <lal/StringInput.h>
16#include <lal/TimeSeries.h>
17#include <lal/LALDatatypes.h>
18#include <lal/Sequence.h>
19#include <lal/LALInferenceMultibanding.h>
32 outPar=-5.0*pow((8.0*
LAL_PI*inPar),-8./3.)*pow(
mc, -5./3.);
36 outPar=pow(-inPar/5.,-3./8.)*pow(
mc,-5./8.)/(8.*
LAL_PI);
44 if (0) printf(
"f_max %f",
f_max);
46 XLALPrintError(
"ERROR: ask for Multi Banding procedure with 0 bands!\n");
57 int n_max = floor(- log2(deltaF0*2.1));
58 float t_nmax= 1./(pow(2.,n_max)*deltaF0) - 2.1;
62 if (n_min < 0 ) n_min = 0;
64 max_NBands = n_max+1 - n_min;
67 if (NBands > max_NBands){
68 XLALPrintError(
" WORNING required number of bands bigger than the maximum allowed, new number of bands %i \n",max_NBands);
69 printf(
"WORNING required number of bands bigger than the maximum allowed, new number of bands %i \n",max_NBands);
79 if (F_sup== NULL || F_inf==NULL ||
deltaF ==NULL) {
81 printf(
" ERROR new/sup/deltaF (MB file)== NULL.\n");
89 if (NBands == 1) n_max = n_min;
90 deltaF->data[NBands - 1] = (pow(2.,n_max)*deltaF0);
91 F_inf->
data[NBands - 1] = f_nmax;
96 for (
int i=NBands - 1;
i>=0;
i--) {
101 deltaF->data[
i] = (pow(2.,n_i)*deltaF0);
102 if (
i< NBands - 1) F_sup->
data[
i] = F_inf->
data[
i+1];
103 double t_ni= 1./(pow(2.,n_i)*deltaF0) - 2.1;
108 deltaF->data[
i] = (pow(2.,n_i)*deltaF0);
122 printf(
"PHASE INTERPOLATION ACTIVATED: %i bands used to define the %u frequencies at which compute the waveforms \n",NBands,NFreq);
125 for (
int i=NBands - 1;
i>=0;
i--) {
static double LALInferenceTimeFrequencyRelation(double mc, double inPar, UINT4 flag_f)
F(t) and T(f) for newtonian waveform.
REAL8Sequence * LALInferenceMultibandFrequencies(int NBands, double f_min, double f_max, double deltaF0, double mc)
Create a list of frequencies to use in multiband template generation, between f_min and f_max mc is m...
REAL8Sequence * XLALCreateREAL8Sequence(size_t length)
REAL8Vector * XLALCreateREAL8Vector(UINT4 length)
void XLALDestroyREAL8Vector(REAL8Vector *vector)
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1