Creates a LALDetector
structure from a LALFrDetector
structure and the type of detector.
This routine takes the site geometry described in the LALFrDetector
structure, along with a LALDetectorType
parameter, and constructs the Cartesian detector location and response tensor needed to fill the LALDetector
output.
The detector type is needed because different types of detectors have different response tensors. In each case the response tensor is determined by the unit vectors \(\hat{u}_X\) and \(\hat{u}_Y\) which are constant in an Earth-fixed rotating reference frame and point in the "X arm" and "Y arm" directions, respectively; the headings of these directions in a local frame at the detector are stored in the LALFrDetector
structure.
The detector types recognized are (all names are prefaced by LALDETECTORTYPE_
):
IFODIFF
] An interferometer in differential mode. The response tensor is given by \(d^{ab}=\frac{1}{2} (u_X^au_X^b-u_Y^au_Y^b)\). Note that this is the preferred form even in the two arms of the detector are not perpendicular (e.g., at the GEO600 site). IFOXARM
] An interferometer in one-armed mode with the X arm active. The response tensor is given by \(d^{ab}=\frac{1}{2}u_X^au_X^b\). IFOYARM
] An interferometer in one-armed mode with the Y arm active. The response tensor is given by \(d^{ab}=\frac{1}{2}u_Y^au_Y^b\). IFOCOMM
] An interferometer in common mode. The response tensor is given by \(d^{ab}=\frac{1}{2} (u_X^au_X^b+u_Y^au_Y^b)\). CYLBAR
] A cylindrical bar detector. In this case the "X arm" is actually the symmetry axis of the bar, and the "Y arm" is ignored. The response tensor is \(d^{ab}=u_X^au_X^b\). In each of these cases, the basic transformation needed is to express a unit vector \(\hat{u}\) in terms of its components in the Earth-fixed basis \(\{\hat{e}_1,\hat{e}_2,\hat{e}_3\}\). The altitude angle \({\mathcal{A}}\) and azimuth angle \(\zeta\) allow us to express the unit vector \(\hat{u}\) corresponding to a direction in terms of an orthonormal basis consisting of a vector \(\hat{e}_{\scriptstyle\textrm{E}}\) pointing due East within the local horizontal, a vector \(\hat{e}_{\scriptstyle\textrm{N}}\) pointing due North within the local horizontal, and an upward-pointing vector \(\hat{e}_{\scriptstyle\textrm{U}}\) normal to the local horizontal plane. [These form a right-handed basis, providing an answer to the age-old question "What's Up?": "East cross North."] The relationship is
\begin{equation} \hat{u} = ( \hat{e}_{\scriptstyle\textrm{E}}\sin\zeta + \hat{e}_{\scriptstyle\textrm{N}}\cos\zeta ) \cos{\mathcal{A}} + \hat{e}_{\scriptstyle\textrm{U}} \sin{\mathcal{A}} \ . \end{equation}
Since the local horizontal is defined as the tangent plane to the reference ellipsoid at the point with the detector's latitude \(\beta\) and longitude \(\lambda\), the local basis is related to the orthonormal basis \(\{\hat{e}_\rho,\hat{e}_\lambda,\hat{e}_z\}\) of a cylindrical coördinate system (related to the Earth-fixed Cartesian coördinates by \(x^1=\rho\cos\lambda\), \(x^2=\rho\sin\lambda\), \(x^3=z\), so that \(\hat{e}_\rho\) points away from the Earth's axis, \(\hat{e}_\lambda\) points in the direction of increasing longitude, and n \(\hat{e}_z\) points in the direction of increasing \(x^3\)) by
\begin{align} \hat{e}_{\scriptstyle\textrm{E}} &= \hat{e}_\lambda \\ \hat{e}_{\scriptstyle\textrm{N}} &= - \hat{e}_\rho \sin\beta + \hat{e}_z \cos\beta \\ \hat{e}_{\scriptstyle\textrm{U}} &= \hat{e}_\rho \cos\beta + \hat{e}_z \sin\beta \end{align}
It is then straightforward to relate the cylindrical basis vectors to those in the Earth-fixed Cartesian system by
\begin{align} \hat{e}_\rho &= \hat{e}_1\cos\lambda + \hat{e}_2\sin\lambda \\ \hat{e}_\lambda &= -\hat{e}_1\sin\lambda + \hat{e}_2\cos\lambda \\ \hat{e}_z &= \hat{e}_3 \end{align}
To express \(\hat{u}\) in the Cartesian basis, we need \(\hat{u}\cdot\hat{e}_1\), \(\hat{u}\cdot\hat{e}_2\), and \(\hat{u}\cdot\hat{e}_3\). We first observe that
\begin{align} \label{tools_e_eE} \hat{u}\cdot\hat{e}_{\scriptstyle\textrm{E}} &= \cos{\mathcal{A}}\,\sin\zeta \\ \hat{u}\cdot\hat{e}_{\scriptstyle\textrm{N}} &= \cos{\mathcal{A}}\,\cos\zeta \\ \hat{u}\cdot\hat{e}_{\scriptstyle\textrm{U}} &= \sin{\mathcal{A}} \end{align}
then that
\begin{align} \hat{u}\cdot\hat{e}_\rho &= (\hat{u}\cdot\hat{e}_{\scriptstyle\textrm{N}}) (\hat{e}_{\scriptstyle\textrm{N}}\cdot\hat{e}_\rho) + (\hat{u}\cdot\hat{e}_{\scriptstyle\textrm{U}}) (\hat{e}_{\scriptstyle\textrm{U}}\cdot\hat{e}_\rho) = -(\hat{u}\cdot\hat{e}_{\scriptstyle\textrm{N}}) \sin\beta +(\hat{u}\cdot\hat{e}_{\scriptstyle\textrm{U}}) \cos\beta \\ \hat{u}\cdot\hat{e}_\lambda &=& \hat{u}\cdot\hat{e}_{\scriptstyle\textrm{E}}\\ \hat{u}\cdot\hat{e}_z &= (\hat{u}\cdot\hat{e}_{\scriptstyle\textrm{N}}) (\hat{e}_{\scriptstyle\textrm{N}}\cdot\hat{e}_z) + (\hat{u}\cdot\hat{e}_{\scriptstyle\textrm{U}}) (\hat{e}_{\scriptstyle\textrm{U}}\cdot\hat{e}_z) = (\hat{u}\cdot\hat{e}_{\scriptstyle\textrm{N}}) \cos\beta +(\hat{u}\cdot\hat{e}_{\scriptstyle\textrm{U}}) \sin\beta \end{align}
and finally that
\begin{align} \label{tools_e_e3ez} \hat{u}\cdot\hat{e}_1 &= (\hat{u}\cdot\hat{e}_\rho) (\hat{e}_\rho\cdot\hat{e}_1) + (\hat{u}\cdot\hat{e}_\lambda) (\hat{e}_\lambda\cdot\hat{e}_1) = (\hat{u}\cdot\hat{e}_\rho) \cos\lambda -(\hat{u}\cdot\hat{e}_\lambda) \sin\lambda \\ \hat{u}\cdot\hat{e}_2 &= (\hat{u}\cdot\hat{e}_\rho) (\hat{e}_\rho\cdot\hat{e}_2) + (\hat{u}\cdot\hat{e}_\lambda) (\hat{e}_\lambda\cdot\hat{e}_2) = (\hat{u}\cdot\hat{e}_\rho) \sin\lambda +(\hat{u}\cdot\hat{e}_\lambda) \cos\lambda \\ \hat{u}\cdot\hat{e}_3 &= \hat{u}\cdot\hat{e}_z \end{align}
To avoid repeatedly calculating the Cartesian coördinates and response tensor of known detectors, the constant array lalCachedDetectors[]
contains the site geometry and response tensors of the most commonly used detectors. These are defined in this file and listed in this table.
XLALCreateDetector()
first checks the lalCachedDetectors[]
array to see if the specified type and the name in the input LALFrDetector
match any of the predefined constant detectors. If so, it returns a copy of the constant detector (not just a pointer to the constant).
If not, it calculates the Cartesian coördinates \(\{x^1,x^2,x^3\}\) of the detector location defined by Eq. \eqref{tools_e_cart1}– Eq. \eqref{tools_e_cart3}; in particular, it calculates the denominator \(\sqrt{a^2\cos^2\beta+b^2\sin^2\beta}\) and the distance from the axis
\begin{equation} \rho = \left(\frac{a^2}{\sqrt{a^2\cos^2\beta+b^2\sin^2\beta}} + h \right) \cos\beta \end{equation}
as intermediate steps.
It then calculates the Cartesian components of the unit vectors \(\hat{u}_X\) and \(\hat{u}_Y\) in the arm directions from the altitude and azimuth angles by use of a static
function which implements Eq. \eqref{tools_e_eE}– Eq. \eqref{tools_e_e3ez}. (Depending on the detector type specified, only the unit vector(s) which are actually needed are calculated.) Using this components it constructs \(d^{ab}\) according to the formula appropriate to the detector type.
The calculation of \(x^a\) is done to double precision, that of \(d^{ab}\) to single precision.
LALFrDetector
structure are based on version 6 of the frame specification [18] . LALDetector
are filled in by hand (e.g., for testing purposes), the type
field should be set to LALDETECTORTYPE_ABSENT. LALDetectorType
could be expanded to include the monopole and five quadrupole modes for a spherical resonant detector [20] , [32] , [7] , [19] . Table tools_tab_cached: Selected redefined gravitational wave detectors, contained in the lalCachedDetectors array. Not shown in the table are the LHO 2km detector (H2) and the bar detectors ALLEGRO, AURIGA, EXPLORER, NIOBE and NAUTILUS. The LIGO site data come directly from [3] , including the Cartesian position vectors \(x^a\) and the response tensor \(d^{ab}\), which was dermined from the quoted components of the detector frame basis vectors \(\hat{x}_G\equiv\hat{u}_X\) and \(\hat{y}_G\equiv\hat{u}_Y\). The data on the other detectors comes from [5] .
index | LAL_LHO_4K_DETECTOR | LAL_LLO_4K_DETECTOR |
---|---|---|
prefix | H1 | L1 |
\(x^a\) | \[ \left( \begin{array}{c} -2.1614149 \times 10^6 \\ -3.8346952 \times 10^6 \\ 4.6003502 \times 10^6 \\ \end{array} \right) \] | \[ \left( \begin{array}{c} -74276.044\\ -5.496283721\times 10^6\\ 3.224257018\times 10^6\\ \end{array} \right) \] |
\(d^{ab}\) | \[ \left( \begin{array}{ccc} v -0.3926141 & -0.0776130 & -0.2473886 \\ -0.0776130 & 0.3195244 & 0.2279981 \\ -0.2473886 & 0.2279981 & 0.0730903 \\ \end{array} \right) \] | \[ \left( \begin{array}{ccc} 0.4112809 & 0.1402097 & 0.2472943 \\ 0.1402097 & -0.1090056 & -0.1816157 \\ 0.2472943 & -0.1816157 & -0.3022755 \\ \end{array} \right) \] |
type | LALDETECTORTYPE_IFODIFF | LALDETECTORTYPE_IFODIFF |
name | LHO_4k | LLO_4k |
\((\lambda,\beta,h)\) | \((-(119^\circ24'27"\!\!.5657),46^\circ27'18"\!\!.528, 142.544\,\textrm{m})\) | \((-(90^\circ46'27"\!\!.2654),30^\circ33'46\!\!.4196, -6.574\,\textrm{m})\) |
\(({\mathcal{A}}_X,\zeta_X)\) | \(( -6.195\times 10^{-4}, 324^\circ\!\!.0006)\) | \(( -3.121\times 10^{-4}, 252^\circ\!\!.2835)\) |
\(({\mathcal{A}}_Y,\zeta_Y)\) | \(( 1.25\times 10^{-5}, 234^\circ\!\!.0006)\) | \(( -6.107\times 10^{-4}, 162^\circ\!\!.2835)\) |
\((L_X/2,L_Y/2)\) | \((2000\,\textrm{m},2000\,\textrm{m})\) | \((2000\,\textrm{m},2000\,\textrm{m})\) |
index | LAL_VIRGO_DETECTOR | LAL_GEO_600_DETECTOR |
---|---|---|
\(x^a\) | \[ \left( \begin{array}{c} 4.54637409863 \times 10^6 \\ 842989.697467 \\ 4.37857696275\times 10^6 \\ \end{array} \right) \] | \[ \left( \begin{array}{c} 3.85630994953 \times 10^6 \\ 666598.956352 \\ 5.01964141692 \times 10^6 \\ \end{array} \right) \] |
\(d^{ab}\) | \[ \left( \begin{array}{ccc} 0.2438740 & -0.0990838 & -0.2325762 \\ -0.0990838 & -0.4478258 & 0.1878331 \\ -0.2325762 & 0.1878331 & 0.2039518 \\ \end{array} \right) \] | \[ \left( \begin{array}{ccc} -0.0968250 & -0.3657823 & 0.1221373 \\ -0.3657823 & 0.2229681 & 0.2497174 \\ 0.1221373 & 0.2497174 & -0.1261431 \\ \end{array} \right) \] |
type | LALDETECTORTYPE_IFODIFF | LALDETECTORTYPE_IFODIFF |
name | VIRGO | GEO_600 |
\((\lambda,\beta,h)\) | \((10^\circ30'16"\!\!.1878,43^\circ37'\!\!53".0921, 51.884\,\textrm{m})\) | \((9^\circ48'25"\!\!.894,52^\circ14'42"\!\!.528, 114.425\,\textrm{m})\) |
\(({\mathcal{A}}_X,\zeta_X)\) | \(( 0, 19^\circ\!\!.4326)\) | \(( 0, 68^\circ\!\!.3883)\) |
\(({\mathcal{A}}_Y,\zeta_Y)\) | \(( 0, 289^\circ\!\!.4326)\) | \(( 0, 334^\circ\!\!.0569)\) |
\((L_X/2,L_Y/2)\) | \((1500\,\textrm{m},1500\,\textrm{m})\) | \((300\,\textrm{m},300\,\textrm{m})\) |
index | LAL_TAMA_300_DETECTOR | LAL_CIT_40_DETECTOR |
---|---|---|
\(x^a\) | \[ \left( \begin{array}{c} -3.94640898771 \times 10^6 \\ 3.36625903242 \times 10^6 \\ 3.69915069189 \times 10^6 \\ \end{array} \right) \] | \[ \left( \begin{array}{c} -2.49064958399 \times 10^6 \\ -4.65869968229 \times 10^6 \\ 3.56206411337 \times 10^6 \\ \end{array} \right) \] |
\(d^{ab}\) | \[ \left( \begin{array}{ccc} 0.1121397 & 0.3308421 & -0.1802193 \\ 0.3308421 & 0.2177940 & 0.1537258 \\ -0.1802193 & 0.1537258 & -0.3299337 \\ \end{array} \right) \] | \[ \left( \begin{array}{ccc} -0.3537959 & 0.2734713 & 0.1095458 \\ 0.2734713 & 0.0115214 & 0.2049027 \\ 0.1095458 & 0.2049027 & 0.3422745 \\ \end{array} \right) \] |
type | LALDETECTORTYPE_IFODIFF | LALDETECTORTYPE_IFODIFF |
name | TAMA_300 | CIT_40 |
\((\lambda,\beta,h)\) | \((139^\circ32'9"\!\!.8,35^\circ40'35"\!\!.6, 90\,\textrm{m})\) | \((-118^\circ\!\!.13,34^\circ\!\!.17, 0\,\textrm{m})\) |
\(({\mathcal{A}}_X,\zeta_X)\) | \(( 0, 270^\circ)\) | \(( 0, 180^\circ)\) |
\(({\mathcal{A}}_Y,\zeta_Y)\) | \(( 0, 180^\circ)\) | \((0, 90^\circ)\) |
\((L_X/2,L_Y/2)\) | \((150\,\textrm{m},150\,\textrm{m})\) | \((20\,\textrm{m},20\,\textrm{m})\) |
Prototypes | |
static void | getCartesianComponents (REAL4 u[3], REAL8 cosAlt, REAL8 sinAlt, REAL8 cosAz, REAL8 sinAz, REAL8 cosLat, REAL8 sinLat, REAL8 cosLon, REAL8 sinLon) |
LALDetector * | XLALCreateDetector (LALDetector *detector, const LALFrDetector *frDetector, LALDetectorType type) |
UNDOCUMENTED. More... | |
Macros | |
#define | LAL_CAT(x, y) x ## y |
#define | LAL_XCAT(x, y) LAL_CAT(x,y) |
#define | LAL_DETECTOR_CONSTANT(d, c) LAL_XCAT(LAL_XCAT(LAL_,d),LAL_XCAT(_,c)) |
expands to constant c of detector d More... | |
#define | LAL_DETECTOR_LOCATION(d) |
initializer for detector location vector More... | |
#define | LAL_ARM_X(d, c) LAL_DETECTOR_CONSTANT(d,LAL_XCAT(ARM_X_DIRECTION_,c)) |
expands to component c (X,Y,Z) of arm X of detector d More... | |
#define | LAL_ARM_Y(d, c) LAL_DETECTOR_CONSTANT(d,LAL_XCAT(ARM_Y_DIRECTION_,c)) |
expands to component c (X,Y,Z) of arm Y of detector d More... | |
#define | LAL_AXIS(d, c) LAL_DETECTOR_CONSTANT(d,LAL_XCAT(AXIS_DIRECTION_,c)) |
expands to component c (X,Y,Z) of axis of detector d More... | |
#define | LAL_DETECTOR_RESPONSE_IFODIFF(d) |
expands to a 3x3 matix initializer for the response for IFODIFF detector d More... | |
#define | LAL_DETECTOR_RESPONSE_IFOCOMM(d) |
expands to a 3x3 matix initializer for the response for IFOCOMM detector d More... | |
#define | LAL_DETECTOR_RESPONSE_IFOXARM(d) |
expands to a 3x3 matix initializer for the response for IFOXARM detector d More... | |
#define | LAL_DETECTOR_RESPONSE_IFOYARM(d) |
expands to a 3x3 matix initializer for the response for IFOYARM detector d More... | |
#define | LAL_DETECTOR_RESPONSE_CYLBAR(d) |
expands to a 3x3 matix initializer for the response for CYLBAR detector d More... | |
#define | LAL_FR_STREAM_DETECTOR_STRUCT(d) |
#define | LAL_DETECTOR_RESPONSE(d, t) LAL_XCAT( LAL_DETECTOR_RESPONSE_, t )(d) |
#define | LAL_DETECTOR_STRUCT(d, t) |
Variables | |
const LALDetector | lalCachedDetectors [LAL_NUM_DETECTORS] |
Pre-existing detectors. More... | |
|
static |
Definition at line 602 of file CreateDetector.c.
LALDetector* XLALCreateDetector | ( | LALDetector * | detector, |
const LALFrDetector * | frDetector, | ||
LALDetectorType | type | ||
) |
UNDOCUMENTED.
Definition at line 630 of file CreateDetector.c.
#define LAL_CAT | ( | x, | |
y | |||
) | x ## y |
Definition at line 427 of file CreateDetector.c.
#define LAL_XCAT | ( | x, | |
y | |||
) | LAL_CAT(x,y) |
Definition at line 428 of file CreateDetector.c.
expands to constant c of detector d
Definition at line 431 of file CreateDetector.c.
#define LAL_DETECTOR_LOCATION | ( | d | ) |
initializer for detector location vector
Definition at line 434 of file CreateDetector.c.
#define LAL_ARM_X | ( | d, | |
c | |||
) | LAL_DETECTOR_CONSTANT(d,LAL_XCAT(ARM_X_DIRECTION_,c)) |
expands to component c (X,Y,Z) of arm X of detector d
Definition at line 442 of file CreateDetector.c.
#define LAL_ARM_Y | ( | d, | |
c | |||
) | LAL_DETECTOR_CONSTANT(d,LAL_XCAT(ARM_Y_DIRECTION_,c)) |
expands to component c (X,Y,Z) of arm Y of detector d
Definition at line 445 of file CreateDetector.c.
#define LAL_AXIS | ( | d, | |
c | |||
) | LAL_DETECTOR_CONSTANT(d,LAL_XCAT(AXIS_DIRECTION_,c)) |
expands to component c (X,Y,Z) of axis of detector d
Definition at line 448 of file CreateDetector.c.
#define LAL_DETECTOR_RESPONSE_IFODIFF | ( | d | ) |
expands to a 3x3 matix initializer for the response for IFODIFF detector d
Definition at line 451 of file CreateDetector.c.
#define LAL_DETECTOR_RESPONSE_IFOCOMM | ( | d | ) |
expands to a 3x3 matix initializer for the response for IFOCOMM detector d
Definition at line 471 of file CreateDetector.c.
#define LAL_DETECTOR_RESPONSE_IFOXARM | ( | d | ) |
expands to a 3x3 matix initializer for the response for IFOXARM detector d
Definition at line 491 of file CreateDetector.c.
#define LAL_DETECTOR_RESPONSE_IFOYARM | ( | d | ) |
expands to a 3x3 matix initializer for the response for IFOYARM detector d
Definition at line 511 of file CreateDetector.c.
#define LAL_DETECTOR_RESPONSE_CYLBAR | ( | d | ) |
expands to a 3x3 matix initializer for the response for CYLBAR detector d
Definition at line 531 of file CreateDetector.c.
#define LAL_FR_STREAM_DETECTOR_STRUCT | ( | d | ) |
Definition at line 550 of file CreateDetector.c.
#define LAL_DETECTOR_RESPONSE | ( | d, | |
t | |||
) | LAL_XCAT( LAL_DETECTOR_RESPONSE_, t )(d) |
Definition at line 565 of file CreateDetector.c.
#define LAL_DETECTOR_STRUCT | ( | d, | |
t | |||
) |
Definition at line 568 of file CreateDetector.c.
const LALDetector lalCachedDetectors[LAL_NUM_DETECTORS] |
Pre-existing detectors.
Definition at line 577 of file CreateDetector.c.