Browse Source

real_time into station catalog. Removing old code

pull/1/head
Benito Marcote 2 years ago
parent
commit
f4e117c130
  1. 50
      app.py
  2. 377
      data/stations_catalog.inp
  3. 17
      requirements.txt
  4. BIN
      src/__pycache__/functions.cpython-37.pyc
  5. BIN
      src/__pycache__/observation.cpython-37.pyc
  6. BIN
      src/__pycache__/stations.cpython-37.pyc
  7. 16
      src/freqsetups.py
  8. 86
      src/functions.py
  9. 15
      src/stations.py

50
app.py

@ -11,7 +11,7 @@ __copyright__ = "Copyright 2020, Joint Insitute for VLBI-ERIC (JIVE)" @@ -11,7 +11,7 @@ __copyright__ = "Copyright 2020, Joint Insitute for VLBI-ERIC (JIVE)"
__credits__ = "Benito Marcote"
__license__ = "GPL"
__date__ = "2020/04/21"
__version__ = "0.0.1"
__version__ = "1.0"
__maintainer__ = "Benito Marcote"
__email__ = "marcote@jive.eu"
__status__ = "Development" # Prototype, Development, Production.
@ -31,8 +31,10 @@ import plotly.graph_objs as go @@ -31,8 +31,10 @@ import plotly.graph_objs as go
from astropy.time import Time
from astropy import coordinates as coord
from astropy import units as u
# Tweak to not let astroplan crashing...
## THIS WILL NEED TO GO AWAY IN THE NEW VERSION OF ASTROPY, WHICH IS STILL NOT
## SUPPORTED BY THE CURRENT VERSION OF ASTROPLAN
# Tweak to not let astroplan crashing...
from astropy.utils.data import clear_download_cache
from astropy.utils import iers
clear_download_cache() # to be sure it is really working
@ -55,19 +57,9 @@ from src.Checkbox import Checkbox @@ -55,19 +57,9 @@ from src.Checkbox import Checkbox
current_directory = path.dirname(path.realpath(__file__))
# stationList = stations.Stations()
# stationList.add_from_file(current_directory+'/station_location.txt')
# iers.IERS.iers_table = iers.IERS.open(cache=True)
# iers.IERS.iers_table = iers.IERS_A.open(iers.IERS_A_URL)
# iers.Conf.iers_auto_url.set('ftp://cddis.gsfc.nasa.gov/pub/products/iers/finals2000A.all')
if path.isfile(current_directory + '/.astropy/cache/download/py3/lock'):
os.remove(current_directory + '/.astropy/cache/download/py3/lock')
# all_antennas = fx.get_stations_from_file(f"{current_directory}/data/station_location.txt")
all_antennas = fx.get_stations_from_configfile(f"{current_directory}/data/stations_catalog.inp")
sorted_networks = {'EVN': 'EVN: European VLBI Network', 'eMERLIN': 'eMERLIN (out-stations)',
'VLBA': 'VLBA: Very Long Baseline Array',
'LBA': 'LBA: Australian Long Baseline Array',
@ -90,8 +82,6 @@ default_arrays = {'EVN': ['Ef', 'Hh', 'Jb2', 'Mc', 'Nt', 'Ur', 'On', 'Sr', 'T6', @@ -90,8 +82,6 @@ default_arrays = {'EVN': ['Ef', 'Hh', 'Jb2', 'Mc', 'Nt', 'Ur', 'On', 'Sr', 'T6',
'Ov', 'Pt'],
'EHT': ['ALMA', 'Pv', 'LMT', 'PdB', 'SMA', 'JCMT', 'APEX', 'SMT', 'SPT']}
does_eEVN = ['Ef', 'Hh', 'Jb2', 'Jb1', 'Mc', 'Nt', 'On', 'T6', 'Mh', 'Tr', 'Ys', 'Wb',
'Bd', 'Sv', 'Zc', 'Ir', 'Sr', 'Ur', 'Cm', 'Kn', 'Pi', 'Da', 'De']
# Safety check that all these antennas are available in the file
for a_array in default_arrays:
@ -144,20 +134,9 @@ external_scripts = ["https://kit.fontawesome.com/69c65a0ab5.js"] @@ -144,20 +134,9 @@ external_scripts = ["https://kit.fontawesome.com/69c65a0ab5.js"]
# "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"]
app = dash.Dash(__name__, external_scripts=external_scripts)
# app = dash.Dash(__name__)
server = app.server
# app.config.requests_pathname_prefix = ''
# app.css.append_css({"external_url": "https://codepen.io/chriddyp/pen/bWLwgP.css"})
# app.css.append_css({"external_url": "https://codepen.io/chriddyp/pen/brPBPO.css"})
def get_doc_text():
"""Reads the doc files and returns it as a Div object.
@ -260,16 +239,6 @@ def update_sensitivity(obs): @@ -260,16 +239,6 @@ def update_sensitivity(obs):
##################### This is the webpage layout
app.layout = html.Div([
# html.Script("""
# $(document).ready(function() {
# $('[data-toggle="popover"]').popover({
# placement : 'bottom',
# title : '<div style="text-align:center; color:red; text-decoration:underline; font-size:14px;"> Muah ha ha</div>', //this is the top title bar of the popover. add some basic css
# html: 'true',
# content : '<div id="popOverBox"><img src="http://www.hd-report.com/wp-content/uploads/2008/08/mr-evil.jpg" width="251" height="201" /></div>' //this is the content of the html box. add the image here or anything you want really.
# });
# });
# """),
html.Div(id='banner', className='navbar-brand d-flex p-3 shadow-sm', children=[
html.A(className='d-inline-block mr-md-auto', href="https://www.evlbi.org", children=[
html.Img(height='70px', src=app.get_asset_url("logo_evn.png"),
@ -281,10 +250,8 @@ app.layout = html.Div([ @@ -281,10 +250,8 @@ app.layout = html.Div([
html.Img(src=app.get_asset_url("logo_jive.png"), height='70px',
alt='Joinst Institute for VLBI ERIC (JIVE)')
])
# html.Img(src='http://www.ira.inaf.it/evnnews/archive/evn.gif')
]),
# ], className='banner'),
html.Div([html.Br()]), #style={'clear': 'both', 'margin-top': '20px'}),
html.Div([html.Br()]),
# First row containing all buttons/options, list of telescopes, and button with text output
dcc.ConfirmDialog(id='global-error', message=''),
# Elements in second column (checkboxes with all stations)
@ -591,7 +558,7 @@ def select_antennas(selected_band, selected_networks, is_eEVN): @@ -591,7 +558,7 @@ def select_antennas(selected_band, selected_networks, is_eEVN):
if all_antennas[ant].has_band(selected_band)]
return [True if s.codename in selected_antennas else False for s in all_antennas] + \
[False if (s.has_band(selected_band) and s.codename in does_eEVN) else True \
[False if (s.has_band(selected_band) and s.real_time) else True \
for s in all_antennas]
else:
for an_array in selected_networks:
@ -774,7 +741,8 @@ def get_fig_ant_up(obs): @@ -774,7 +741,8 @@ def get_fig_ant_up(obs):
data_fig.append({'x': obs.times.datetime[data_dict[ant]],
'y': np.zeros_like(data_dict[ant][0])-i, 'type': 'scatter',
'hovertemplate': "%{x}",
'mode': 'markers', 'marker': {'symbol': "41"}, 'hoverinfo': "skip",
'mode': 'markers', 'marker_symbol': "41",
'hoverinfo': "skip",
'name': obs.stations[ant].name})
data_fig.append({'x': np.unwrap(obs.gstimes.value), 'y': np.zeros_like(obs.times)-0.5,

377
data/stations_catalog.inp

@ -6,10 +6,11 @@ network = Other @@ -6,10 +6,11 @@ network = Other
possible_networks = EHT
country = Chile
diameter = 50 x 12 m
#img =
#link =
#img =
#link =
position = 2225061.164, -5440057.37, -2481681.151
min_elevation = 10.0
real_time = no
SEFD_0.3 = 75
SEFD_0.1 = 85
@ -26,6 +27,7 @@ diameter = 12 m @@ -26,6 +27,7 @@ diameter = 12 m
#link =
position = 2225213.22, -5441629.65, 2478102.85
min_elevation = 10.0
real_time = no
SEFD_0.1 = 4977
@ -37,10 +39,11 @@ network = Other @@ -37,10 +39,11 @@ network = Other
possible_networks = LBA
country = Australia
diameter = 1 x 12 m
#img =
#link =
#img =
#link =
position = -2556743.707, 5097440.315, -2847749.657
min_elevation = 10.0
real_time = no
SEFD_21 = 6000.0
SEFD_18 = 6000.0
SEFD_3.6 = 3500.0
@ -54,10 +57,11 @@ network = LBA @@ -54,10 +57,11 @@ network = LBA
possible_networks = LBA
country = Australia
diameter = 6 x 22 m
#img =
#link =
#img =
#link =
position = -4751639.85972, 2791700.3567, -3200491.11339
min_elevation = 10.0
real_time = no
SEFD_21 = 68.0
SEFD_18 = 68.0
SEFD_13 = 106.0
@ -73,13 +77,14 @@ SEFD_0.7 = 180.0 @@ -73,13 +77,14 @@ SEFD_0.7 = 180.0
station = Ny-Alesund
code = Ny
network = Other
possible_networks =
possible_networks =
country = Norway
diameter = 20 m
#img =
#link =
#img =
#link =
position = 1202462.5055, 252734.5174, 6237766.221
min_elevation = 10.0
real_time = no
SEFD_13 = 850.0
SEFD_3.6 = 1255.0
@ -92,10 +97,11 @@ network = Other @@ -92,10 +97,11 @@ network = Other
possible_networks = EVN, HSA
country = Puerto Rico
diameter = 305 m
#img =
#link =
#img =
#link =
position = 2390486.9, -5564731.44, 1994720.45
min_elevation = 65.0
real_time = yes
SEFD_92 = 12
SEFD_30 = 3
SEFD_21 = 3.5
@ -114,10 +120,11 @@ network = EVN @@ -114,10 +120,11 @@ network = EVN
possible_networks = EVN
country = Russia
diameter = 32 m
#img =
#link =
#img =
#link =
position = -838201.0685, 3865751.5652, 4987670.8885
min_elevation = 10.0
real_time = yes
SEFD_21 = 330.0
SEFD_18 = 330.0
SEFD_13 = 330.0
@ -134,10 +141,11 @@ network = VLBA @@ -134,10 +141,11 @@ network = VLBA
possible_networks = VLBA
country = U.S.A.
diameter = 25 m
#img =
#link =
#img =
#link =
position = -2112065.2062, -3705356.5048, 4726813.6759
min_elevation = 10.0
real_time = no
SEFD_92 = 2742
SEFD_49 = 2744
SEFD_21 = 289.0
@ -156,12 +164,13 @@ station = Cambridge @@ -156,12 +164,13 @@ station = Cambridge
code = Cm
network = eMERLIN
possible_networks = eMERLIN
country = United Kingdom
country = United Kingdom
diameter = 32 m
#img =
#link =
#img =
#link =
position = 3920356.15, 2542.02, 5014284.42
min_elevation = 10.0
real_time = yes
SEFD_21 = 200.0
SEFD_18 = 175.0
SEFD_6 = 175.0
@ -177,10 +186,11 @@ network = LBA @@ -177,10 +186,11 @@ network = LBA
possible_networks = LBA
country = Australia
diameter = 30 m
#img =
#link =
#img =
#link =
position = -3753442.7457, 3912709.753, -3348067.6095
min_elevation = 10.0
real_time = no
SEFD_21 = 1000.0
SEFD_18 = 1000.0
SEFD_13 = 400.0
@ -199,10 +209,11 @@ network = eMERLIN @@ -199,10 +209,11 @@ network = eMERLIN
possible_networks = eMERLIN
country = United Kingdom
diameter = 25 m
#img =
#link =
#img =
#link =
position = 3829087.899, -169568.955, 5081082.346
min_elevation = 10.0
real_time = yes
SEFD_21 = 450.0
SEFD_18 = 450.0
SEFD_6 = 325.0
@ -216,12 +227,13 @@ station = Defford @@ -216,12 +227,13 @@ station = Defford
code = De
network = eMERLIN
possible_networks = eMERLIN
country = United Kingdom
country = United Kingdom
diameter = 25 m
#img =
#link =
#img =
#link =
position = 3923442.566, -146914.33, 5009755.125
min_elevation = 10.0
real_time = yes
SEFD_21 = 350.0
SEFD_18 = 350.0
SEFD_6 = 1000.0
@ -234,13 +246,14 @@ SEFD_1.3 = 720 @@ -234,13 +246,14 @@ SEFD_1.3 = 720
station = Dwingeloo
code = Dw
network = Other
possible_networks =
possible_networks =
country = The Netherlands
diameter = 25 m
#img =
#link =
#img =
#link =
position = 3839348.973, 430403.51, 5057990.099
min_elevation = 10.0
real_time = no
SEFD_21 = 6000.0
@ -252,10 +265,11 @@ network = EVN @@ -252,10 +265,11 @@ network = EVN
possible_networks = EVN, HSA
country = Germany
diameter = 100 m
#img =
#link =
#img =
#link =
position = 4033947.2616, 486990.7943, 4900431.0017
min_elevation = 10.0
real_time = yes
SEFD_92 = 600
SEFD_49 = 600
SEFD_30 = 65
@ -274,13 +288,14 @@ SEFD_0.7 = 200.0 @@ -274,13 +288,14 @@ SEFD_0.7 = 200.0
station = Five-hundred-meter Aperture Spherical Telescope
code = Fa
network = Other
possible_networks =
possible_networks =
country = China
diameter = 500 m
#img =
#link =
#img =
#link =
position = -1668526.98, 5506738.85, 2744897.69
min_elevation = 10.0
real_time = no
SEFD_92 = 8
SEFD_30 = 2
SEFD_21 = 1.95
@ -295,10 +310,11 @@ network = VLBA @@ -295,10 +310,11 @@ network = VLBA
possible_networks = VLBA
country = U.S.A.
diameter = 25 m
#img =
#link =
#img =
#link =
position = -1324009.3266, -5332181.9547, 3231962.3949
min_elevation = 10.0
real_time = no
SEFD_92 = 2742
SEFD_49 = 2744
SEFD_21 = 289.0
@ -316,13 +332,14 @@ SEFD_0.7 = 640.0 @@ -316,13 +332,14 @@ SEFD_0.7 = 640.0
station = Giant Metrewave Radio Telescope
code = GMRT
network = Other
possible_networks =
possible_networks =
country = India
diameter = 30 x 45 m
#img =
#link =
#img =
#link =
position = 1656988.9135, 5797576.2281, 2073756.22
min_elevation = 10.0
real_time = no
SEFD_92 = 55
SEFD_49 = 59
SEFD_30 = 53
@ -337,10 +354,11 @@ network = VLBA @@ -337,10 +354,11 @@ network = VLBA
possible_networks = HSA
country = U.S.A.
diameter = 100 m
#img =
#link =
#img =
#link =
position = 882589.4102, -4924872.3416, 3943729.4062
min_elevation = 10.0
real_time = no
SEFD_92 = 35
SEFD_49 = 24
SEFD_30 = 13
@ -362,10 +380,11 @@ network = VLBA @@ -362,10 +380,11 @@ network = VLBA
possible_networks = VLBA
country = U.S.A.
diameter = 25 m
#img =
#link =
#img =
#link =
position = 1446374.8658, -4447939.6774, 4322306.1838
min_elevation = 10.0
real_time = no
SEFD_92 = 2742
SEFD_49 = 2744
SEFD_21 = 289.0
@ -386,10 +405,11 @@ network = EVN @@ -386,10 +405,11 @@ network = EVN
possible_networks = EVN
country = South Africa
diameter = 26 m
#img =
#link =
#img =
#link =
position = 5085442.7637, 2668263.7913, -2768696.7523
min_elevation = 10.0
real_time = yes
SEFD_18 = 430.0
SEFD_13 = 410.0
SEFD_6 = 650.0
@ -406,10 +426,11 @@ network = LBA @@ -406,10 +426,11 @@ network = LBA
possible_networks = LBA
country = Australia
diameter = 26 m
#img =
#link =
#img =
#link =
position = -3950237.359, 2522347.6804, -4311561.879
min_elevation = 10.0
real_time = no
SEFD_21 = 470.0
SEFD_18 = 470.0
SEFD_13 = 650.0
@ -428,10 +449,11 @@ network = EVN @@ -428,10 +449,11 @@ network = EVN
possible_networks = EVN
country = Latvia
diameter = 32/16 m
#img =
#link =
#img =
#link =
position = 3183649.314, 1276902.989, 5359264.71
min_elevation = 10.0
real_time = yes
SEFD_18 = 3600.0
SEFD_6 = 430.0
SEFD_5 = 480.0
@ -446,10 +468,11 @@ network = Other @@ -446,10 +468,11 @@ network = Other
possible_networks = EHT
country = U.S.A.
diameter = 15 m
#img =
#link =
#img =
#link =
position = -5464559.08, -2492999.13, 2150638.19
min_elevation = 10.0
real_time = no
SEFD_0.1 = 3842
@ -462,10 +485,11 @@ network = EVN @@ -462,10 +485,11 @@ network = EVN
possible_networks = EVN, eMERLIN
country = United Kingdom
diameter = 38x25 m
#img =
#link =
#img =
#link =
position = 3822846.76, -153802.28, 5086285.9
min_elevation = 10.0
real_time = yes
SEFD_21 = 350.0
SEFD_18 = 320.0
SEFD_6 = 320.0
@ -481,10 +505,11 @@ network = LBA @@ -481,10 +505,11 @@ network = LBA
possible_networks = LBA
country = Australia
diameter = 12 m
#img =
#link =
#img =
#link =
position = -4147354.6913, 4581542.3772, -1573303.1565
min_elevation = 10.0
real_time = no
SEFD_21 = 5000.0
SEFD_5 = 4000.0
@ -496,11 +521,12 @@ code = Kp @@ -496,11 +521,12 @@ code = Kp
network = VLBA
possible_networks = VLBA
country = U.S.A.
diameter = 25 m
#img =
#link =
diameter = 25 m
#img =
#link =
position = -1995678.8571, -5037317.7049, 3357328.0174
min_elevation = 10.0
real_time = no
SEFD_92 = 2742
SEFD_49 = 2744
SEFD_21 = 289.0
@ -521,10 +547,11 @@ network = eMERLIN @@ -521,10 +547,11 @@ network = eMERLIN
possible_networks = eMERLIN
country = United Kingdom
diameter = 25 m
#img =
#link =
#img =
#link =
position = 3860084.898, -202105.039, 5056568.848
min_elevation = 10.0
real_time = yes
SEFD_21 = 425.0
SEFD_18 = 400.0
SEFD_6 = 325.0
@ -540,10 +567,11 @@ network = EVN @@ -540,10 +567,11 @@ network = EVN
possible_networks = EVN
country = United Kingdom
diameter = 40 m
#img =
#link =
#img =
#link =
position = -1281152.8362, 5640864.3586, 2682653.4434
min_elevation = 10.0
real_time = no
SEFD_13 = 350.0
SEFD_6 = 17.0
SEFD_5 = 17.0
@ -555,13 +583,14 @@ SEFD_3.6 = 480.0 @@ -555,13 +583,14 @@ SEFD_3.6 = 480.0
station = Kuntunse
code = Nk
network = Other
possible_networks =
possible_networks =
country = Ghana
diameter = 32 m
#img =
#link =
#img =
#link =
position = 6346273.521, -33779.7127, 634844.9454
min_elevation = 10.0
real_time = no
SEFD_6 = 1200.0
@ -573,10 +602,11 @@ network = Other @@ -573,10 +602,11 @@ network = Other
possible_networks = EHT
country = Mexico
diameter = 50 m
#img =
#link =
#img =
#link =
position = -768715.632, -5988507.072, 2063354.852
min_elevation = 10.0
real_time = no
SEFD_0.3 = 1714
SEFD_0.1 = 3536
@ -589,10 +619,11 @@ network = VLBA @@ -589,10 +619,11 @@ network = VLBA
possible_networks = VLBA
country = U.S.A.
diameter = 25 m
#img =
#link =
#img =
#link =
position = -1449752.5839, -4975298.5757, 3709123.8459
min_elevation = 10.0
real_time = no
SEFD_92 = 2742
SEFD_49 = 2744
SEFD_21 = 289.0
@ -611,12 +642,13 @@ station = Lovell Telescope @@ -611,12 +642,13 @@ station = Lovell Telescope
code = Jb1
network = EVN
possible_networks = EVN, eMERLIN
country = United Kingdom
country = United Kingdom
diameter = 76 m
#img =
#link =
#img =
#link =
position = 3822626.04, -154105.65, 5086486.04
min_elevation = 10.0
real_time = yes
SEFD_92 = 132
SEFD_49 = 83
SEFD_21 = 36.0
@ -629,13 +661,14 @@ SEFD_6 = 80.0 @@ -629,13 +661,14 @@ SEFD_6 = 80.0
station = Matera
code = Ma
network = Other
possible_networks =
possible_networks =
country = Italy
diameter = 20 m
#img =
#link =
#img =
#link =
position = 4641938.4489, 1393003.3339, 4133325.7916
min_elevation = 10.0
real_time = no
SEFD_13 = 1000.0
SEFD_3.6 = 1000.0
@ -648,10 +681,11 @@ network = VLBA @@ -648,10 +681,11 @@ network = VLBA
possible_networks = VLBA
country = U.S.A.
diameter = 25 m
#img =
#link =
#img =
#link =
position = -5464075.1874, -2495248.1168, 2148297.3643
min_elevation = 10.0
real_time = no
SEFD_92 = 2742
SEFD_49 = 2744
SEFD_21 = 289.0
@ -672,10 +706,11 @@ network = EVN @@ -672,10 +706,11 @@ network = EVN
possible_networks = EVN
country = Italy
diameter = 32 m
#img =
#link =
#img =
#link =
position = 4461369.6954, 919597.124, 4449559.3812
min_elevation = 10.0
real_time = yes
SEFD_21 = 490.0
SEFD_18 = 700.0
SEFD_13 = 400.0
@ -693,10 +728,11 @@ network = EVN @@ -693,10 +728,11 @@ network = EVN
possible_networks = EVN
country = Finland
diameter = 14 m
#img =
#link =
#img =
#link =
position = 2892584.8489, 1311715.598, 5512640.1545
min_elevation = 10.0
real_time = yes
SEFD_13 = 4500.0
SEFD_3.6 = 3200.0
SEFD_1.3 = 2608
@ -710,11 +746,12 @@ code = Mo @@ -710,11 +746,12 @@ code = Mo
network = LBA
possible_networks = LBA
country = Australia
diameter = 22 m
#img =
#link =
diameter = 22 m
#img =
#link =
position = -4682769.0585, 2802619.04217, -3291759.33837
min_elevation = 10.0
real_time = no
SEFD_21 = 240.0
SEFD_18 = 240.0
SEFD_13 = 530.0
@ -733,10 +770,11 @@ network = VLBA @@ -733,10 +770,11 @@ network = VLBA
possible_networks = VLBA
country = U.S.A.
diameter = 25 m
#img =
#link =
#img =
#link =
position = -130872.4987, -4762317.0925, 4226851.0014
min_elevation = 10.0
real_time = no
SEFD_92 = 2742
SEFD_49 = 2744
SEFD_21 = 289.0
@ -757,10 +795,11 @@ network = EVN @@ -757,10 +795,11 @@ network = EVN
possible_networks = EVN
country = Italy
diameter = 32 m
#img =
#link =
#img =
#link =
position = 4934562.8407, 1321201.5428, 3806484.7336
min_elevation = 10.0
real_time = yes
SEFD_21 = 820.0
SEFD_18 = 784.0
SEFD_13 = 770.0
@ -779,10 +818,11 @@ network = VLBA @@ -779,10 +818,11 @@ network = VLBA
possible_networks = VLBA
country = U.S.A.
diameter = 25 m
#img =
#link =
#img =
#link =
position = -2409150.4018, -4478573.118, 3838617.3385
min_elevation = 10.0
real_time = no
SEFD_92 = 2742
SEFD_49 = 2744
SEFD_21 = 289.0
@ -803,10 +843,11 @@ network = EVN @@ -803,10 +843,11 @@ network = EVN
possible_networks = EVN
country = Sweden
diameter = 25/20 m
#img =
#link =
#img =
#link =
position = 3370965.8787, 711466.1978, 5349664.2006
min_elevation = 10.0
real_time = yes
SEFD_30 = 900
SEFD_21 = 350.0
SEFD_18 = 350.0
@ -826,10 +867,11 @@ network = Other @@ -826,10 +867,11 @@ network = Other
possible_networks = EHT
country = France
diameter = 10 x 15 m
#img =
#link =
#img =
#link =
position = 4524000.43, 468042.14, 4460309.76
min_elevation = 10.0
real_time = no
SEFD_0.3 = 450
SEFD_0.1 = 4299
@ -842,10 +884,11 @@ network = LBA @@ -842,10 +884,11 @@ network = LBA
possible_networks = LBA
country = Australia
diameter = 64 m
#img =
#link =
#img =
#link =
position = -4554232.4864, 2816758.8662, -3454035.0137
min_elevation = 10.0
real_time = no
SEFD_21 = 40.0
SEFD_18 = 40.0
SEFD_13 = 30.0
@ -864,10 +907,11 @@ network = eMERLIN @@ -864,10 +907,11 @@ network = eMERLIN
possible_networks = eMERLIN
country = United Kindgdom
diameter = 25 m
#img =
#link =
#img =
#link =
position = 3817549.956, -163031.141, 5089896.654
min_elevation = 10.0
real_time = yes
SEFD_21 = 400.0
SEFD_18 = 450.0
SEFD_6 = 325.0
@ -883,10 +927,11 @@ network = Other @@ -883,10 +927,11 @@ network = Other
possible_networks = EHT
country = Spain
diameter = 30 m
#img =
#link =
#img =
#link =
position = 5088967.9, 301681.6, 3825015.8
min_elevation = 10.0
real_time = no
SEFD_0.3 = 640
SEFD_0.1 = 1160
@ -899,10 +944,11 @@ network = VLBA @@ -899,10 +944,11 @@ network = VLBA
possible_networks = VLBA
country = U.S.A.
diameter = 25 m
#img =
#link =
#img =
#link =
position = -1640953.9383, -5014816.0237, 3575411.7916
min_elevation = 10.0
real_time = no
SEFD_92 = 2742
SEFD_49 = 2744
SEFD_21 = 289.0
@ -923,10 +969,11 @@ network = EVN @@ -923,10 +969,11 @@ network = EVN
possible_networks = EVN
country = Spain
diameter = 34 m
#img =
#link =
#img =
#link =
position = 4849336.6927, -360488.7857, 4114748.8272
min_elevation = 10.0
real_time = no
SEFD_13 = 150.0
SEFD_3.6 = 106.0
@ -939,10 +986,11 @@ network = EVN @@ -939,10 +986,11 @@ network = EVN
possible_networks = EVN
country = Sapin
diameter = 70 m
#img =
#link =
#img =
#link =
position = 4849336.6927, -360488.7857, 4114748.8272
min_elevation = 10.0
real_time = no
SEFD_18 = 35.0
SEFD_13 = 20.0
SEFD_3.6 = 18.0
@ -957,10 +1005,11 @@ network = Other @@ -957,10 +1005,11 @@ network = Other
possible_networks =
country = South Africa
diameter = 1 x 12 m
#img =
#link =
#img =
#link =
position = 5109105.93105892, 2003381.49740976, -3239353.39941561
min_elevation = 10.0
real_time = no
SEFD_21 = 3.0
SEFD_18 = 3.0
@ -977,6 +1026,7 @@ diameter = 8 x 6 m @@ -977,6 +1026,7 @@ diameter = 8 x 6 m
#link =
position = -1828790.81, -5054428.74, 3427884.59
min_elevation = 10.0
real_time = no
SEFD_0.1 = 2374
@ -988,10 +1038,11 @@ network = Other @@ -988,10 +1038,11 @@ network = Other
possible_networks = EHT
country = U.S.A.
diameter = 10 m
#img =
#link =
#img =
#link =
position = -1828790.81, -5054428.74, 3427884.59
min_elevation = 10.0
real_time = no
SEFD_0.1 = 9057
@ -1003,10 +1054,11 @@ network = EVN @@ -1003,10 +1054,11 @@ network = EVN
possible_networks = EVN
country = Italy
diameter = 65 m
#img =
#link =
#img =
#link =
position = 4865183.542, 791922.255, 4035136.024
min_elevation = 10.0
real_time = yes
SEFD_21 = 67.0
SEFD_18 = 67.0
SEFD_5 = 50.0
@ -1021,10 +1073,11 @@ network = EVN @@ -1021,10 +1073,11 @@ network = EVN
possible_networks = EVN
country = China
diameter = 25 m
#img =
#link =
#img =
#link =
position = -2831687.4273, 4675733.4681, 3275327.4971
min_elevation = 10.0
real_time = yes
SEFD_18 = 670.0
SEFD_13 = 800.0
SEFD_6 = 720.0
@ -1040,10 +1093,11 @@ network = Other @@ -1040,10 +1093,11 @@ network = Other
possible_networks = EHT
country = South Pole
diameter = 10 m
#img =
#link =
#img =
#link =
position = 0.0, 0.0, -6359552.31424518
min_elevation = 10.0
real_time = no
SEFD_0.1 = 7497
@ -1055,10 +1109,11 @@ network = VLBA @@ -1055,10 +1109,11 @@ network = VLBA
possible_networks = VLBA
country = U.S.A.
diameter = 25 m
#img =
#link =
#img =
#link =
position = 2607848.6379, -5488069.5358, 1932739.7326
min_elevation = 10.0
real_time = no
SEFD_92 = 2742
SEFD_49 = 2744
SEFD_21 = 289.0
@ -1079,10 +1134,11 @@ network = EVN @@ -1079,10 +1134,11 @@ network = EVN
possible_networks = EVN
country = Russia
diameter = 32 m
#img =
#link =
#img =
#link =
position = 2730173.6723, 1562442.7934, 5529969.1413
min_elevation = 10.0
real_time = yes
SEFD_21 = 360.0
SEFD_18 = 360.0
SEFD_13 = 330.0
@ -1099,10 +1155,11 @@ network = KVN @@ -1099,10 +1155,11 @@ network = KVN
possible_networks = KVN
country = South Korea
diameter = 21 m
#img =
#link =
#img =
#link =
position = -3171731.5532, 4292678.5258, 3481038.7679
min_elevation = 10.0
real_time = no
SEFD_1.3 = 1288
SEFD_0.7 = 1919.0
@ -1115,10 +1172,11 @@ network = EVN @@ -1115,10 +1172,11 @@ network = EVN
possible_networks = EVN
country = China
diameter = 65 m
#img =
#link =
#img =
#link =
position = -2826708.603, 4679237.077, 3274667.551
min_elevation = 10.0
real_time = yes
SEFD_21 = 39000.0
SEFD_18 = 39000.0
SEFD_13 = 46.0
@ -1137,10 +1195,11 @@ network = LBA @@ -1137,10 +1195,11 @@ network = LBA
possible_networks = LBA
country = Australia
diameter = 70 m
#img =
#link =
#img =
#link =
position = -4460895.2445, 2682361.5103, -3674747.5813
min_elevation = 10.0
real_time = no
SEFD_18 = 23.0
SEFD_13 = 16.0
SEFD_3.6 = 25.0
@ -1155,10 +1214,11 @@ network = EVN @@ -1155,10 +1214,11 @@ network = EVN
possible_networks = EVN
country = Poland
diameter = 32 m
#img =
#link =
#img =
#link =
position = 3638558.51, 1221969.72, 5077036.76
min_elevation = 10.0
real_time = yes
SEFD_30 = 2000
SEFD_21 = 250.0
SEFD_18 = 300.0
@ -1173,12 +1233,13 @@ station = Ulsan @@ -1173,12 +1233,13 @@ station = Ulsan
code = Ku
network = KVN
possible_networks = KVN
country = South Korea
country = South Korea
diameter = 21 m
#img =
#link =
#img =
#link =
position = -3287268.543, 4023450.1448, 3687379.9675
min_elevation = 10.0
real_time = no
SEFD_1.3 = 1288
SEFD_0.7 = 1919.0
@ -1191,17 +1252,18 @@ network = EVN @@ -1191,17 +1252,18 @@ network = EVN
possible_networks = EVN
country = China
diameter = 25 m
#img =
#link =
#img =
#link =
position = 228310.2129, 4631922.7656, 4367064.0638
min_elevation = 10.0
real_time = yes
SEFD_21 = 300.0
SEFD_18 = 300.0
SEFD_13 = 560.0
SEFD_6 = 250.0
SEFD_3.6 = 350.0
SEFD_1.3 = 850
[VLA 1]
@ -1211,10 +1273,11 @@ network = VLBA @@ -1211,10 +1273,11 @@ network = VLBA
possible_networks = VLBA
country = U.S.A.
diameter = 1 x 25 m
#img =
#link =
#img =
#link =
position = -1601185.4286, -5041977.1754, 3554875.6231
min_elevation = 10.0
real_time = no
SEFD_92 = 3900
SEFD_21 = 420.0
SEFD_18 = 420.0
@ -1232,12 +1295,13 @@ station = Karl Jansky G. Very Large Array (phased-up array) @@ -1232,12 +1295,13 @@ station = Karl Jansky G. Very Large Array (phased-up array)
code = Y27
network = VLBA
possible_networks = VLBA
country = U.S.A.
country = U.S.A.
diameter = 27 x 25 m
#img =
#link =
#img =
#link =
position = -1601185.4286, -5041977.1754, 3554875.6231
min_elevation = 10.0
real_time = no
SEFD_92 = 167
SEFD_21 = 17.9
SEFD_18 = 17.9
@ -1247,7 +1311,7 @@ SEFD_5 = 13.2 @@ -1247,7 +1311,7 @@ SEFD_5 = 13.2
SEFD_3.6 = 10.7
SEFD_1.3 = 15
SEFD_0.7 = 23.9
[Warkworth]
@ -1257,10 +1321,11 @@ network = LBA @@ -1257,10 +1321,11 @@ network = LBA
possible_networks = LBA
country = New Zealand
diameter = 12 m
#img =
#link =
#img =
#link =
position = -5115324.4279, 477843.2969, -3767192.8344
min_elevation = 10.0
real_time = no
SEFD_21 = 3400.0
SEFD_5 = 3800.0
@ -1273,10 +1338,11 @@ network = EVN @@ -1273,10 +1338,11 @@ network = EVN
possible_networks = EVN
country = The Netherlands
diameter = 1 x 25 m
#img =
#link =
#img =
#link =
position = 3828767.2647, 442446.1739, 5064921.57
min_elevation = 10.0
real_time = yes
SEFD_92 = 2100
SEFD_30 = 1680
SEFD_21 = 420.0
@ -1295,10 +1361,11 @@ network = EVN @@ -1295,10 +1361,11 @@ network = EVN
possible_networks = EVN
country = Germany
diameter = 20 m
#img =
#link =
#img =
#link =
position = 4075627.6441, 931774.2773, 4801552.3784
min_elevation = 10.0
real_time = no
SEFD_13 = 1250.0
SEFD_3.6 = 750.0
@ -1311,10 +1378,11 @@ network = LBA @@ -1311,10 +1378,11 @@ network = LBA
possible_networks = LBA
country = Australia
diameter = 12 m
#img =
#link =
#img =
#link =
position = -2388896.189, 5043350.0019, -3078590.8037
min_elevation = 10.0
real_time = no
SEFD_21 = 4000.0
SEFD_5 = 3500.0
@ -1327,10 +1395,11 @@ network = EVN @@ -1327,10 +1395,11 @@ network = EVN
possible_networks = EVN
country = Spain
diameter = 40 m
#img =
#link =
#img =
#link =
position = 4848761.8027, -261484.1746, 4123085.0529
min_elevation = 10.0
real_time = yes
SEFD_13 = 1400.0
SEFD_6 = 160.0
SEFD_5 = 160.0
@ -1347,10 +1416,11 @@ network = KVN @@ -1347,10 +1416,11 @@ network = KVN
possible_networks = KVN
country = South Korea
diameter = 21 m
#img =
#link =
#img =
#link =
position = -3042280.9035, 4045902.6564, 3867374.3087
min_elevation = 10.0
real_time = no
SEFD_1.3 = 1288
SEFD_0.7 = 1919.0
@ -1363,10 +1433,11 @@ network = EVN @@ -1363,10 +1433,11 @@ network = EVN
possible_networks = EVN
country = Russia
diameter = 32 m
#img =
#link =
#img =
#link =
position = 3451207.5353, 3060375.4139, 4391915.0384
min_elevation = 10.0
real_time = yes
SEFD_21 = 300.0
SEFD_18 = 300.0
SEFD_13 = 330.0

17
requirements.txt

@ -1,25 +1,30 @@ @@ -1,25 +1,30 @@
astroplan==0.6
astropy==4.0.1.post1
astropy==4.0.1
Brotli==1.0.9
click==7.1.2
dash==1.16.2
dash-bootstrap-components==0.10.6
dash==1.16.3
dash-bootstrap-components==0.10.7
dash-core-components==1.12.1
dash-html-components==1.1.1
dash-renderer==1.8.2
dash-table==4.10.1
Flask==1.1.2
Flask-Compress==1.5.0
Flask-Compress==1.7.0
future==0.18.2
gunicorn==20.0.4
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
numpy==1.19.2
pandas==1.1.2
plotly==4.10.0
Obit==1.0
pandas==1.1.3
patsy==0.5.1
plotly==4.11.0
plotly-express==0.4.1
python-dateutil==2.8.1
pytz==2020.1
retrying==1.3.3
scipy==1.5.3
six==1.15.0
statsmodels==0.12.0
Werkzeug==1.0.1

BIN
src/__pycache__/functions.cpython-37.pyc

Binary file not shown.

BIN
src/__pycache__/observation.cpython-37.pyc

Binary file not shown.

BIN
src/__pycache__/stations.cpython-37.pyc

Binary file not shown.

16
src/freqsetups.py

@ -11,14 +11,14 @@ import enum @@ -11,14 +11,14 @@ import enum
#
# def __init__(self, fromfile='../data/frequency_setups.py'):
bands = {'92cm': 'P band (92 cm - 0.33 GHz)', '49cm': 'P band (49 cm - 0.6 GHz)',
'30cm': 'UHF band (30 cm - 1 GHz)', '21cm': 'L band (21 cm - 1.4 GHz)',
'18cm': 'L band (18 cm - 1.7 GHz)', '13cm': 'S band (13 cm - 2.3 GHz)',
'6cm': 'C band (6cm - 5 GHz)', '5cm': 'M band (5 cm - 6 GHz)',
'3.6cm': 'X band (3.6 cm - 8.3 GHz)', '2cm': 'U band (2 cm - 15 GHz)',
'1.3cm': 'K band (1.3 cm - 23 GHz)', '0.9cm': 'Ka band (0.9 cm - 33 GHz)',
'0.7cm': 'Q band (0.7 cm - 43 GHz)', '0.3cm': 'W band (0.3 cm - 100 GHz)',
'0.1cm': '0.1 cm - 300 GHz'}
bands = {'92cm': 'P band (92 cm or 0.33 GHz)', '49cm': 'P band (49 cm or 0.6 GHz)',
'30cm': 'UHF band (30 cm or 1 GHz)', '21cm': 'L band (21 cm or 1.4 GHz)',
'18cm': 'L band (18 cm or 1.7 GHz)', '13cm': 'S band (13 cm or 2.3 GHz)',
'6cm': 'C band (6cm or 5 GHz)', '5cm': 'M band (5 cm or 6 GHz)',
'3.6cm': 'X band (3.6 cm or 8.3 GHz)', '2cm': 'U band (2 cm or 15 GHz)',
'1.3cm': 'K band (1.3 cm or 23 GHz)', '0.9cm': 'Ka band (0.9 cm or 33 GHz)',
'0.7cm': 'Q band (0.7 cm or 43 GHz)', '0.3cm': 'W band (0.3 cm or 100 GHz)',
'0.1cm': '0.1 cm or 300 GHz'}
data_rates = (2**i for i in range(13, 2, -1)) # from 4 to 4096
subbands = (2**i for i in range(5, 0, -1)) # from 1 to 16

86
src/functions.py

@ -9,87 +9,6 @@ from astropy.io import ascii @@ -9,87 +9,6 @@ from astropy.io import ascii
from src import stations
def get_networks_from_file(filename='data/station_location.txt'):
"""Retrieves all the stations given in the filename and
creates different arrays. Returns a dict with all arrays.
The file must contain the information for each antenna on each
row, with the following header (written at the beginning of the file):
- station : full name of the station
- code : code name of the station
- network : name of the network the station belongs to.
- x : x coordinates of the station, in meters.
- y : y coordinates of the station, in meters.
- z : z coordinates of the station, in meters.
- SEFD-XX : SEFD of the station at XX cm (-1 if this band cannot be observed)
"""
datafile = ascii.read(filename)
# Creates a `Stations` object for each network, for now with no stations
network_labels = set(datafile['network'])
networks = {}
for network in network_labels:
networks[network] = stations.Stations(network, [])
sefd_names = datafile.colnames[6:]
for a_line in datafile:
# Create each station and add it to the correct noetwork
sefds = {}
for sefd_name in sefd_names:
if a_line[sefd_name] > 0.0:
sefds[f"{sefd_name.replace('SEFD-','').strip()}cm"] = a_line[sefd_name]
a_loc = coord.EarthLocation(a_line['x']*u.m, a_line['y']*u.m, a_line['z']*u.m)
# For now this is hard-coded
if a_line['station'] is 'Arecibo':
min_elev = 80*u.deg
else:
min_elev = 10*u.deg
new_station = stations.SelectedStation(a_line['station'], a_line['code'],
location=a_loc, freqs_sefds=sefds, min_elevation=min_elev, selected=False)
networks[a_line['network']].add(new_station)
return networks
def get_stations_from_file(filename='data/station_location.txt'):
"""Retrieves all the stations given in the filename and
creates a Stations object containing all stations, which is returned.
The file must contain the information for each antenna on each
row, with the following header (written at the beginning of the file):
- station : full name of the station
- code : code name of the station
- network : name of the network the station belongs to.
- x : x coordinates of the station, in meters.
- y : y coordinates of the station, in meters.
- z : z coordinates of the station, in meters.
- SEFD-XX : SEFD of the station at XX cm (-1 if this band cannot be observed)
"""
datafile = ascii.read(filename)
networks = stations.Stations('network', [])
sefd_names = datafile.colnames[6:]
for a_line in datafile:
# Create each station and add it to the correct noetwork
sefds = {}
for sefd_name in sefd_names:
if a_line[sefd_name] > 0.0:
sefds[f"{sefd_name.replace('SEFD-','').strip()}cm"] = a_line[sefd_name]
a_loc = coord.EarthLocation(a_line['x']*u.m, a_line['y']*u.m, a_line['z']*u.m)
# For now this is hard-coded
if a_line['code'] == 'Ar':
min_elev = 65*u.deg
else:
min_elev = 10*u.deg
new_station = stations.SelectedStation(a_line['station'], a_line['code'],
network=a_line['network'], location=a_loc, freqs_sefds=sefds,
min_elevation=min_elev, selected=False)
networks.add(new_station)
return networks
def get_stations_from_configfile(filename='data/stations_catalog.inp'):
"""Retrieves the information concerning all stations available in the 'filename'
file. Creates a Stations object containing the stations and the information on it.
@ -104,6 +23,7 @@ def get_stations_from_configfile(filename='data/stations_catalog.inp'): @@ -104,6 +23,7 @@ def get_stations_from_configfile(filename='data/stations_catalog.inp'):
diameter - string with the diameter of the station.
position = x, y, z (in meters). Geoposition of the station.
min_elevation (in degrees) - minimum elevation the station can observe.
real_time = yes/no - if the station can participate in real-time observations (e.g. e-EVN).
SEFD_** - SEFD of the station at the **cm band. If a given band is not present,
it is assumed that the station cannot observe it.
[optional]
@ -118,15 +38,17 @@ def get_stations_from_configfile(filename='data/stations_catalog.inp'): @@ -118,15 +38,17 @@ def get_stations_from_configfile(filename='data/stations_catalog.inp'):
a_loc = coord.EarthLocation(temp[0]*u.m, temp[1]*u.m, temp[2]*u.m)
# Getting the SEFD values for the bands
min_elev = float(config[stationname]['min_elevation'])*u.deg
does_real_time = True if config[stationname]['real_time']=='yes' else False
sefds = {}
for akey in config[stationname].keys():
if 'SEFD_' in akey.upper():
sefds[f"{akey.upper().replace('SEFD_', '').strip()}cm"] = \
float(config[stationname][akey])
new_station = stations.SelectedStation(stationname, config[stationname]['code'],
config[stationname]['network'], a_loc, sefds, min_elev,
config[stationname]['station'], config[stationname]['possible_networks'],
config[stationname]['country'], config[stationname]['diameter'])
config[stationname]['country'], config[stationname]['diameter'], does_real_time)
networks.add(new_station)
return networks

15
src/stations.py

@ -9,7 +9,7 @@ from astroplan import Observer @@ -9,7 +9,7 @@ from astroplan import Observer
class Station(object):
def __init__(self, name, codename, network, location, freqs_sefds, min_elevation=20*u.deg,
fullname=None, all_networks=None, country='', diameter=''):
fullname=None, all_networks=None, country='', diameter='', real_time=False):
"""Initializes a station. The given name must be the name of the station that
observes, with the typical 2-letter format used in the EVN (with exceptions).
@ -34,6 +34,10 @@ class Station(object): @@ -34,6 +34,10 @@ class Station(object):
Networks where the station can participate (free style).
- country : str [OPTIONAL]
Country where the station is placed.
- diameter : str [OPTIONAL]
Diameter of the station (free format).
- real_time : bool [OPTIONAL, False by default]
If the station can participate in real-time observations (e.g. e-EVN).
"""
self.observer = Observer(name=name.replace('_', ' '), location=location)
self._codename = codename
@ -56,6 +60,7 @@ class Station(object): @@ -56,6 +60,7 @@ class Station(object):
self._country = country
self._diameter = diameter
self._real_time = real_time
@property
@ -94,6 +99,10 @@ class Station(object): @@ -94,6 +99,10 @@ class Station(object):
def diameter(self):
return self._diameter
@property
def real_time(self):
return self._real_time
@property
def location(self):
"""Location of the station in EarthLocation type.
@ -171,10 +180,10 @@ class Station(object): @@ -171,10 +180,10 @@ class Station(object):
class SelectedStation(Station):
def __init__(self, name, codename, network, location, freqs_sefds, min_elevation=20*u.deg,
fullname=None, all_networks=None, country='', diameter='', selected=True):
fullname=None, all_networks=None, country='', diameter='', real_time=False, selected=True):
self._selected = selected
super().__init__(name, codename, network, location, freqs_sefds,
min_elevation, fullname, all_networks, country, diameter)
min_elevation, fullname, all_networks, country, diameter, real_time)
@property
def selected(self):

Loading…
Cancel
Save