18 Test code for antenna.py.
24 from numpy.testing
import assert_allclose
26 from lal
import DAYSID_SI
32 PSI = np.random.uniform(0., 2.*np.pi)
33 RA = np.random.uniform(0., 2.*np.pi)
34 DEC = np.random.uniform(-np.pi/2., np.pi/2.)
38 TIMES = np.linspace(T0, T0 + DAYSID_SI, 1000)
41 @pytest.mark.parametrize("detector", ("H1", "L1", "V1"))
44 Test that the default, LAL and lookup table implementations match.
48 use_lal=
False, scalar=
True, vector=
True)
52 use_lal=
True, scalar=
True, vector=
True)
56 lookup=
True, scalar=
True, vector=
True)
58 for key
in [
'plus',
'cross',
'x',
'y',
'b',
'l']:
59 assert_allclose(A.response[key], B.response[key])
60 assert_allclose(A.response[key], C.response[key], atol=1e-3)
63 if __name__ ==
'__main__':
64 args = sys.argv[1:]
or [
"-v",
"-rs",
"--junit-xml=junit-antenna.xml"]
65 sys.exit(pytest.main(args=[__file__] + args))
def test_antenna(detector)
Test that the default, LAL and lookup table implementations match.