Geometry
Optimised geometric functions
- bilby_cython.geometry.calculate_arm(double arm_tilt, double arm_azimuth, double longitude, double latitude)
Compute the unit-vector along an interferometer arm given the specified parameters.
- Parameters:
- arm_tilt: float
The angle between the tangent to the Earth and the arm
- arm_azimuth: float
The azimuthal angle of the arm in FIXME
- longitude: float
The longitude of the vertex
- latitude: float
The latitude of the vertex
- Returns:
- output: array_like
The unit-vector pointing along the interferometer arm
- bilby_cython.geometry.detector_tensor(ndarray x, ndarray y)
Compute the detector tensor given the two unit arm vectors.
\[d_{ij} = \frac{x_{i} x_{j} - y_{i} y_{j}}{2}\]- Parameters:
- x: array_like
The x-arm vector
- y: array_like
The y-arm vector
- Returns:
- output: array_like
The 3x3 detector tensor
- bilby_cython.geometry.get_polarization_tensor(double ra, double dec, double time, double psi, unicode mode)
Calculate the polarization tensor for a given sky location and time
See Nishizawa et al. (2009) arXiv:0903.0528 for definitions of the polarisation tensors. [u, v, w] represent the Earth-frame [m, n, omega] represent the wave-frame Note: there is a typo in the definition of the wave-frame in Nishizawa et al.
- Parameters:
- ra: float
right ascension in radians
- dec: float
declination in radians
- time: float
geocentric GPS time
- psi: float
binary polarisation angle counter-clockwise about the direction of propagation
- mode: str
polarisation mode
- Returns:
- array_like: A 3x3 representation of the polarization_tensor for the specified mode.
- bilby_cython.geometry.get_polarization_tensor_multiple_modes(double ra, double dec, double time, double psi, list modes)
Calculate the polarization tensor for a given sky location and time with multiple modes
See Nishizawa et al. (2009) arXiv:0903.0528 for definitions of the polarisation tensors. [u, v, w] represent the Earth-frame [m, n, omega] represent the wave-frame Note: there is a typo in the definition of the wave-frame in Nishizawa et al.
- Parameters:
- ra: float
right ascension in radians
- dec: float
declination in radians
- time: float
geocentric GPS time
- psi: float
binary polarisation angle counter-clockwise about the direction of propagation
- modes: list
List of the polarization modes
- Returns:
- array_like: A 3x3 representation of the polarization_tensor for the specified mode.
- bilby_cython.geometry.rotation_matrix_from_delta(delta_x)
Calculate the rotation matrix mapping the vector (0, 0, 1) to delta_x while preserving the origin of the azimuthal angle.
This is decomposed into three Euler angles, alpha, beta, gamma, which rotate about the z-, y-, and z- axes respectively.
- Parameters:
- delta_x: array-like (3,)
Vector onto which (0, 0, 1) should be mapped.
- rotation: array-like (3,3)
- Returns:
- total_rotation: array-like (3,3)
Rotation matrix which maps vectors from the frame in which delta_x is aligned with the z-axis to the target frame.
- bilby_cython.geometry.three_by_three_matrix_contraction(ndarray x, ndarray y)
Doubly contract two 3x3 input matrices following Einstein summation.
..math:
output = x_{ij} y_{ij}
- Parameters:
- x: array_like
First input matrix
- y: array_like
Second input matrix
- Returns:
- output: float
The contracted value
- bilby_cython.geometry.time_delay_from_geocenter(ndarray detector1, double ra, double dec, double time)
Calculate time delay between a detectors and the geocenter based on XLALArrivalTimeDiff in TimeDelay.c
- Parameters:
- detector1: array_like
Cartesian coordinate vector for the first detector in the geocentric frame generated by the Interferometer class as self.vertex.
- ra: float
Right ascension of the source in radians
- dec: float
Declination of the source in radians
- time: float
GPS time in the geocentric frame
- Returns:
- float: Time delay between the two detectors in the geocentric frame
- bilby_cython.geometry.time_delay_geocentric(ndarray detector1, ndarray detector2, double ra, double dec, double time)
Calculate time delay between two detectors in geocentric coordinates based on XLALArrivaTimeDiff in TimeDelay.c
- Parameters:
- detector1: array_like
Cartesian coordinate vector for the first detector in the geocentric frame generated by the Interferometer class as self.vertex.
- detector2: array_like
Cartesian coordinate vector for the second detector in the geocentric frame. To get time delay from Earth center, use detector2 = np.array([0,0,0])
- ra: float
Right ascension of the source in radians
- dec: float
Declination of the source in radians
- time: float
GPS time in the geocentric frame
- Returns:
- float: Time delay between the two detectors in the geocentric frame
- bilby_cython.geometry.zenith_azimuth_to_theta_phi(double zenith, double azimuth, ndarray delta_x)
Convert from the ‘detector frame’ to the Earth frame.
- Parameters:
- zenith: float
The zenith angle in the detector frame
- azimuth: float
The azimuthal angle in the detector frame
- delta_x: array_like
The separation vector for the two detectors defining the frame
- Returns:
- theta, phi: float
The zenith and azimuthal angles in the earth frame.