21#include <lal/SSBtimes.h>
22#include <lal/DetResponse.h>
23#include <lal/Velocity.h>
67 INT4 numffts = (
INT4 )floor( Tobs / (
Tsft - SFToverlap ) - 1 );
70 for (
INT4 ii = 0; ii < numffts; ii++ ) {
74 gpstime.gpsNanoSeconds = (
INT4 )floor( (
t0 + ii * (
Tsft - SFToverlap ) + 0.5 *
Tsft - floor(
t0 + ii * (
Tsft - SFToverlap ) + 0.5 *
Tsft ) ) * 1e9 );
82 output->data[ii] = (
REAL4 )( fplus * fplus + fcross * fcross );
98 REAL8 onePlusCosiSqOver2Sq = 1.0, cosiSq = 1.0;
100 onePlusCosiSqOver2Sq = 0.25 * ( 1.0 + ( *cosi ) * ( *cosi ) ) * ( 1.0 + ( *
cosi ) * ( *cosi ) );
101 cosiSq = ( *cosi ) * ( *cosi );
112 output->data[ii] = fplus * fplus * onePlusCosiSqOver2Sq + fcross * fcross * cosiSq;
115 for (
UINT4 jj = 0; jj < 16; jj++ ) {
118 output->data[ii] += fplus * fplus * onePlusCosiSqOver2Sq + fcross * fcross * cosiSq;
120 output->data[ii] *= 0.0625;
145 INT4 numffts = (
INT4 )floor( Tobs / (
Tsft - SFToverlap ) - 1 );
149 for (
INT4 ii = 0; ii < numffts; ii++ ) {
153 gpstime.gpsNanoSeconds = (
INT4 )floor( (
t0 + ii * (
Tsft - SFToverlap ) + 0.5 *
Tsft - floor(
t0 + ii * (
Tsft - SFToverlap ) + 0.5 *
Tsft ) ) * 1e9 );
182 INT4 numffts = (
INT4 )floor( Tobs / (
Tsft - SFToverlap ) - 1 );
185 REAL8 detvel[3], detvel0[3], dv[3];
186 REAL4 deltaVmax = 0.0;
187 for (
INT4 ii = 0; ii < numffts; ii++ ) {
190 gpstime.gpsNanoSeconds = (
INT4 )floor( (
t0 + ii * (
Tsft - SFToverlap ) + 0.5 *
Tsft - floor(
t0 + ii * (
Tsft - SFToverlap ) + 0.5 *
Tsft ) ) * 1e9 );
199 dv[0] = detvel[0] - detvel0[0];
200 dv[1] = detvel[1] - detvel0[1];
201 dv[2] = detvel[2] - detvel0[2];
202 REAL4 deltaV = (
REAL4 )sqrt( dv[0] * dv[0] + dv[1] * dv[1] + dv[2] * dv[2] );
203 if ( deltaV > deltaVmax ) {
229 INT4 numffts = (
INT4 )floor( Tobs / (
Tsft - SFToverlap ) - 1 );
239 REAL4 Vmax = (
REAL4 )sqrt( detvel[0] * detvel[0] + detvel[1] * detvel[1] + detvel[2] * detvel[2] );
241 for (
INT4 ii = 1; ii < numffts; ii++ ) {
243 gpstime.gpsNanoSeconds = (
INT4 )floor( (
t0 + ii * (
Tsft - SFToverlap ) + 0.5 *
Tsft - floor(
t0 + ii * (
Tsft - SFToverlap ) + 0.5 *
Tsft ) ) * 1e9 );
247 REAL4 V = (
REAL4 )sqrt( detvel[0] * detvel[0] + detvel[1] * detvel[1] + detvel[2] * detvel[2] );
267 REAL4 Vmax = (
REAL4 )sqrt( detvel[0] * detvel[0] + detvel[1] * detvel[1] + detvel[2] * detvel[2] );
274 REAL4 V = (
REAL4 )sqrt( detvel[0] * detvel[0] + detvel[1] * detvel[1] + detvel[2] * detvel[2] );
LIGOTimeGPSVector * timestamps
INT4 CompBinShifts(INT4Vector *output, const SSBtimes *ssbTimes, const REAL8 freq, const REAL8 Tsft, const REAL4 dopplerMultiplier)
Compute the number of integer bin shifts per SFT.
INT4 CompAntennaPatternWeights2(REAL4VectorAligned *output, const SkyPosition skypos, const LIGOTimeGPSVector *timestamps, const LALDetector det, const REAL8 *cosi, const REAL8 *psi)
INT4 CompAntennaPatternWeights(REAL4VectorAligned *output, const SkyPosition skypos, const REAL8 t0, const REAL8 Tsft, const REAL8 SFToverlap, const REAL8 Tobs, const BOOLEAN linPolOn, const REAL8 polAngle, const LALDetector det)
Compute the antenna pattern weights.
REAL4 CompDetectorVmax2(const LIGOTimeGPSVector *timestamps, const LALDetector det, EphemerisData *edat)
REAL4 CompDetectorVmax(const REAL8 t0, const REAL8 Tsft, const REAL8 SFToverlap, const REAL8 Tobs, const LALDetector det, EphemerisData *edat)
Compute the largest magnitude of antenna velocity.
REAL4 CompDetectorDeltaVmax(const REAL8 t0, const REAL8 Tsft, const REAL8 SFToverlap, const REAL8 Tobs, const LALDetector det, EphemerisData *edat)
Compute the maximum change in antenna velocity.
INT4 CompAntennaVelocity(REAL4VectorAligned *output, const SkyPosition skypos, const REAL8 t0, const REAL8 Tsft, const REAL8 SFToverlap, const REAL8 Tobs, const LALDetector det, EphemerisData *edat)
Compute the antenna velocity.
void XLALComputeDetAMResponse(double *fplus, double *fcross, const REAL4 D[3][3], const double ra, const double dec, const double psi, const double gmst)
#define XLAL_INIT_DECL(var,...)
void LALDetectorVel(LALStatus *status, REAL8 v[3], LIGOTimeGPS *time0, LALDetector detector, EphemerisData *edat)
This function finds the velocity of a given detector at a given time.
#define XLAL_CHECK(assertion,...)
#define XLAL_CHECK_REAL4(assertion,...)
REAL8 XLALGreenwichMeanSiderealTime(const LIGOTimeGPS *gpstime)
This structure contains all information about the center-of-mass positions of the Earth and Sun,...
A vector of 'timestamps' of type LIGOTimeGPS.
LIGOTimeGPS * data
array of timestamps
UINT4 length
number of timestamps
Simple container for two REAL8-vectors, namely the SSB-timings DeltaT_alpha and Tdot_alpha,...
REAL8Vector * Tdot
dT/dt : time-derivative of SSB-time wrt local time for SFT-alpha