Commit c869c336 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Fix argument order in VLSR tests

parent 4e72b5aa
...@@ -55,10 +55,14 @@ class DopplerTrackingTest(unittest.TestCase): ...@@ -55,10 +55,14 @@ class DopplerTrackingTest(unittest.TestCase):
self.event_called += 1 self.event_called += 1
return self.event_called >= 3 return self.event_called >= 3
def no_doppler_function(a, b, c, d):
return 42*u.Hz
exit_event.is_set = three_times exit_event.is_set = three_times
track_doppler.track_doppler(self.telescope_mock, self.local_oscillator_mock, track_doppler.track_doppler(self.telescope_mock, self.local_oscillator_mock,
exit_event=exit_event, timeout=0.) exit_event=exit_event, timeout=0.,
doppler_function=no_doppler_function)
print(self.local_oscillator_mock.mock_calls) print(self.local_oscillator_mock.mock_calls)
......
...@@ -63,7 +63,7 @@ def test_vlsr(): ...@@ -63,7 +63,7 @@ def test_vlsr():
t = Time("2018-06-21T12:00:00", scale="utc", format="isot") t = Time("2018-06-21T12:00:00", scale="utc", format="isot")
v = vlsr(t, loc, psrc, verbose=True) v = vlsr(t, loc, psrc, verbose=True)
print("LSR velocity: {0:+8.3f}".format(v.to(u.km / u.s))) print("LSR velocity: {0:+8.3f}".format(v.to(u.km / u.s)))
f = doppler_frequency(t, loc, psrc, freq_hi) f = doppler_frequency(psrc, t, freq_hi, loc)
print("Doppler HI: {}".format(f)) print("Doppler HI: {}".format(f))
cmd = "~harm/bin/vlsr %f %f 2000 %s %f %f 0" %\ cmd = "~harm/bin/vlsr %f %f 2000 %s %f %f 0" %\
...@@ -79,7 +79,7 @@ def test_vlsr(): ...@@ -79,7 +79,7 @@ def test_vlsr():
t = Time("2018-06-21T12:00:00", scale="utc", format="isot") t = Time("2018-06-21T12:00:00", scale="utc", format="isot")
v = vlsr(t, loc, psrc, verbose=True) v = vlsr(t, loc, psrc, verbose=True)
print("LSR velocity: {0:+8.3f}".format(v.to(u.km / u.s))) print("LSR velocity: {0:+8.3f}".format(v.to(u.km / u.s)))
f = doppler_frequency(t, loc, psrc, freq_hi) f = doppler_frequency(psrc, t, freq_hi, loc)
print("Doppler HI: {}".format(f)) print("Doppler HI: {}".format(f))
cmd = "~harm/bin/vlsr %f %f 2000 %s %f %f 0" %\ cmd = "~harm/bin/vlsr %f %f 2000 %s %f %f 0" %\
(psrc.ra.rad, psrc.dec.rad, t.unix, loc.lat.rad, loc.lon.rad) (psrc.ra.rad, psrc.dec.rad, t.unix, loc.lat.rad, loc.lon.rad)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment