Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
HPIB
Commits
c869c336
Commit
c869c336
authored
May 10, 2018
by
Tammo Jan Dijkema
Browse files
Fix argument order in VLSR tests
parent
4e72b5aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
test/test_track_doppler.py
View file @
c869c336
...
...
@@ -55,10 +55,14 @@ class DopplerTrackingTest(unittest.TestCase):
self
.
event_called
+=
1
return
self
.
event_called
>=
3
def
no_doppler_function
(
a
,
b
,
c
,
d
):
return
42
*
u
.
Hz
exit_event
.
is_set
=
three_times
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
)
...
...
vlsr.py
View file @
c869c336
...
...
@@ -63,7 +63,7 @@ def test_vlsr():
t
=
Time
(
"2018-06-21T12:00:00"
,
scale
=
"utc"
,
format
=
"isot"
)
v
=
vlsr
(
t
,
loc
,
psrc
,
verbose
=
True
)
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
))
cmd
=
"~harm/bin/vlsr %f %f 2000 %s %f %f 0"
%
\
...
...
@@ -79,7 +79,7 @@ def test_vlsr():
t
=
Time
(
"2018-06-21T12:00:00"
,
scale
=
"utc"
,
format
=
"isot"
)
v
=
vlsr
(
t
,
loc
,
psrc
,
verbose
=
True
)
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
))
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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment