Browse Source

Placed decommissioned antennas like Ar :-(

pull/1/head
Benito Marcote 11 months ago
parent
commit
f7cf1a9568
  1. 120
      app.py
  2. BIN
      assets/ant-wsrt.jpg
  3. 13
      assets/style.css
  4. 26
      data/stations_catalog.inp

120
app.py

@ -66,7 +66,8 @@ sorted_networks = {'EVN': 'EVN: European VLBI Network', 'eMERLIN': 'eMERLIN (out
'VLBA': 'VLBA: Very Long Baseline Array',
'LBA': 'LBA: Australian Long Baseline Array',
'KVN': 'KVN: Korean VLBI Network',
'Other': 'Other antennas'}
'Other': 'Other antennas',
'Decom': 'Decommissioned antennas'}
default_arrays = {'EVN': ['Ef', 'Hh', 'Jb2', 'Mc', 'Nt', 'Ur', 'On', 'Sr', 'T6', 'Tr',
'Ys', 'Wb', 'Bd', 'Sv', 'Zc', 'Ir'],
'e-EVN': ['Ef', 'Hh', 'Jb2', 'Mc', 'Nt', 'On', 'T6', 'Tr', 'Ys', 'Wb',
@ -78,7 +79,7 @@ default_arrays = {'EVN': ['Ef', 'Hh', 'Jb2', 'Mc', 'Nt', 'Ur', 'On', 'Sr', 'T6',
'Global VLBI': ['Ef', 'Hh', 'Jb2', 'Mc', 'Nt', 'Ur', 'On', 'Sr', 'T6',
'Tr', 'Ys', 'Wb', 'Bd', 'Sv', 'Zc', 'Ir', 'Br', 'Fd', 'Hn',
'Kp', 'La', 'Mk', 'Nl', 'Ov', 'Pt', 'Sc'],
'HSA': ['Br', 'Fd', 'Hn', 'Kp', 'La', 'Mk', 'Nl', 'Ov', 'Pt', 'Sc', 'Ef', 'Ar',
'HSA': ['Br', 'Fd', 'Hn', 'Kp', 'La', 'Mk', 'Nl', 'Ov', 'Pt', 'Sc', 'Ef', #'Ar',
'Gb', 'Y27'],
'GMVA': ['Ef', 'Mh', 'On', 'Ys', 'Pv', 'Br', 'Fd', 'Kp', 'La', 'Mk', 'Nl',
'Ov', 'Pt'],
@ -237,28 +238,14 @@ def arrays_with_band(arrays, a_band):
return ', '.join(tmp[:-1]) + ' and ' + tmp[-1]
##################### This is the webpage layout
app.layout = html.Div([
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"),
alt='European VLBI Network (EVN)',
className="d-inline-block align-top"),
]),
html.H2('EVN Observation Planner', className='d-inline-block align-middle mx-auto'),
html.A(className='d-inline-block ml-auto pull-right', href="https://www.jive.eu", children=[
html.Img(src=app.get_asset_url("logo_jive.png"), height='70px',
alt='Joinst Institute for VLBI ERIC (JIVE)')
])
]),
html.Div([html.Br()]),
html.Div(id='main-window', children=[
def main_window_pick_band():
"""Initial window with the introduction to the EVN Observation Planner and the band selection.
"""
return [
html.Div(className='row justify-content-center',
children=html.Div(className='col-sm-6 justify-content-center',
children=[html.Div(className='justify-content-center',
children=[html.H3("Welcome!"),
children=[#html.H3("Welcome!"),
html.P(["The EVN Observation Planner allows you to plan observations with the ",
html.A(href="https://www.evlbi.org", children="European VLBI Network"),
" (EVN) and other Very Long Baseline Interferometry (VLBI) networks. "
@ -280,11 +267,75 @@ app.layout = html.Div([
html.Div(id='pickband-label', className='row justify-content-center', children=''),
html.Div(className='row justify-content-center',
children=html.Button('Continue', id='pickband-button',
className='btn btn-primary btn-lg'))
className='btn btn-primary btn-lg')),
html.Div(className='row justify-content-right col-1', children=[
html.Button('Skip', id='skip-button', className='btn btn-gray')
])
], style={'min-width': '33rem'})
])
)])
)]
def main_window_pick_time():
"""Initial (second) window with the introduction to the EVN Observation Planner and
the option to pick a specific observing time or let the tool to find them.
"""
return [
html.Div(className='row justify-content-center',
children=html.Div(className='col-sm-6 justify-content-center',
children=[html.Div(className='justify-content-center',
children=[#html.H3("Welcome!"),
html.P(["The EVN Observation Planner allows you to plan observations with the ",
html.A(href="https://www.evlbi.org", children="European VLBI Network"),
" (EVN) and other Very Long Baseline Interferometry (VLBI) networks. "
"The EVN Observation Planner helps you to determine when your source "
"can be observed by the different antennas, and provides the expected "
"outcome of these observations, like the expected sensitivity or resolution."]),
html.H3("When to observe?"),
html.P(["You can pick a specific observing time or let the EVN Observation Planner "
"to find when your source can be observed by the antennas you will select. "
"Note that, in any case, you will still be able to change your selection "
"afterwards in case you want to compare different bands."])
], style={'text:align': 'justify !important'}),
html.Br(),
html.Div(className='justify-content-center', children=[html.Div(
dcc.Slider(id='pickband', min=0, max=len(fs.bands)-1,
value=tuple(fs.bands).index('18cm'), step=-1,
marks={i: fq for i,fq in enumerate(fs.bands)},
persistence=True, # tooltip={'always_visible': True, 'placement': 'top'},
updatemode='drag', included=False)), #html.Br(), html.Br(),
html.Div(id='pickband-label', className='row justify-content-center', children=''),
html.Div(className='row justify-content-center',
children=html.Button('Continue', id='pickband-button',
className='btn btn-primary btn-lg')),
html.Div(className='row justify-content-right col-1', children=[
html.Button('Skip', id='skip-button', className='btn btn-gray')
])
], style={'min-width': '33rem'})
])
)]
##################### This is the webpage layout
app.layout = html.Div([
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"),
alt='European VLBI Network (EVN)',
className="d-inline-block align-top"),
]),
html.H2('EVN Observation Planner', className='d-inline-block align-middle mx-auto'),
html.A(className='d-inline-block ml-auto pull-right', href="https://www.jive.eu", children=[
html.Img(src=app.get_asset_url("logo_jive.png"), height='70px',
alt='Joinst Institute for VLBI ERIC (JIVE)')
])
]),
html.Div([html.Br()]),
html.Div(id='main-window', children=main_window_pick_band())])
@app.callback(Output('pickband-label', 'children'),
@ -314,13 +365,23 @@ def update_pickband_tooltip(a_wavelength):
@app.callback(Output('main-window', 'children'),
[Input('pickband-button', 'n_clicks')],
[Input('skip-button', 'n_clicks'), Input('pickband-button', 'n_clicks')],
[State('pickband', 'value')])
def update_onsourcetime_label(n_clicks, a_wavelength):
if n_clicks is None:
def skip_intro_choices(skip_clicks, pickband_clicks, a_wavelength):
if (skip_clicks is None) and (pickband_clicks is None):
return dash.no_update
elif skip_clicks is not None:
return main_page(None)
elif pickband_clicks is not None:
return main_page(a_wavelength)
a_band = tuple(fs.bands)[a_wavelength]
def main_page(a_wavelength):
a_band = tuple(fs.bands)[a_wavelength] if a_wavelength is not None else None
return [
# First row containing all buttons/options, list of telescopes, and button with text output
dcc.ConfirmDialog(id='global-error', message=''),
@ -549,7 +610,8 @@ def update_onsourcetime_label(n_clicks, a_wavelength):
for s in all_antennas if s.network == an_array
])
]) for an_array in sorted_networks
])
]),
html.Div(style={'height': '15rem'})
]),
# html.Div(className='col-sm-2', style={'float': 'left'}, children=[
# ])
@ -1033,6 +1095,6 @@ def get_fig_dirty_map(obs):
if __name__ == '__main__':
# app.run_server(host='0.0.0.0', debug=True)
# app.run_server(debug=True)
app.run_server(host='0.0.0.0')
app.run_server(host='0.0.0.0', debug=True)

BIN
assets/ant-wsrt.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

13
assets/style.css

@ -3433,6 +3433,19 @@ input[type=checkbox]:disabled:after {
padding: 0;
}
.btn-gray {
color: #888888;
background-color: none;
border-color: none;
}
.btn-gray:hover {
color: #222222;
background-color: none;
border-color: none;
}
.btn-primary:hover {
color: #fff;
background-color: #a01d26;

26
data/stations_catalog.inp

@ -93,7 +93,7 @@ SEFD_3.6 = 1255.0
station = Arecibo Telescope
code = Ar
network = Other
network = Decom
possible_networks = EVN, HSA
country = Puerto Rico
diameter = 305 m
@ -1366,6 +1366,30 @@ SEFD_5 = 1600.0
SEFD_3.6 = 1680.0
[WSRT]
station = Westerbork Synthesis Radio Telescope
code = Wb14
network = Decom
possible_networks = EVN
country = The Netherlands
diameter = 14 x 25 m
#img =
#link =
position = 3828767.2647, 442446.1739, 5064921.57
min_elevation = 10.0
real_time = yes
SEFD_92 = 561.0
SEFD_30 = 449.0
SEFD_21 = 112.0
SEFD_18 = 150.0
SEFD_13 = 224.5
SEFD_6 = 449.0
SEFD_5 = 427.6
SEFD_3.6 = 449.0
[Wettzell]
station = Wettzell

Loading…
Cancel
Save