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
5f47f9f1
Commit
5f47f9f1
authored
Apr 14, 2018
by
Tammo Jan Dijkema
Browse files
Make doppler executable specifyable
parent
8d125a60
Changes
1
Hide whitespace changes
Inline
Side-by-side
trackHI.py
View file @
5f47f9f1
...
...
@@ -12,7 +12,8 @@ import time
freq_HI
=
1420.405751
def
track_frequency
(
lo
=
LocalOscillator
(),
dt
=
telescope
(),
tracking_frequency
=
freq_HI
):
tracking_frequency
=
freq_HI
,
doppler_executable
=
"/home/harm/bin/doppler_mb"
):
"""Sets the Local Oscillator to a frequency to correct for Doppler shift"""
dt_lat
=
np
.
deg2rad
(
52.812019
)
dt_lon
=
np
.
deg2rad
(
6.396169
)
...
...
@@ -25,7 +26,7 @@ def track_frequency(lo=LocalOscillator(), dt=telescope(),
argstring
=
"{ra} {dec} 2000 {time} {dt_lat} {dt_lon} {dt_alt}"
.
format
(
ra
=
ra
,
dec
=
dec
,
time
=
t
,
dt_lat
=
dt_lat
,
dt_lon
=
dt_lon
,
dt_alt
=
dt_alt
)
doppler_cmd
=
"/home/harm/bin/doppler_mb
"
+
argstring
+
" "
+
str
(
tracking_frequency
)
doppler_cmd
=
doppler_executable
+
"
"
+
argstring
+
" "
+
str
(
tracking_frequency
)
freq_doppler
=
float
(
subprocess
.
Popen
(
doppler_cmd
,
stdout
=
subprocess
.
PIPE
,
shell
=
True
).
stdout
.
read
())
dfreq
=
1000.0
+
tracking_frequency
-
freq_doppler
lo
.
frequency
=
dfreq
*
1e6
...
...
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