21 #include <lal/LALStdio.h>
22 #include <lal/LALStdlib.h>
23 #include <lal/LALConstants.h>
24 #include <lal/Units.h>
25 #include <lal/AVFactories.h>
26 #include <lal/SeqFactories.h>
27 #include <lal/PulsarSimulateCoherentGW.h>
28 #include <lal/GenerateSpinOrbitCW.h>
181 GENERATESPINORBITCWH_MSGENUL );
183 GENERATESPINORBITCWH_MSGENUL );
187 GENERATESPINORBITCWH_MSGEOUT );
189 GENERATESPINORBITCWH_MSGEOUT );
191 GENERATESPINORBITCWH_MSGEOUT );
193 GENERATESPINORBITCWH_MSGEOUT );
198 GENERATESPINORBITCWH_MSGENUL );
199 nSpin =
params->f->length;
206 vDot6 = 6.0 *
params->angularSpeed;
210 if (
params->oneMinusEcc != 0.0 ) {
212 GENERATESPINORBITCWH_MSGEECC );
216 GENERATESPINORBITCWH_MSGEFTL );
218 if ( vp <= 0.0 ||
dt <= 0.0 ||
f0 <= 0.0 || vDot6 <= 0.0 ||
221 GENERATESPINORBITCWH_MSGESGN );
224 if (
f0 *
n *
dt * vp * vp > 0.5 )
226 " effects that are not included" );
233 tpOff += 1.0e-9 * (
REAL8 )(
params->orbitEpoch.gpsNanoSeconds -
244 oneBy12vDot = 0.5 / vDot6;
245 fourCosOmega = 4.0 * cos( argument );
246 twoSinOmega = 2.0 * sin( argument );
247 vpCosOmega = 0.25 * vp * fourCosOmega;
248 vpSinOmega = 0.5 * vp * twoSinOmega;
249 vpSinOmega2 = vpSinOmega * vpSinOmega;
250 pBy3 = sqrt( 4.0 * ( 1.0 + vpCosOmega ) - vpSinOmega2 );
251 p32 = 1.0 / ( pBy3 * pBy3 * pBy3 );
252 c0 = p32 * ( vpSinOmega * ( 6.0 * vpCosOmega - 12.0 + vpSinOmega2 ) -
254 dc = p32 * vDot6 *
dt;
255 e0 = 3.0 * vpSinOmega;
261 if (
x < fabs(
c0 ) ) {
264 x = 6.0 + log(
x + sqrt(
x *
x + 1.0 ) );
267 " precision for this orbit" );
274 GENERATESPINORBITCWH_MSGEMEM );
282 GENERATESPINORBITCWH_MSGEMEM );
292 GENERATESPINORBITCWH_MSGEMEM );
358 fData =
output->f->data->data;
359 phiData =
output->phi->data->data;
360 for (
i = 0;
i <
n;
i++ ) {
365 e = e0 + de * sinh( log(
c + sqrt(
c *
c + 1.0 ) ) / 3.0 );
367 e = e0 + de * sinh( -log( -
c + sqrt(
c *
c + 1.0 ) ) / 3.0 );
370 phi =
t = tPow = oneBy12vDot *
e * ( 12.0 + e2 );
374 for (
j = 0;
j < nSpin;
j++ ) {
375 f += fSpin[
j] * tPow;
376 phi += fSpin[
j] * ( tPow *=
t ) / (
j + 2.0 );
380 f *=
f0 / ( 1.0 + vp * ( fourCosOmega -
e * twoSinOmega )
383 if ( fabs(
f - fPrev ) >
df ) {
384 df = fabs(
f - fPrev );
386 *( fData++ ) = fPrev =
f;
387 *( phiData++ ) = phi +
phi0;
#define ABORT(statusptr, code, mesg)
#define ENDFAIL(statusptr)
#define TRY(func, statusptr)
#define ATTATCHSTATUSPTR(statusptr)
#define ASSERT(assertion, statusptr, code, mesg)
#define DETATCHSTATUSPTR(statusptr)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
#define BEGINFAIL(statusptr)
void LALSCreateVectorSequence(LALStatus *status, REAL4VectorSequence **vectorSequence, CreateVectorSequenceIn *vSeqParams)
#define GENERATESPINORBITCWH_EECC
Eccentricity out of range.
#define GENERATESPINORBITCWH_ESGN
Sign error: positive parameter expected.
#define GENERATESPINORBITCWH_EMEM
Out of memory.
#define GENERATESPINORBITCWH_ENUL
Unexpected null pointer in arguments.
#define GENERATESPINORBITCWH_EOUT
Output field a, f, phi, or shift already exists.
void LALGenerateParabolicSpinOrbitCW(LALStatus *stat, PulsarCoherentGW *output, SpinOrbitCWParamStruc *params)
Computes a continuous waveform with frequency drift and Doppler modulation from a parabolic orbital t...
#define GENERATESPINORBITCWH_EFTL
Periapsis motion is faster than light.
int LALWarning(LALStatus *status, const char *warning)
const LALUnit lalStrainUnit
const LALUnit lalHertzUnit
const LALUnit lalDimensionlessUnit
void LALDCreateVector(LALStatus *, REAL8Vector **, UINT4)
void LALDDestroyVector(LALStatus *, REAL8Vector **)
void LALSDestroyVector(LALStatus *, REAL4Vector **)
void LALSCreateVector(LALStatus *, REAL4Vector **, UINT4)
This structure stores a representation of a plane gravitational wave propagating from a particular po...
This structure stores the parameters for constructing a gravitational waveform with both a Taylor-pol...