Skip to content
Snippets Groups Projects
Commit 82c59962 authored by Colm Talbot's avatar Colm Talbot
Browse files

Merge branch 'allow-detector-specific-modes' into 'master'

ENH: Allow specific detector waveform mode

See merge request lscsoft/bilby!1164
parents 4c9db951 42ac3b18
No related branches found
No related tags found
1 merge request!1164ENH: Allow specific detector waveform mode
Pipeline #470897 failed
......@@ -269,15 +269,21 @@ class Interferometer(object):
psi: float
binary polarisation angle counter-clockwise about the direction of propagation
mode: str
polarisation mode (e.g. 'plus', 'cross')
polarisation mode (e.g. 'plus', 'cross') or the name of a specific detector.
If mode == self.name, return 1
Returns
=======
float: The antenna response for the specified mode and time/location
"""
polarization_tensor = get_polarization_tensor(ra, dec, time, psi, mode)
return three_by_three_matrix_contraction(self.geometry.detector_tensor, polarization_tensor)
if mode in ["plus", "cross", "x", "y", "breathing", "longitudinal"]:
polarization_tensor = get_polarization_tensor(ra, dec, time, psi, mode)
return three_by_three_matrix_contraction(self.geometry.detector_tensor, polarization_tensor)
elif mode == self.name:
return 1
else:
return 0
def get_detector_response(self, waveform_polarizations, parameters):
""" Get the detector response for a particular waveform
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment