20 #include <lal/AVFactories.h>
21 #include <lal/TimeSeries.h>
22 #include <lal/GeneratePulsarSignal.h>
23 #include <lal/ComputeFstat.h>
24 #include <lal/ExtrapolatePulsarSpins.h>
25 #include <lal/SimulatePulsarSignal.h>
30 #define SCALAR(u,v) ((u)[0]*(v)[0] + (u)[1]*(v)[1] + (u)[2]*(v)[2])
168 REAL8 Zeta = xAzi - yAzi;
181 vn[0] = cos( Delta ) * cos( Alpha );
182 vn[1] = cos( Delta ) * sin( Alpha );
183 vn[2] = sin( Delta );
190 if (
params->pulsar.spindown && (
params->pulsar.spindown->length > numSpins ) ) {
193 if (
params->pulsar.spindown && (
params->pulsar.spindown->length >= 3 ) ) {
194 f3dot =
params->pulsar.spindown->data[2];
196 if (
params->pulsar.spindown && (
params->pulsar.spindown->length >= 2 ) ) {
197 f2dot =
params->pulsar.spindown->data[1];
199 if (
params->pulsar.spindown && (
params->pulsar.spindown->length >= 1 ) ) {
209 if (
params->pulsar.refTime.gpsSeconds != 0 ) {
211 REAL8 deltaRef = startTimeSSB - refTime0;
229 + ( 1.0 / 2.0 ) *
f1dot * deltaRef * deltaRef
230 + ( 1.0 / 6.0 ) * f2dot * deltaRef * deltaRef * deltaRef
231 + ( 1.0 / 24.0 ) * f3dot * deltaRef * deltaRef * deltaRef * deltaRef
239 refTime = startTimeSSB;
243 refTime = startTimeSSB;
251 REAL8 A1 = aPlus * cos(
phi0 ) * cos( twopsi ) - aCross * sin(
phi0 ) * sin( twopsi );
252 REAL8 A2 = aPlus * cos(
phi0 ) * sin( twopsi ) + aCross * sin(
phi0 ) * cos( twopsi );
253 REAL8 A3 = -aPlus * sin(
phi0 ) * cos( twopsi ) - aCross * cos(
phi0 ) * sin( twopsi );
254 REAL8 A4 = -aPlus * sin(
phi0 ) * sin( twopsi ) + aCross * cos(
phi0 ) * cos( twopsi );
257 for (
UINT4 i = 0;
i < numSteps;
i++ ) {
261 REAL8 deltati = ti - refTime;
263 REAL8 taui = deltati + dT;
266 + ( 1.0 / 2.0 ) *
f1dot * taui * taui
267 + ( 1.0 / 6.0 ) * f2dot * taui * taui * taui
268 + ( 1.0 / 24.0 ) * f3dot * taui * taui * taui * taui
271 REAL8 cosphi_i = cos( phi_i );
272 REAL8 sinphi_i = sin( phi_i );
277 REAL8 hi = A1 * ai * cosphi_i
280 + A4 * bi * sinphi_i;
LIGOTimeGPSVector * timestamps
#define SCALAR(u, v)
Simple Euklidean scalar product for two 3-dim vectors in cartesian coords.
void XLALDestroyDetectorStateSeries(DetectorStateSeries *detStates)
Get rid of a DetectorStateSeries.
DetectorStateSeries * XLALGetDetectorStates(const LIGOTimeGPSVector *timestamps, const LALDetector *detector, const EphemerisData *edat, REAL8 tOffset)
Get the 'detector state' (ie detector-tensor, position, velocity, etc) for the given vector of timest...
AMCoeffs * XLALComputeAMCoeffs(const DetectorStateSeries *DetectorStates, SkyPosition skypos)
Compute the 'amplitude coefficients' , as defined in for a series of timestamps.
void XLALDestroyAMCoeffs(AMCoeffs *amcoef)
Destroy a AMCoeffs structure.
#define XLAL_INIT_DECL(var,...)
REAL8 PulsarSpins[PULSAR_MAX_SPINS]
Typedef for fixed-size array holding GW frequency and derivatives fk = d^k Freq/dt^k|(tau_ref)
LIGOTimeGPSVector * XLALMakeTimestamps(LIGOTimeGPS tStart, REAL8 Tspan, REAL8 Tsft, REAL8 Toverlap)
Given a start-time, Tspan, Tsft and Toverlap, returns a list of timestamps covering this time-stretch...
CHAR * XLALGetChannelPrefix(const CHAR *name)
Find the valid CW detector prefix.
void XLALDestroyTimestampVector(LIGOTimeGPSVector *vect)
De-allocate a LIGOTimeGPSVector.
REAL4TimeSeries * XLALSimulateExactPulsarSignal(const PulsarSignalParams *params)
Simulate a pulsar signal to best accuracy possible.
REAL4TimeSeries * XLALCreateREAL4TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
#define XLAL_ERROR_NULL(...)
#define XLAL_CHECK_NULL(assertion,...)
LIGOTimeGPS * XLALGPSSetREAL8(LIGOTimeGPS *epoch, REAL8 t)
REAL8 XLALGPSGetREAL8(const LIGOTimeGPS *epoch)
REAL8 XLALGPSDiff(const LIGOTimeGPS *t1, const LIGOTimeGPS *t0)
This structure contains the per-SFT (weighted) antenna-pattern functions , with the SFT-index,...
REAL4Vector * b
(weighted) per-SFT antenna-pattern function
REAL4Vector * a
(weighted) per-SFT antenna-pattern function
REAL8 rDetector[3]
Cartesian coords of detector position in ICRS J2000.
LIGOTimeGPS tGPS
GPS timestamps corresponding to this entry.
Timeseries of DetectorState's, representing the detector-info at different timestamps.
DetectorState * data
array of DetectorState entries
A vector of 'timestamps' of type LIGOTimeGPS.
UINT4 length
number of timestamps
Input parameters to GeneratePulsarSignal(), defining the source and the time-series.