Skip to content
Snippets Groups Projects
Commit e33c95a6 authored by Jan David Mol's avatar Jan David Mol
Browse files

add regression against LOFAR1

parent 076dd69f
Branches
Tags
1 merge request!996L2SS-2017: Fix rounding of input samples delay
......@@ -281,3 +281,21 @@ class TestDelayCompensation(base.TestCase):
# should not result in any sample shifts
self.assertEqual(2, sample_shift[0])
self.assertEqual(0, sample_shift[1])
def test_delay_against_LOFAR1(self):
"""Test correctness of the delay compensation regression against LOFAR1."""
# INT HBA: 130m, 115m, 85m
delay_seconds = numpy.array([530.6981e-9, 465.5254e-9, 342.5133e-9])
sample_shift = delay_compensation(delay_seconds, 200_000_000)
self.assertListEqual([0, 13, 38], sample_shift.tolist())
# RS HBA: 115m, 85m
delay_seconds = numpy.array([465.5254e-9, 342.5133e-9])
sample_shift = delay_compensation(delay_seconds, 200_000_000)
self.assertListEqual([0, 25], sample_shift.tolist())
# LBA: 115m, 80m, 50m
delay_seconds = numpy.array([465.5254e-9, 326.9640e-9, 199.2573e-9])
sample_shift = delay_compensation(delay_seconds, 200_000_000)
self.assertListEqual([0, 28, 53], sample_shift.tolist())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment