22 #define __USE_ISOC99 1
25 #include <lal/SinCosLUT.h>
26 #include <lal/DetectorStates.h>
27 #include <lal/LISAspecifics.h>
28 #include <lal/UserInputParse.h>
35 #define SQUARE(x) ((x) * (x))
88 REAL4 sinG, cosG, sinGcosG, sinGsinG, cosGcosG;
92 sinGsinG = sinG * sinG;
93 sinGcosG = sinG * cosG;
94 cosGcosG = cosG * cosG;
102 - 2 *
detector->response[0][1] * sinGcosG
103 +
detector->response[1][1] * sinGsinG;
105 + 2 *
detector->response[0][1] * sinGcosG
106 +
detector->response[1][1] * cosGcosG;
109 +
detector->response[0][1] * ( cosGcosG - sinGsinG );
146 vxv->
d11 = v[0] * v[0];
147 vxv->
d12 = v[0] * v[1];
148 vxv->
d13 = v[0] * v[2];
150 vxv->
d22 = v[1] * v[1];
151 vxv->
d23 = v[1] * v[2];
153 vxv->
d33 = v[2] * v[2];
169 vxw->
d11 = 2.0f * v[0] *
w[0];
170 vxw->
d12 = v[0] *
w[1] +
w[0] * v[1];
171 vxw->
d13 = v[0] *
w[2] +
w[0] * v[2];
173 vxw->
d22 = 2.0f * v[1] *
w[1];
174 vxw->
d23 = v[1] *
w[2] +
w[1] * v[2];
176 vxw->
d33 = 2.0f * v[2] *
w[2];
189 if ( !sum || !aT || !bT ) {
213 if ( !diff || !aT || !bT ) {
237 if ( !mult || !aT ) {
241 mult->
d11 = factor * aT->
d11;
242 mult->
d12 = factor * aT->
d12;
243 mult->
d13 = factor * aT->
d13;
245 mult->
d22 = factor * aT->
d22;
246 mult->
d23 = factor * aT->
d23;
248 mult->
d33 = factor * aT->
d33;
269 + 2.0f * ( T1->
d12 * T2->
d12
285 if ( detStates->
data ) {
310 if ( mdetStates->
data ) {
311 for ( X = 0; X <
numDet ; X ++ ) {
397 for (
i = 0;
i < numSteps;
i++ ) {
416 baryinput.
tgps = tgps;
417 baryinput.
site = ( *detector );
432 for (
j = 0;
j < 3;
j++ ) {
489 if ( ( ret =
LALCalloc( 1,
sizeof( *ret ) ) ) == NULL ) {
508 if ( !tsX || !detX ) {
509 XLALPrintError(
"%s: invalid NULL data-vector tsX[%d] = %p, detX[%d] = %p\n",
__func__, X, tsX, X, detX );
594 UINT4 X0 = X % numSqrtSX;
595 const char *sqrtSnStr =
sqrtSX->data[X0];
599 multiNoiseFloor->
sqrtSn[X] = sqrtSn;
638 multiNoiseFloor->
length = multiNoiseFloorDetNames->
length;
641 for (
UINT4 X = 0; X < multiNoiseFloor->
length; X ++ ) {
645 XLAL_PRINT_ERROR(
"Noise-floor detector '%s' not found in list of sqrtSX detectors '%s'", multiNoiseFloorDetNames->
data[X], sqrtSXDet );
649 multiNoiseFloor->
sqrtSn[X] = sqrtSn[Y];
679 detInfo->
sites[X] = ( *ifo );
704 multiIFO->
length = numIFOs;
705 for (
UINT4 X = 0; X < numIFOs; X ++ ) {
708 multiIFO->
sites[X] = ( *site );
731 multiIFO->
length = numIFOs;
732 for (
UINT4 X = 0; X < numIFOs; X ++ ) {
735 multiIFO->
sites[X] = ( *site );
#define __func__
log an I/O error, i.e.
int XLALprecomputeLISAarms(DetectorState *detState)
Precompute the arm-geometry for LISA, which is later used for assembling the RAA detector-tensor (whi...
BOOLEAN XLALisLISAdetector(const LALDetector *det)
Return true if 'det' is a LISA LALDetector struct.
int XLALgetLISADetectorTensorLWL(SymmTensor3 *detT, const Detector3Arms detArms, CHAR channelNum)
LIGOTimeGPSVector * timestamps
int XLALParseMultiNoiseFloorMapped(MultiNoiseFloor *multiNoiseFloor, const LALStringVector *multiNoiseFloorDetNames, const LALStringVector *sqrtSX, const LALStringVector *sqrtSXDetNames)
Parse string-vectors (typically input by user) of N detector noise-floors for detectors ,...
int XLALTensorSquareVector3(SymmTensor3 *vxv, REAL4 v[3])
Compute the "squared-tensor" v x v for given vector v, the result is returned in a "detectorTensor" s...
int XLALAddSymmTensor3s(SymmTensor3 *sum, const SymmTensor3 *aT, const SymmTensor3 *bT)
Convenience function for adding two SymmTensor3s: aT + bT NOTE: it is safe to have sum point to the s...
DetectorStateSeries * XLALCreateDetectorStateSeries(UINT4 length)
Create a DetectorStateSeries with length entries.
int XLALParseMultiLALDetector(MultiLALDetector *detInfo, const LALStringVector *detNames)
Parse string-vectors (typically input by user) of N detector-names for detectors ,...
void XLALDestroyMultiDetectorStateSeries(MultiDetectorStateSeries *mdetStates)
Helper function to get rid of a multi-IFO DetectorStateSeries Note, this is "NULL-robust" in the sens...
int XLALMultiLALDetectorFromMultiSFTs(MultiLALDetector *multiIFO, const MultiSFTVector *multiSFTs)
Extract multi detector-info from a given multi SFTCatalog view.
int XLALFillDetectorTensor(DetectorState *detState, const LALDetector *detector)
Function to compute the LWL detector-tensor for the given detector in SSB-fixed cartesian coordinates...
MultiDetectorStateSeries * XLALGetMultiDetectorStates(const MultiLIGOTimeGPSVector *multiTS, const MultiLALDetector *multiIFO, const EphemerisData *edat, REAL8 tOffset)
Get the detector-time series for the given MultiLIGOTimeGPSVector.
void XLALDestroyDetectorStateSeries(DetectorStateSeries *detStates)
Get rid of a DetectorStateSeries.
int XLALSymmetricTensorProduct3(SymmTensor3 *vxw, REAL4 v[3], REAL4 w[3])
Compute the symmetrized tensor product T = v x w + w x v.
REAL4 XLALContractSymmTensor3s(const SymmTensor3 *T1, const SymmTensor3 *T2)
Contract two symmetric tensors over both indices T1 : T2.
MultiDetectorStateSeries * XLALGetMultiDetectorStatesFromMultiSFTs(const MultiSFTVector *multiSFTs, const EphemerisData *edat, REAL8 tOffset)
Get the 'detector state' (ie detector-tensor, position, velocity, etc) for the given multi-vector of ...
int XLALSubtractSymmTensor3s(SymmTensor3 *diff, const SymmTensor3 *aT, const SymmTensor3 *bT)
Convenience function for subtracting two SymmTensor3s: aT - bT NOTE: it is safe to have diff point to...
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...
int XLALMultiLALDetectorFromMultiSFTCatalogView(MultiLALDetector *multiIFO, const MultiSFTCatalogView *multiView)
Extract multi detector-info from a given multi SFTCatalog view.
int XLALScaleSymmTensor3(SymmTensor3 *mult, const SymmTensor3 *aT, REAL4 factor)
Convenience function for multiplying a SymmTensor3 by a scalar factor.
int XLALParseMultiNoiseFloor(MultiNoiseFloor *multiNoiseFloor, const LALStringVector *sqrtSX, UINT4 numDetectors)
Parse string-vectors (typically input by user) of N detector noise-floors for detectors ,...
int XLALBarycenterEarth(EarthState *earth, const LIGOTimeGPS *tGPS, const EphemerisData *edat)
Computes the position and orientation of the Earth, at some arrival time , specified LIGOTimeGPS inp...
int XLALBarycenter(EmissionTime *emit, const BarycenterInput *baryinput, const EarthState *earth)
Transforms from detector arrival time in GPS (as specified in the LIGOTimeGPS structure) to pulse em...
#define PULSAR_MAX_DETECTORS
maximal number of detectors we can handle (for static arrays of detector quantities)
const LALDetector * XLALGetSiteInfo(const CHAR *name)
Find the site geometry-information 'LALDetector' for given a detector name (or prefix).
MultiLIGOTimeGPSVector * XLALExtractMultiTimestampsFromSFTs(const MultiSFTVector *multiSFTs)
Given a multi-SFT vector, return a MultiLIGOTimeGPSVector holding the SFT timestamps.
void XLALDestroyMultiTimestamps(MultiLIGOTimeGPSVector *multiTS)
Destroy a MultiLIGOTimeGPSVector timestamps vector.
int XLALSinCosLUT(REAL4 *sinx, REAL4 *cosx, REAL8 x)
Calculate sin(x) and cos(x) to roughly 1e-7 precision using a lookup-table and Taylor-expansion.
COORDINATESYSTEM_ECLIPTIC
COORDINATESYSTEM_EQUATORIAL
INT4 XLALFindStringInVector(const char *needle, const LALStringVector *haystack)
char * XLALConcatStringVector(const LALStringVector *strings, const char *sep)
#define XLAL_ERROR_NULL(...)
#define XLAL_CHECK(assertion,...)
static _LAL_INLINE_ REAL4 XLALREAL4FailNaN(void)
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
#define XLAL_CHECK_NULL(assertion,...)
#define XLAL_PRINT_ERROR(...)
LIGOTimeGPS * XLALGPSAdd(LIGOTimeGPS *epoch, REAL8 dt)
State-info about position, velocity and LMST of a detector together with corresponding EarthState.
EarthState earthState
EarthState information.
Detector3Arms detArms
include up to three arms to allow describing LISA
REAL8 rDetector[3]
Cartesian coords of detector position in ICRS J2000.
LIGOTimeGPS tGPS
GPS timestamps corresponding to this entry.
SymmTensor3 detT
Detector-tensor components in SSB-fixed, Cartesian coordinates.
REAL8 LMST
local mean sidereal time at the detector-location in radians
Timeseries of DetectorState's, representing the detector-info at different timestamps.
REAL8 deltaT
timespan centered on each timestamp (e.g.
CoordinateSystem system
The coordinate system used for detector's position/velocity and detector-tensor.
DetectorState * data
array of DetectorState entries
UINT4 length
total number of entries
LALDetector detector
detector-info corresponding to this timeseries
Basic output structure of LALBarycenterEarth.c.
REAL8 gmstRad
Greenwich Mean Sidereal Time (GMST) in radians, at tgps.
Basic output structure produced by LALBarycenter.c.
REAL8 rDetector[3]
Cartesian coords (0=x,1=y,2=z) of detector position at $t_a$ (GPS), in ICRS J2000 coords.
This structure contains all information about the center-of-mass positions of the Earth and Sun,...
A vector of 'timestamps' of type LIGOTimeGPS.
REAL8 deltaT
'length' of each timestamp (e.g.
LIGOTimeGPS * data
array of timestamps
UINT4 length
number of timestamps
Multi-IFO time-series of DetectorStates.
UINT4 length
number of detectors
DetectorStateSeries ** data
vector of pointers to DetectorStateSeries
array of detectors definitions 'LALDetector'
UINT4 length
number of detectors
LALDetector sites[PULSAR_MAX_DETECTORS]
array of site information
A collection of (multi-IFO) LIGOTimeGPSVector time-stamps vectors.
array of detector-specific 'noise floors' (ie PSD values), assumed constant over the frequency-band o...
REAL8 sqrtSn[PULSAR_MAX_DETECTORS]
per-IFO sqrt(PSD) values , where
UINT4 length
number of detectors
A multi-SFT-catalogue "view": a multi-IFO vector of SFT-catalogs.
SFTCatalog * data
array of SFT-catalog pointers
UINT4 length
number of detectors
A collection of SFT vectors – one for each IFO in a multi-IFO search.
SFTDescriptor * data
array of data-entries describing matched SFTs
SFTtype header
SFT-header info.
A symmetric 3x3 tensor (such as detector-tensors), storing only the upper triangle.