4 #include <gsl/gsl_rng.h>
6 #include <lal/LALStdlib.h>
7 #include <lal/LALConstants.h>
9 #include <lal/TimeSeries.h>
10 #include <lal/Units.h>
11 #include <lal/LALSimBurst.h>
39 size_t row, col, nrow, ncol, pad, length;
52 length = floor((ncol - 1.) *
dt /
deltaT) + 2 * pad;
56 if (!*hplus || !*hcross)
58 memset((*hplus)->data->data, 0, length *
sizeof(*(*hplus)->data->data));
59 memset((*hcross)->data->data, 0, length *
sizeof(*(*hcross)->data->data));
61 for (row = 0; row < nrow; ++row) {
62 for (col = 0; col < ncol; ++col) {
66 double f = fstart + (nrow - row) * df;
67 double Y = image->
data[row * ncol + col];
84 for (j = 0; j < (*hplus)->data->length; ++j) {
85 double h = (*hplus)->data->data[j];
86 hss += h * h * (*hplus)->deltaT;
88 for (j = 0; j < (*hcross)->data->length; ++j) {
89 double h = (*hcross)->data->data[j];
90 hss += h * h * (*hcross)->deltaT;
92 fac =
hrss / sqrt(hss);
93 for (j = 0; j < (*hplus)->data->length; ++j)
94 (*hplus)->data->data[j] *= fac;
95 for (j = 0; j < (*hcross)->data->length; ++j)
96 (*hcross)->data->data[j] *= fac;
int XLALSimBurstImg(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8Array *image, double dt, double df, double fstart, double hrss, double deltaT, gsl_rng *rng)
Generates a burst injection with a time-frequency structure specified in an image array.
int XLALGenerateBandAndTimeLimitedWhiteNoiseBurst(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8 duration, REAL8 frequency, REAL8 bandwidth, REAL8 eccentricity, REAL8 phase, REAL8 int_hdot_squared, REAL8 delta_t, gsl_rng *rng)
Generate a band- and time-limited white-noise burst waveform with Gaussian envelopes in the time and ...
REAL8TimeSeries * XLALCreateREAL8TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
REAL8TimeSeries * XLALAddREAL8TimeSeries(REAL8TimeSeries *arg1, const REAL8TimeSeries *arg2)
void XLALDestroyREAL8TimeSeries(REAL8TimeSeries *series)
const LALUnit lalStrainUnit
#define XLAL_CHECK(assertion,...)
LIGOTimeGPS * XLALGPSAdd(LIGOTimeGPS *epoch, REAL8 dt)
LIGOTimeGPS * XLALGPSSetREAL8(LIGOTimeGPS *epoch, REAL8 t)