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
5b5477fe
Commit
5b5477fe
authored
Apr 23, 2018
by
Tammo Jan Dijkema
Browse files
Prepare for using vlsr correction from astropy
parent
68615186
Changes
2
Hide whitespace changes
Inline
Side-by-side
track_doppler.py
View file @
5b5477fe
...
...
@@ -30,6 +30,10 @@ def doppler_harm(sky_coordinate, time, tracking_frequency):
return
freq_doppler
*
u
.
MHz
def
doppler_vlsr
(
sky_coordinate
,
time
,
tracking_frequency
):
# TODO: finish this function (wrap doppler_frequency from vlsr
return
42
def
track_doppler
(
lo
=
None
,
dt
=
None
,
tracking_frequency
=
freq_hi
,
doppler_function
=
doppler_harm
,
...
...
@@ -56,5 +60,5 @@ def track_doppler(lo=None, dt=None,
sky_coordinate
=
dt
.
radec
freq_doppler
=
doppler_function
(
sky_coordinate
,
time
.
time
(),
tracking_frequency
)
dfreq
=
1
*
u
.
GHz
+
tracking_frequency
-
freq_doppler
lo
.
frequency
=
dfreq
*
1e6
lo
.
frequency
=
dfreq
exit_event
.
wait
(
timeout
=
0.5
)
vlsr.py
View file @
5b5477fe
...
...
@@ -47,7 +47,7 @@ def doppler_frequency(t: Time, loc: EarthLocation, psrc: SkyCoord,
Returns:
Quantity: Observable frequency
"""
v1
=
vlsr
(
t
,
loc
,
psrc
)
v1
=
vlsr
(
t
,
loc
,
psrc
,
verbose
=
verbose
)
beta
=
v1
/
astropy
.
constants
.
c
return
np
.
sqrt
((
1
+
beta
)
/
(
1
-
beta
))
*
rest_frequency
...
...
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