Browse Source

All ants. uv-plot added

pull/1/head
Benito Marcote 2 years ago
parent
commit
34cbcc68a1
  1. 89
      app.py
  2. 129
      data/station_location.txt
  3. 2
      doc/notes.md
  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. 38
      src/observation.py
  8. 2
      src/stations.py
  9. 3
      test/test.py

89
app.py

@ -61,8 +61,7 @@ default_arrays = {'EVN': ['Ef', 'Hh', 'Jb2', 'Mc', 'Nt', 'Ur', 'On', 'Sr', 'T6',
'e-EVN': ['Ef', 'Hh', 'Ir', 'Jb2', 'Mc', 'Nt', 'On', 'T6', 'Tr', 'Ys', 'Wb',
'Bd', 'Sv', 'Zc', 'Ir', 'Sr', 'Ur'],
'eMERLIN': ['Cm', 'Kn', 'Pi', 'Da', 'De'],
# 'LBA': ['ATCA', 'Pa', 'Mo', 'Ho', 'Cd', 'Td', 'Ww'],
'LBA': ['ATCA', 'Pa', 'Mo', 'Ho', 'Cd', 'Td'],
'LBA': ['ATCA', 'Pa', 'Mo', 'Ho', 'Cd', 'Td', 'Ww'],
'VLBA': ['Br', 'Fd', 'Hh', 'Kp', 'La', 'Mk', 'Nl', 'Ov', 'Pt', 'Sc'],
'KVN': ['Ky', 'Ku', 'Kt'],
'Global VLBI': ['Ef', 'Hh', 'Jb2', 'Mc', 'Nt', 'Ur', 'On', 'Sr', 'T6',
@ -70,7 +69,14 @@ default_arrays = {'EVN': ['Ef', 'Hh', 'Jb2', 'Mc', 'Nt', 'Ur', 'On', 'Sr', 'T6',
'Kp', 'La', 'Mk', 'Nl', 'Ov', 'Pt', 'Sc'],
'GMVA': ['Ef', 'Mh', 'On', 'Ys', 'Pv', 'Br', 'Fd', 'Kp', 'La', 'Mk', 'Nl',
'Ov', 'Pt'],
'EHT': ['ALMA', 'Pv', 'LMT', 'PdB', 'SMA', 'JCMT', 'APEX', 'SMTO', 'SPT']}
'EHT': ['ALMA', 'Pv', 'LMT', 'PdB', 'SMA', 'JCMT', 'APEX', 'SMT', 'SPT']}
# Safety check that all these antennas are available in the file
for a_array in default_arrays:
for a_station in default_arrays[a_array]:
assert a_station in all_antennas.keys()
# Initial values
target_source = observation.Source('1h2m3s +50d40m30s', 'Source')
@ -158,7 +164,8 @@ app.layout = html.Div([
html.Div(className='form-group', children=[
html.Label('Select default VLBI Network(s)'),
dcc.Dropdown(id='array', options=[{'label': n, 'value': n} \
for n in default_arrays], value=['EVN'], multi=True),
for n in default_arrays if n != 'e-EVN'], value=['EVN'],
multi=True),
]),
html.Div(className='input-group-prepend', children=[
dcc.Checklist(id='e-EVN', className='checkbox', persistence=True,
@ -278,8 +285,9 @@ app.layout = html.Div([
dcc.Tab(label='Images', children=[
# Images
html.Div(className='col-md-8', children=[
dcc.Markdown(children="""To be implemented.
The uv coverage and expected dirty images will go here.""")
# dcc.Markdown(children="""To be implemented.
# The uv coverage and expected dirty images will go here.""")
html.Div([dcc.Graph(id='fig-uvplane')])
])
]),
dcc.Tab(label='Help', children=[
@ -472,7 +480,8 @@ def get_source(source_coord):
@app.callback([Output('sensitivity-output', 'children'),
Output('fig-elev-time', 'figure'),
Output('fig-ant-time', 'figure'), Output('global-error', 'message')],
Output('fig-ant-time', 'figure'),
Output('fig-uvplane', 'figure'), Output('global-error', 'message')],
[Input('antenna-selection-button', 'n_clicks')],
[State('band', 'value'),
State('starttime', 'value'),
@ -497,32 +506,34 @@ def compute_observation(n_clicks, band, starttime, endtime, source, onsourcetime
"""Computes all products to be shown concerning the set observation.
"""
if n_clicks is None:
return dash.no_update, dash.no_update, dash.no_update, dash.no_update
return dash.no_update, dash.no_update, dash.no_update, dash.no_update, dash.no_update
try:
target_source = observation.Source(convert_colon_coord(source), 'Source')
except ValueError as e:
return f"""Incorrect format for source coordinates:
{source} found but 'hh:mm:ss dd:mm:ss' expected.
""", dash.no_update, dash.no_update, dash.no_update
""", dash.no_update, dash.no_update, dash.no_update, dash.no_update
try:
time0 = Time(datetime.datetime.strptime(starttime, '%d/%m/%Y %H:%M'),
format='datetime')
except ValueError as e:
return "Incorrect format for starttime.", dash.no_update, dash.no_update, dash.no_update
return "Incorrect format for starttime.", dash.no_update, dash.no_update, \
dash.no_update, dash.no_update
try:
time1 = Time(datetime.datetime.strptime(endtime, '%d/%m/%Y %H:%M'),
format='datetime')
except ValueError as e:
return "Incorrect format for endtime.", dash.no_update, dash.no_update, dash.no_update
return "Incorrect format for endtime.", dash.no_update, dash.no_update, \
dash.no_update, dash.no_update
if time0 >= time1:
return "The start time of the observation must be earlier than the end time.", \
dash.no_update, dash.no_update, dash.no_update
dash.no_update, dash.no_update, dash.no_update, dash.no_update
if (time1 - time0) > 5*u.d:
return "Please, put a time range smaller than 5 days.", \
dash.no_update, dash.no_update, dash.no_update
dash.no_update, dash.no_update, dash.no_update, dash.no_update
# try:
# TODO: this should not be hardcoded...
@ -539,7 +550,8 @@ def compute_observation(n_clicks, band, starttime, endtime, source, onsourcetime
# return update_sensitivity(obs), dash.no_update, dash.no_update
return update_sensitivity(obs), get_fig_ant_elev(obs), get_fig_ant_up(obs), dash.no_update
return update_sensitivity(obs), get_fig_ant_elev(obs), get_fig_ant_up(obs), \
get_fig_uvplane(obs), dash.no_update
@ -555,17 +567,23 @@ def get_fig_ant_elev(obs):
data_fig.append({'x': obs.times.datetime, 'y': np.zeros_like(obs.times)+10,
'mode': 'lines', 'hoverinfo': 'skip', 'name': 'Elev. limit 10º',
'line': {'dash': 'dash', 'opacity': 0.5, 'color': 'gray'}})
data_fig.append({'x': obs.times.datetime, 'y': np.zeros_like(obs.times)+20,
data_fig.append({'x': obs.gstimes.value, 'y': np.zeros_like(obs.times)+20, 'xaxis': 'x2',
'mode': 'lines', 'hoverinfo': 'skip', 'name': 'Elev. limit 20º',
'line': {'dash': 'dot', 'opacity': 0.5, 'color': 'gray'}})
return {'data': data_fig,
'layout': {'title': 'Source elevation during the observation',
'hovermode': 'closest',
'xaxis': {'title': 'Time (UTC)', 'showgrid': False,
'ticks': 'inside', 'showline': True, 'mirror': "all",
'ticks': 'inside', 'showline': True, 'mirror': False,
'hovermode': 'closest', 'color': 'black'},
'xaxis2': {'title': {'text': 'Time (GST)', 'standoff': 0},
'showgrid': False, 'overlaying': 'x',
'ticks': 'inside', 'showline': True, 'mirror': False,
'hovermode': 'closest', 'color': 'black', 'side': 'top'},
'yaxis': {'title': 'Elevation (degrees)', 'range': [0., 92.],
'ticks': 'inside', 'showline': True, 'mirror': "all",
'showgrid': False, 'hovermode': 'closest'}}}
'showgrid': False, 'hovermode': 'closest'},
'zeroline': True, 'zerolinecolor': 'k'}}
@ -592,19 +610,34 @@ def get_fig_ant_up(obs):
def get_fig_uvplane(obs):
data_fig = []
bl_uv = obs.get_uv()
for bl_name in bl_uv:
# accounting for complex conjugate
uv = np.empty((2*len(bl_uv[bl_name]), 2))
uv[:len(bl_uv[bl_name]), :] = bl_uv[bl_name]
uv[len(bl_uv[bl_name]):, :] = -bl_uv[bl_name]
data_fig.append({'x': uv[:,0]
'y': uv[:,1]
# 'type': 'scatter', 'mode': 'lines',
'type': 'scatter', 'mode': 'markers',
'marker': {'symbol': '.', 'size': 2},
'name': bl_name, 'hovertext': bl_name, 'hoverinfo': 'name', 'hovertemplate': ''})
return {'data': data_fig,
'layout': {'title': 'uv coverage', 'showlegend': False,
'hovermode': 'closest',
'width': 700, 'height': 700,
'xaxis': {'title': 'u (lambda)', 'showgrid': False, 'zeroline': False,
'ticks': 'inside', 'showline': True, 'mirror': "all",
'color': 'black'},
'yaxis': {'title': 'v (lambda)', 'showgrid': False, 'scaleanchor': 'x',
'ticks': 'inside', 'showline': True, 'mirror': "all",
'color': 'black', 'zeroline': False}}}
# @app.callback(Output('my-graph', 'figure'), [Input('my-dropdown', 'value')])
# def update_graph(selected_dropdown_value):
# #df = web.DataReader(
# # selected_dropdown_value, data_source='google',
# # start=dt(2017, 1, 1), end=dt.now())
# return {
# 'data': [{
# 'x': [1, 2, 3, 4, 5, 6],
# 'y': [3, 4, 5, 4, 5, 6]
# }]
# }
def get_fig_dirty_map(obs):
pass

129
data/station_location.txt

@ -1,57 +1,72 @@
station code network x y z SEFD-92 SEFD-49 SEFD-30 SEFD-21 SEFD-18 SEFD-13 SEFD-6 SEFD-5 SEFD-3.6 SEFD-1.3 SEFD-0.7
Badary Bd EVN -838201.0685 3865751.5652 4987670.8885 -1 -1 -1 330 330 330 200 -1 200 710 -1
Effelsberg Ef EVN 4033947.2616 486990.7866 4900430.9915 600 600 65 20 19 300 20 25 20 70 200
Brewster Br VLBA -2112065.2062 -3705356.5048 4726813.6759 2742 2744 -1 289 314 347 210 278 327 543 640
Fort_Davis Fd VLBA -1324009.3266 -5332181.9547 3231962.3949 2742 2744 -1 289 314 347 210 278 327 543 640
Green_Bank Gb VLBA 882589.4102 -4924872.3416 3943729.4062 35 24 13 10 10 12 13 13 15 20 30
Hartebeesthoek Hh EVN 5085442.7637 2668263.7913 -2768696.7523 -1 -1 -1 -1 430 410 650 700 630 1800 -1
Hancock Hn VLBA 1446374.8658 -4447939.6774 4322306.1838 2742 2744 -1 289 314 347 210 278 327 543 640
Hobart Ho LBA -3950237.3590 2522347.6804 -4311561.8790 -1 -1 -1 470 470 650 640 640 560 1200 1800
Kitt_Peak Kp VLBA -1995678.8402 -5037317.6968 3357328.0251 2742 2744 -1 289 314 347 210 278 327 543 640
Kunming Km EVN -1281152.8362 5640864.3586 2682653.4434 -1 -1 -1 -1 -1 350 17 17 480 -1 -1
Los_Alamos La VLBA -1449752.5839 -4975298.5757 3709123.8459 2742 2744 -1 289 314 347 210 278 327 543 640
Medicina Mc EVN 4461369.6954 919597.1240 4449559.3812 -1 -1 -1 490 700 400 170 840 320 700 -1
Metsahovi Mh EVN 2892584.8489 1311715.5980 5512640.1545 -1 -1 -1 -1 -1 4500 -1 -1 3200 2608 4500
Mauna_Kea Mk VLBA -5464075.1874 -2495248.1168 2148297.3643 2742 2744 -1 289 314 347 210 278 327 543 640
North_Liberty Nl VLBA -130872.4987 -4762317.0925 4226851.0014 2742 2744 -1 289 314 347 210 278 327 543 640
Noto Nt EVN 4934562.8407 1321201.5428 3806484.7336 -1 -1 -1 820 784 770 260 1100 770 800 900
Onsala On EVN 3370605.8010 711917.7196 5349830.9004 -1 -1 900 350 350 1110 480 850 785 1200 1310
OVRO Ov VLBA -2409150.4018 -4478573.1180 3838617.3385 2742 2744 -1 289 314 347 210 278 327 543 640
Parkes Pa LBA -4554232.4864 2816758.8662 -3454035.0137 -1 -1 -1 40 40 30 110 110 43 370 810
Pie_Town Pt VLBA -1640953.9383 -5014816.0237 3575411.7916 2742 2744 -1 289 314 347 210 278 327 543 640
Sardinia Sr EVN 4865182.7660 791922.6890 4035137.1740 -1 -1 -1 67 67 -1 -1 50 -1 138 -1
St._Croix Sc VLBA 2607848.6379 -5488069.5358 1932739.7326 2742 2744 -1 289 314 347 210 278 327 543 640
Tianma T6 EVN -2826708.6030 4679237.0770 3274667.5510 -1 -1 -1 39000 39000 46 26 26 48 70 120
Shanghai Sh EVN -2826708.6030 4679237.0770 3274667.5510 -1 -1 -1 -1 670 800 720 1500 800 -1 -1
Urumqi Ur EVN 228310.2129 4631922.7656 4367064.0638 -1 -1 -1 300 300 560 250 -1 350 850 -1
Yebes Ys EVN 4848780.1314 -261701.7668 4123035.9350 -1 -1 -1 -1 -1 1400 160 160 200 200 480
Zelenchkaya Zc EVN 3451207.5353 3060375.4139 4391915.0384 -1 -1 -1 300 300 330 400 -1 200 710 -1
JVLA_1 VLA VLBA -1601185.4286 -5041977.1754 3554875.6231 3900 -1 -1 420 420 370 310 310 250 350 560
JVLA_27 Y27 VLBA -1601185.4286 -5041977.1754 3554875.6231 167 -1 -1 17.9 17.9 15.8 13.2 13.2 10.7 15 23.9
Robledo_70 Ro7 EVN 4849336.6927 -360488.7857 4114748.8272 -1 -1 -1 -1 35 20 -1 -1 18 83 -1
Robledo_34 Ro3 EVN 4849336.6927 -360488.7857 4114748.8272 -1 -1 -1 -1 -1 150 -1 -1 106 -1 -1
Arecibo Ar EVN 2390486.9000 -5564731.4400 1994720.4500 12 -1 3 3.5 3 3 5 5 6 -1 -1
Irbene Ir EVN 3183649.615 1276902.735 5359264.576 -1 -1 -1 -1 3600 -1 430 480 1300 -1 -1
Jodrell_Bank Jb2 EVN 3822846.7600 -153802.2800 5086285.9000 -1 -1 -1 350 320 -1 320 300 -1 910 -1
Lovell Jb1 EVN 3822626.0400 -154105.6500 5086486.0400 132 83 -1 36 65 -1 80 -1 -1 -1 -1
Torun Tr EVN 3638558.5100 1221969.7200 5077036.7600 -1 -1 2000 250 300 -1 220 650 -1 500 -1
Westerbork Wb EVN 3828767.2647 442446.1739 5064921.5700 2100 -1 1680 420 560 840 1680 1600 1680 -1 -1
ATCA ATCA LBA -4751639.85972 2791700.35670 -3200491.11339 -1 -1 -1 68 68 106 70 70 86 106 180
Svetloe Sv EVN 2730173.6723 1562442.7934 5529969.1413 -1 -1 -1 360 360 330 250 -1 200 710 -1
Tidbinbilla-70 Td LBA -4460895.2445 2682361.5103 -3674747.5813 -1 -1 -1 -1 23 16 -1 -1 25 -1 60
#Warkworth Ww LBA -5115324.4279 477843.2969 -3767192.8344
#Auscope stations
Cambridge Cm eMERLIN 3920356.1500 2542.0200 5014284.4200 -1 -1 -1 200 175 -1 175 225 -1 720 -1
Darnhall Da eMERLIN 3829087.8990 -169568.9550 5081082.3460 -1 -1 -1 450 450 -1 325 325 -1 720 -1
Defford De eMERLIN 3923442.5660 -146914.3300 5009755.1250 -1 -1 -1 350 350 -1 1000 1600 -1 720 -1
Knockin Kn eMERLIN 3860084.8980 -202105.0390 5056568.8480 -1 -1 -1 425 400 -1 325 325 -1 720 -1
Pickmere Pi eMERLIN 3817549.9560 -163031.1410 5089896.6540 -1 -1 -1 400 450 -1 325 325 -1 720 -1
Ceduna Cd LBA -3753442.7457 3912709.7530 -3348067.6095 -1 -1 -1 1000 1000 400 450 550 600 750 2500
Mopra Mo LBA -4682769.05850 2802619.04217 -3291759.33837 -1 -1 -1 240 240 530 350 350 430 1300 675
Yonsei Ky KVN -3042280.9035 4045902.6564 3867374.3087 -1 -1 -1 -1 -1 -1 -1 -1 -1 1288 1919
Ulsan Ku KVN -3287268.5430 4023450.1448 3687379.9675 -1 -1 -1 -1 -1 -1 -1 -1 -1 1288 1919
Tamna Kt KVN -3171731.5532 4292678.5258 3481038.7679 -1 -1 -1 -1 -1 -1 -1 -1 -1 1288 1919
ASKAP ASKAP Other -2556743.707 5097440.315 -2847749.657 -1 -1 -1 6000 6000 -1 -1 -1 3500 -1 -1
Wettzell Wz EVN 4075627.6441 931774.2773 4801552.3784 -1 -1 -1 -1 -1 1250 -1 -1 750 -1 -1
SKA1_MID SKA Other -2556743.707 5097440.315 -2847749.657 -1 -1 -1 3 3 -1 5 5 5 8 10
Kuntunse Nk Other 6346273.5210 -33779.7127 634844.9454 -1 -1 -1 -1 -1 -1 1200 -1 -1 -1 -1
station code network x y z SEFD-92 SEFD-49 SEFD-30 SEFD-21 SEFD-18 SEFD-13 SEFD-6 SEFD-5 SEFD-3.6 SEFD-1.3 SEFD-0.7 SEFD-0.3 SEFD-0.1
Badary Bd EVN -838201.0685 3865751.5652 4987670.8885 -1 -1 -1 330 330 330 200 -1 200 710 -1 -1 -1
Effelsberg Ef EVN 4033947.2616 486990.7866 4900430.9915 600 600 65 20 19 300 20 25 20 70 200 -1 -1
Brewster Br VLBA -2112065.2062 -3705356.5048 4726813.6759 2742 2744 -1 289 314 347 210 278 327 543 640 -1 -1
Fort_Davis Fd VLBA -1324009.3266 -5332181.9547 3231962.3949 2742 2744 -1 289 314 347 210 278 327 543 640 -1 -1
Green_Bank Gb VLBA 882589.4102 -4924872.3416 3943729.4062 35 24 13 10 10 12 13 13 15 20 30 -1 -1
Hartebeesthoek Hh EVN 5085442.7637 2668263.7913 -2768696.7523 -1 -1 -1 -1 430 410 650 700 630 1800 -1 -1 -1
Hancock Hn VLBA 1446374.8658 -4447939.6774 4322306.1838 2742 2744 -1 289 314 347 210 278 327 543 640 -1 -1
Hobart Ho LBA -3950237.3590 2522347.6804 -4311561.8790 -1 -1 -1 470 470 650 640 640 560 1200 1800 -1 -1
Kitt_Peak Kp VLBA -1995678.8402 -5037317.6968 3357328.0251 2742 2744 -1 289 314 347 210 278 327 543 640 -1 -1
Kunming Km EVN -1281152.8362 5640864.3586 2682653.4434 -1 -1 -1 -1 -1 350 17 17 480 -1 -1 -1 -1
Los_Alamos La VLBA -1449752.5839 -4975298.5757 3709123.8459 2742 2744 -1 289 314 347 210 278 327 543 640 -1 -1
Medicina Mc EVN 4461369.6954 919597.1240 4449559.3812 -1 -1 -1 490 700 400 170 840 320 700 -1 -1 -1
Metsahovi Mh EVN 2892584.8489 1311715.5980 5512640.1545 -1 -1 -1 -1 -1 4500 -1 -1 3200 2608 4500 -1 -1
Mauna_Kea Mk VLBA -5464075.1874 -2495248.1168 2148297.3643 2742 2744 -1 289 314 347 210 278 327 543 640 -1 -1
North_Liberty Nl VLBA -130872.4987 -4762317.0925 4226851.0014 2742 2744 -1 289 314 347 210 278 327 543 640 -1 -1
Noto Nt EVN 4934562.8407 1321201.5428 3806484.7336 -1 -1 -1 820 784 770 260 1100 770 800 900 -1 -1
Onsala On EVN 3370605.8010 711917.7196 5349830.9004 -1 -1 900 350 350 1110 480 850 785 1200 1310 -1 -1
OVRO Ov VLBA -2409150.4018 -4478573.1180 3838617.3385 2742 2744 -1 289 314 347 210 278 327 543 640 -1 -1
Parkes Pa LBA -4554232.4864 2816758.8662 -3454035.0137 -1 -1 -1 40 40 30 110 110 43 370 810 -1 -1
Pie_Town Pt VLBA -1640953.9383 -5014816.0237 3575411.7916 2742 2744 -1 289 314 347 210 278 327 543 640 -1 -1
Sardinia Sr EVN 4865182.7660 791922.6890 4035137.1740 -1 -1 -1 67 67 -1 -1 50 -1 138 -1 -1 -1
St._Croix Sc VLBA 2607848.6379 -5488069.5358 1932739.7326 2742 2744 -1 289 314 347 210 278 327 543 640 -1 -1
Tianma T6 EVN -2826708.6030 4679237.0770 3274667.5510 -1 -1 -1 39000 39000 46 26 26 48 70 120 -1 -1
Shanghai Sh EVN -2826708.6030 4679237.0770 3274667.5510 -1 -1 -1 -1 670 800 720 1500 800 -1 -1 -1 -1
Urumqi Ur EVN 228310.2129 4631922.7656 4367064.0638 -1 -1 -1 300 300 560 250 -1 350 850 -1 -1 -1
Yebes Ys EVN 4848780.1314 -261701.7668 4123035.9350 -1 -1 -1 -1 -1 1400 160 160 200 200 480 -1 -1
Zelenchkaya Zc EVN 3451207.5353 3060375.4139 4391915.0384 -1 -1 -1 300 300 330 400 -1 200 710 -1 -1 -1
JVLA_1 VLA VLBA -1601185.4286 -5041977.1754 3554875.6231 3900 -1 -1 420 420 370 310 310 250 350 560 -1 -1
JVLA_27 Y27 VLBA -1601185.4286 -5041977.1754 3554875.6231 167 -1 -1 17.9 17.9 15.8 13.2 13.2 10.7 15 23.9 -1 -1
Robledo_70 Ro7 EVN 4849336.6927 -360488.7857 4114748.8272 -1 -1 -1 -1 35 20 -1 -1 18 83 -1 -1 -1
Robledo_34 Ro3 EVN 4849336.6927 -360488.7857 4114748.8272 -1 -1 -1 -1 -1 150 -1 -1 106 -1 -1 -1 -1
Arecibo Ar Other 2390486.9000 -5564731.4400 1994720.4500 12 -1 3 3.5 3 3 5 5 6 -1 -1 -1 -1
Irbene Ir EVN 3183649.615 1276902.735 5359264.576 -1 -1 -1 -1 3600 -1 430 480 1300 -1 -1 -1 -1
Jodrell_Bank Jb2 EVN 3822846.7600 -153802.2800 5086285.9000 -1 -1 -1 350 320 -1 320 300 -1 910 -1 -1 -1
Lovell Jb1 EVN 3822626.0400 -154105.6500 5086486.0400 132 83 -1 36 65 -1 80 -1 -1 -1 -1 -1 -1
Torun Tr EVN 3638558.5100 1221969.7200 5077036.7600 -1 -1 2000 250 300 -1 220 650 -1 500 -1 -1 -1
Westerbork Wb EVN 3828767.2647 442446.1739 5064921.5700 2100 -1 1680 420 560 840 1680 1600 1680 -1 -1 -1 -1
ATCA ATCA LBA -4751639.85972 2791700.35670 -3200491.11339 -1 -1 -1 68 68 106 70 70 86 106 180 -1 -1
Svetloe Sv EVN 2730173.6723 1562442.7934 5529969.1413 -1 -1 -1 360 360 330 250 -1 200 710 -1 -1 -1
Tidbinbilla-70 Td LBA -4460895.2445 2682361.5103 -3674747.5813 -1 -1 -1 -1 23 16 -1 -1 25 -1 60 -1 -1
Warkworth Ww LBA -5115324.4279 477843.2969 -3767192.8344 -1 -1 -1 3400 -1 -1 -1 3800 -1 -1 -1 -1 -1
Katherine Ka LBA -4147354.6913 4581542.3772 -1573303.1565 -1 -1 -1 5000 -1 -1 -1 4000 -1 -1 -1 -1 -1
Yarragadee Ya LBA -2388896.1890 5043350.0019 -3078590.8037 -1 -1 -1 4000 -1 -1 -1 3500 -1 -1 -1 -1 -1
Cambridge Cm eMERLIN 3920356.1500 2542.0200 5014284.4200 -1 -1 -1 200 175 -1 175 225 -1 720 -1 -1 -1
Darnhall Da eMERLIN 3829087.8990 -169568.9550 5081082.3460 -1 -1 -1 450 450 -1 325 325 -1 720 -1 -1 -1
Defford De eMERLIN 3923442.5660 -146914.3300 5009755.1250 -1 -1 -1 350 350 -1 1000 1600 -1 720 -1 -1 -1
Knockin Kn eMERLIN 3860084.8980 -202105.0390 5056568.8480 -1 -1 -1 425 400 -1 325 325 -1 720 -1 -1 -1
Pickmere Pi eMERLIN 3817549.9560 -163031.1410 5089896.6540 -1 -1 -1 400 450 -1 325 325 -1 720 -1 -1 -1
Ceduna Cd LBA -3753442.7457 3912709.7530 -3348067.6095 -1 -1 -1 1000 1000 400 450 550 600 750 2500 -1 -1
Mopra Mo LBA -4682769.05850 2802619.04217 -3291759.33837 -1 -1 -1 240 240 530 350 350 430 1300 675 -1 -1
Yonsei Ky KVN -3042280.9035 4045902.6564 3867374.3087 -1 -1 -1 -1 -1 -1 -1 -1 -1 1288 1919 -1 -1
Ulsan Ku KVN -3287268.5430 4023450.1448 3687379.9675 -1 -1 -1 -1 -1 -1 -1 -1 -1 1288 1919 -1 -1
Tamna Kt KVN -3171731.5532 4292678.5258 3481038.7679 -1 -1 -1 -1 -1 -1 -1 -1 -1 1288 1919 -1 -1
ASKAP ASKAP Other -2556743.707 5097440.315 -2847749.657 -1 -1 -1 6000 6000 -1 -1 -1 3500 -1 -1 -1 -1
Wettzell Wz EVN 4075627.6441 931774.2773 4801552.3784 -1 -1 -1 -1 -1 1250 -1 -1 750 -1 -1 -1 -1
SKA1_MID SKA Other -2556743.707 5097440.315 -2847749.657 -1 -1 -1 3 3 -1 -1 -1 -1 -1 - -1 -1
Kuntunse Nk Other 6346273.5210 -33779.7127 634844.9454 -1 -1 -1 -1 -1 -1 1200 -1 -1 -1 -1 -1 -1
FAST Fa Other -1668526.98 5506738.85 2744897.69 8 -1 2 1.95 1.95 -1 -1 -1 -1 -1 -1 -1 -1
Matera Ma Other 4641938.4489 1393003.3339 4133325.7916 -1 -1 -1 -1 -1 1000 -1 -1 1000 -1 -1 -1 -1
Alesund Ny Other 1202462.5055 252734.5174 6237766.2210 -1 -1 -1 -1 -1 850 -1 -1 1255 -1 -1 -1 -1
Pico_Veleta Pv Other 5088967.9000 301681.6000 3825015.8000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 640 1160
P._de_Bure PdB Other 4524000.430 468042.140 4460309.760 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 450 4299
GMRT GMRT Other 1656988.9135 5797576.2281 2073756.22 55 59 53 47 -1 -1 -1 -1 -1 -1 -1 -1 -1
ALMA ALMA Other 2225061.164 -5440057.370 -2481681.151 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 75 85
LMT LMT Other -768715.632 -5988507.072 2063354.852 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1714 3536
SMA SMA Other -1828790.81 -5054428.74 3427884.59 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2374
JCMT JCMT Other -5464559.08 -2492999.13 2150638.19 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 3842
SMT SMT Other -1828790.81 -5054428.74 3427884.59 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9057
APEX APEX Other 2225213.22 -5441629.65 2478102.85 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 4977
South_Pole_T. SPT Other 0.0 0.0 -6359552.31424518 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 7497

2
doc/notes.md

@ -98,7 +98,7 @@ Observation
+ time_smearing() --> u.Quantity
+ datasize() --> u.Quantity
+ thermal_noise() --> u.Quantity
+ get_uv()
+ get_uv() --> dict[baseline-codename]: np.array (lambda units)
<!-- + \_get_baseline_numbers() -->
<!-- + \_get_baseline_number(ant1, ant2) -> int -->

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.

38
src/observation.py

@ -4,6 +4,7 @@ time range and the observing band.
"""
import numpy as np
from scipy.interpolate import griddata
from astropy.time import Time
from astropy import coordinates as coord
from astropy import units as u
@ -305,13 +306,18 @@ class Observation(object):
def get_uv(self):
"""Returns the uvw values for each baseline and each timestamp.
It returns a list with the two antenna codes and the uvw values in meters.
"""Returns the uv values for each baseline and each timestamp when the source
is visible.
It returns a dictionary containing the uv values in lambda units
for each baseline as key.
Complex conjugates are not provided.
"""
bl_uv_up = {}
hourangle = self.target.ra.to(u.hourangle) - self.gstimes
nstat = len(self.stations)
# Determines the xyz of all baselines. Time independent
bl_xyz = np.empty(((nstat*(nstat-1))//2, 3))
bl_names = []
s = [ant.location for ant in self.stations]
for i in range(nstat):
for j in range(i+1, nstat):
@ -319,6 +325,8 @@ class Observation(object):
k = int( i*(nstat-1) - sum(range(i)) + j-i )
bl_xyz[k-1,:] = np.array([ii.value for ii in s[i].to_geocentric()]) - \
np.array([ii.value for ii in s[j].to_geocentric()])
bl_names.append("{}-{}".format(self.stations[i].codename,
self.stations[j].codename))
# Matrix to convert xyz to uvw for each timestamp (w is not considered)
m = np.array([[np.sin(hourangle), np.cos(hourangle), np.zeros(len(hourangle))],
@ -326,5 +334,29 @@ class Observation(object):
np.sin(self.target.dec)*np.sin(hourangle),
np.cos(self.target.dec)*np.ones(len(hourangle))]])
return m @ bl_xyz
bl_uv = np.array([m[:,:,i] @ bl_xyz.T for i in range(m.shape[-1])])
ants_up = self.is_visible()
for i,bl_name in enumerate(bl_names):
ant1, ant2 = bl_name.split('-')
bl_up = (np.array([a for a in ants_up[ant1][0] if a in ants_up[ant2][0]]), )
bl_uv_up[bl_name] = bl_uv[:,:,i][bl_up]/self.wavelength.to(u.m).value
return bl_uv_up
def get_dirtymap(self):
uvdata = self._get_uv()
# Generates a N 2-D array with all uv data.
tot_length = 0
for bl_name in uvdata:
tot_length += uvdata[bl_name].shape[0]
uvvis = np.empty((tot_length, 2))
i = 0
for bl_name in uvdata:
uvvis[i:uvdata[bl_name].shape[0]] = uvdata[bl_name]
i += uvdata[bl_name].shape[0]
scipy.

2
src/stations.py

@ -205,7 +205,7 @@ class Stations(object):
def __getitem__(self, key):
if isinstance(key, int):
return self._stations[self.keys[key]]
return self._stations[self.keys()[key]]
else:
return self._stations[key]

3
test/test.py

@ -34,7 +34,8 @@ obs.inttime = 2
all_stations = fx.get_stations_from_file()
evn6 = fx.stations_with_band(all_stations['EVN'], '6cm') # 19 ants
evn6 = fx.stations_with_band(all_stations, '6cm') # 19 ants
evn6 = stations.Stations('EVN-6cm', [s for s in evn6 if s.network == 'EVN'])
obs.stations = evn6

Loading…
Cancel
Save