xradio 0.0.3__py3-none-any.whl → 0.0.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- xradio/data/_dropbox.py +6 -1
- xradio/image/_util/_casacore/xds_from_casacore.py +36 -27
- xradio/image/_util/_casacore/xds_to_casacore.py +27 -22
- xradio/image/_util/casacore.py +4 -2
- xradio/image/image.py +0 -1
- xradio/vis/_processing_set.py +5 -2
- xradio/vis/convert_msv2_to_processing_set.py +17 -12
- {xradio-0.0.3.dist-info → xradio-0.0.5.dist-info}/METADATA +1 -1
- {xradio-0.0.3.dist-info → xradio-0.0.5.dist-info}/RECORD +12 -12
- {xradio-0.0.3.dist-info → xradio-0.0.5.dist-info}/LICENSE.txt +0 -0
- {xradio-0.0.3.dist-info → xradio-0.0.5.dist-info}/WHEEL +0 -0
- {xradio-0.0.3.dist-info → xradio-0.0.5.dist-info}/top_level.txt +0 -0
xradio/data/_dropbox.py
CHANGED
|
@@ -21,7 +21,12 @@ FILE_ID = {
|
|
|
21
21
|
'rlkey':'l9jdr6tvyq4pe3381gukuly0d&dl'
|
|
22
22
|
},
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
'Antennae_North.cal.lsrk.ms':
|
|
25
|
+
{
|
|
26
|
+
'file':'Antennae_North.cal.lsrk.ms.zip',
|
|
27
|
+
'id':'olx5qv9avdxxiyjlhlwx2',
|
|
28
|
+
'rlkey':'trrqy43rfcqj4blf9robz4p47&dl'
|
|
29
|
+
},
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
def download(file, folder='.'):
|
|
@@ -2,6 +2,7 @@ import astropy
|
|
|
2
2
|
from astropy import units as u
|
|
3
3
|
from casacore import images, quanta, tables
|
|
4
4
|
from casacore.images import coordinates
|
|
5
|
+
import copy
|
|
5
6
|
import dask
|
|
6
7
|
import dask.array as da
|
|
7
8
|
import logging
|
|
@@ -14,7 +15,7 @@ from .common import (
|
|
|
14
15
|
__active_mask, __doppler_types, __native_types, __object_name,
|
|
15
16
|
__pointing_center
|
|
16
17
|
)
|
|
17
|
-
from ..common import __dask_arrayize
|
|
18
|
+
from ..common import __c, __dask_arrayize
|
|
18
19
|
|
|
19
20
|
__image_type = 'image_type'
|
|
20
21
|
|
|
@@ -44,7 +45,7 @@ def __add_dir_lin_attrs(xds, coord_dict, dir_axes):
|
|
|
44
45
|
meta['wcs'] = {}
|
|
45
46
|
meta['wcs']['crval'] = dd['crval'][i]*scale
|
|
46
47
|
meta['wcs']['cdelt'] = dd['cdelt'][i]*scale
|
|
47
|
-
xds[dir_axes[i]].attrs = meta
|
|
48
|
+
xds[dir_axes[i]].attrs = copy.deepcopy(meta)
|
|
48
49
|
break
|
|
49
50
|
elif k.startswith('linear'):
|
|
50
51
|
ld = coord_dict[k]
|
|
@@ -54,7 +55,7 @@ def __add_dir_lin_attrs(xds, coord_dict, dir_axes):
|
|
|
54
55
|
meta['wcs'] = {}
|
|
55
56
|
meta['wcs']['crval'] = ld['crval'][i]
|
|
56
57
|
meta['wcs']['cdelt'] = ld['cdelt'][i]
|
|
57
|
-
xds[dir_axes[i]].attrs = meta
|
|
58
|
+
xds[dir_axes[i]].attrs = copy.deepcopy(meta)
|
|
58
59
|
break
|
|
59
60
|
return xds
|
|
60
61
|
|
|
@@ -65,7 +66,15 @@ def __add_freq_attrs(xds, coord_dict):
|
|
|
65
66
|
for k in coord_dict:
|
|
66
67
|
if k.startswith('spectral'):
|
|
67
68
|
sd = coord_dict[k]
|
|
68
|
-
meta['conversion'] = sd['conversion']
|
|
69
|
+
meta['conversion'] = copy.deepcopy(sd['conversion'])
|
|
70
|
+
for k in ('direction', 'epoch', 'position'):
|
|
71
|
+
del meta['conversion'][k]['type']
|
|
72
|
+
dir_system, equinox = __convert_direction_system(
|
|
73
|
+
meta['conversion']['direction']['refer'], False
|
|
74
|
+
)
|
|
75
|
+
del meta['conversion']['direction']['refer']
|
|
76
|
+
meta['conversion']['direction']['system'] = dir_system
|
|
77
|
+
meta['conversion']['direction']['equinox'] = equinox
|
|
69
78
|
meta['native_type'] = __native_types[sd['nativeType']]
|
|
70
79
|
meta['restfreq'] = sd['restfreq']
|
|
71
80
|
meta['restfreqs'] = sd['restfreqs']
|
|
@@ -84,19 +93,16 @@ def __add_freq_attrs(xds, coord_dict):
|
|
|
84
93
|
'm0': {'unit': 'rad', 'value': 0.0},
|
|
85
94
|
'm1': {'unit': 'rad', 'value': 1.5707963267948966},
|
|
86
95
|
'refer': 'J2000',
|
|
87
|
-
'type': 'direction'
|
|
88
96
|
},
|
|
89
97
|
'epoch': {
|
|
90
98
|
'm0': {'unit': 'd', 'value': 0.0},
|
|
91
99
|
'refer': 'LAST',
|
|
92
|
-
'type': 'epoch'
|
|
93
100
|
},
|
|
94
101
|
'position': {
|
|
95
102
|
'm0': {'unit': 'rad', 'value': 0.0},
|
|
96
103
|
'm1': {'unit': 'rad', 'value': 0.0},
|
|
97
104
|
'm2': {'unit': 'm', 'value': 0.0},
|
|
98
105
|
'refer': 'ITRF',
|
|
99
|
-
'type': 'position'
|
|
100
106
|
},
|
|
101
107
|
'system': 'LSRK'
|
|
102
108
|
},
|
|
@@ -111,7 +117,7 @@ def __add_freq_attrs(xds, coord_dict):
|
|
|
111
117
|
'crval': 1415000000.0,
|
|
112
118
|
}
|
|
113
119
|
}
|
|
114
|
-
freq_coord.attrs = meta
|
|
120
|
+
freq_coord.attrs = copy.deepcopy(meta)
|
|
115
121
|
xds['freq'] = freq_coord
|
|
116
122
|
return xds
|
|
117
123
|
|
|
@@ -156,10 +162,10 @@ def __get_time_format(value:float, unit:str) -> str:
|
|
|
156
162
|
def __add_time_attrs(xds: xr.Dataset, coord_dict: dict) -> xr.Dataset:
|
|
157
163
|
time_coord = xds['time']
|
|
158
164
|
meta = {}
|
|
159
|
-
meta['
|
|
165
|
+
meta['time_scale'] = coord_dict['obsdate']['refer']
|
|
160
166
|
meta['unit'] = coord_dict['obsdate']['m0']['unit']
|
|
161
167
|
meta['format'] = __get_time_format(time_coord[0], meta['unit'])
|
|
162
|
-
time_coord.attrs = meta
|
|
168
|
+
time_coord.attrs = copy.deepcopy(meta)
|
|
163
169
|
xds['time'] = time_coord
|
|
164
170
|
return xds
|
|
165
171
|
|
|
@@ -174,7 +180,7 @@ def __add_vel_attrs(xds, coord_dict):
|
|
|
174
180
|
break
|
|
175
181
|
if not meta:
|
|
176
182
|
meta['doppler_type'] = __doppler_types[0]
|
|
177
|
-
vel_coord.attrs = meta
|
|
183
|
+
vel_coord.attrs = copy.deepcopy(meta)
|
|
178
184
|
xds['vel'] = vel_coord
|
|
179
185
|
return xds
|
|
180
186
|
|
|
@@ -186,7 +192,7 @@ def __casa_image_to_xds_attrs(img_full_path: str, history: bool=True) -> dict:
|
|
|
186
192
|
casa_image = images.image(img_full_path)
|
|
187
193
|
meta_dict = casa_image.info()
|
|
188
194
|
del casa_image
|
|
189
|
-
coord_dict = meta_dict['coordinates']
|
|
195
|
+
coord_dict = copy.deepcopy(meta_dict['coordinates'])
|
|
190
196
|
attrs = {}
|
|
191
197
|
dir_key = None
|
|
192
198
|
for k in coord_dict.keys():
|
|
@@ -239,7 +245,7 @@ def __casa_image_to_xds_attrs(img_full_path: str, history: bool=True) -> dict:
|
|
|
239
245
|
else:
|
|
240
246
|
telescope['position'] = coord_dict[k]
|
|
241
247
|
elif k == 'obsdate':
|
|
242
|
-
obsdate['
|
|
248
|
+
obsdate['time_scale'] = coord_dict[k]['refer']
|
|
243
249
|
obsdate['unit'] = coord_dict[k]['m0']['unit']
|
|
244
250
|
obsdate['value'] = coord_dict[k]['m0']['value']
|
|
245
251
|
obsdate['format'] = __get_time_format(obsdate['value'], obsdate['unit'])
|
|
@@ -272,7 +278,7 @@ def __casa_image_to_xds_attrs(img_full_path: str, history: bool=True) -> dict:
|
|
|
272
278
|
f'Unable to find history table {htable}. '
|
|
273
279
|
'History will not be included'
|
|
274
280
|
)
|
|
275
|
-
return attrs
|
|
281
|
+
return copy.deepcopy(attrs)
|
|
276
282
|
|
|
277
283
|
|
|
278
284
|
def __casa_image_to_xds_metadata(img_full_path:str, verbose:bool=False) -> dict:
|
|
@@ -387,20 +393,24 @@ def __convert_beam_to_rad(beam: dict) -> dict:
|
|
|
387
393
|
return mybeam
|
|
388
394
|
|
|
389
395
|
|
|
390
|
-
def __convert_direction_system(
|
|
396
|
+
def __convert_direction_system(
|
|
397
|
+
casa_system:str, which:str, verbose:bool=True
|
|
398
|
+
) -> tuple:
|
|
391
399
|
if casa_system == 'J2000':
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
400
|
+
if verbose:
|
|
401
|
+
logging.info(
|
|
402
|
+
f'J2000 found as {which} reference frame in CASA image '
|
|
403
|
+
'This corresponds to FK5(equinox="J2000") in astropy. '
|
|
404
|
+
'Metadata will be written appropriately'
|
|
405
|
+
)
|
|
397
406
|
return ('FK5', 'J2000')
|
|
398
407
|
elif casa_system == 'B1950':
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
408
|
+
if verbose:
|
|
409
|
+
logging.info(
|
|
410
|
+
f'B1950 found as {which} reference frame in CASA image '
|
|
411
|
+
'This corresponds to FK4(equinox="B1950") in astropy. '
|
|
412
|
+
'Metadata will be written appropriately'
|
|
413
|
+
)
|
|
404
414
|
return ('FK4', 'B1950')
|
|
405
415
|
elif casa_system in ('GALACTIC', 'ICRS'):
|
|
406
416
|
return (casa_system, None)
|
|
@@ -734,9 +744,8 @@ def __get_velocity_values(coord_dict: dict, freq_values: list) -> list:
|
|
|
734
744
|
if k.startswith('spectral'):
|
|
735
745
|
restfreq = coord_dict[k]['restfreq']
|
|
736
746
|
break
|
|
737
|
-
c = 2.99792458e+08
|
|
738
747
|
# doppler type = RADIO definition
|
|
739
|
-
return [ (1 - f/restfreq)*
|
|
748
|
+
return [ ((1 - f/restfreq)*__c).value for f in freq_values ]
|
|
740
749
|
|
|
741
750
|
|
|
742
751
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import astropy
|
|
2
2
|
from astropy.coordinates import Angle, SkyCoord
|
|
3
3
|
from casacore import tables
|
|
4
|
+
import copy
|
|
4
5
|
import numpy as np
|
|
5
6
|
import os
|
|
6
7
|
import xarray as xr
|
|
@@ -76,31 +77,33 @@ def __compute_spectral_dict(
|
|
|
76
77
|
for a CASA image coordinate system
|
|
77
78
|
"""
|
|
78
79
|
spec = {}
|
|
79
|
-
spec_conv =
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
spec_conv = copy.deepcopy(xds.freq.attrs['conversion'])
|
|
81
|
+
for k in ('direction', 'epoch', 'position'):
|
|
82
|
+
spec_conv[k]['type'] = k
|
|
83
|
+
spec_conv['direction']['refer'] = spec_conv['direction']['system']
|
|
84
|
+
del spec_conv['direction']['system']
|
|
85
|
+
if (
|
|
86
|
+
spec_conv['direction']['refer'] == 'FK5'
|
|
87
|
+
and spec_conv['direction']['equinox'] == 'J2000'
|
|
88
|
+
):
|
|
89
|
+
spec_conv['direction']['refer'] = 'J2000'
|
|
90
|
+
del spec_conv['direction']['equinox']
|
|
88
91
|
spec['conversion'] = spec_conv
|
|
89
92
|
spec['formatUnit'] = ''
|
|
90
|
-
spec['name']
|
|
93
|
+
spec['name'] = 'Frequency'
|
|
91
94
|
spec['nativeType'] = __native_types.index(xds.freq.attrs['native_type'])
|
|
92
95
|
spec['restfreq'] = xds.freq.attrs['restfreq']
|
|
93
|
-
spec['
|
|
96
|
+
spec['restfreqs'] = copy.deepcopy(xds.freq.attrs['restfreqs'])
|
|
94
97
|
spec['system'] = xds.freq.attrs['system']
|
|
95
98
|
spec['unit'] = xds.freq.attrs['unit']
|
|
96
99
|
spec['velType'] = __doppler_types.index(xds.vel.attrs['doppler_type'])
|
|
97
100
|
spec['velUnit'] = xds.vel.attrs['unit']
|
|
98
101
|
spec['version'] = 2
|
|
99
102
|
spec['waveUnit'] = xds.freq.attrs['wave_unit']
|
|
100
|
-
spec_wcs = xds.freq.attrs['wcs']
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
spec_wcs = copy.deepcopy(xds.freq.attrs['wcs'])
|
|
104
|
+
spec_wcs['ctype'] = 'FREQ'
|
|
105
|
+
spec_wcs['pc'] = 1.0
|
|
106
|
+
spec_wcs['crpix'] = (spec_wcs['crval'] - xds.freq.values[0])/spec_wcs['cdelt']
|
|
104
107
|
spec['wcs'] = spec_wcs
|
|
105
108
|
return spec
|
|
106
109
|
|
|
@@ -110,10 +113,12 @@ def __coord_dict_from_xds(xds: xr.Dataset) -> dict:
|
|
|
110
113
|
coord['telescope'] = xds.attrs['telescope']['name']
|
|
111
114
|
coord['observer'] = xds.attrs['observer']
|
|
112
115
|
obsdate = {}
|
|
113
|
-
obsdate['refer'] = xds.time.attrs['
|
|
114
|
-
obsdate['
|
|
115
|
-
obsdate['
|
|
116
|
-
obsdate['
|
|
116
|
+
obsdate['refer'] = xds.coords['time'].attrs['time_scale']
|
|
117
|
+
obsdate['type'] = 'epoch'
|
|
118
|
+
obsdate['m0'] = {}
|
|
119
|
+
obsdate['m0']['unit'] = xds.coords['time'].attrs['unit']
|
|
120
|
+
obsdate['m0']['value'] = xds.coords['time'].values[0]
|
|
121
|
+
#obsdate['format'] = xds.time.attrs['format']
|
|
117
122
|
coord['obsdate'] = obsdate
|
|
118
123
|
coord['pointingcenter'] = xds.attrs[__pointing_center].copy()
|
|
119
124
|
coord['telescopeposition'] = xds.attrs['telescope']['position'].copy()
|
|
@@ -132,9 +137,9 @@ def __coord_dict_from_xds(xds: xr.Dataset) -> dict:
|
|
|
132
137
|
coord['pixelreplace0'] = np.array([0., 0.])
|
|
133
138
|
coord['pixelreplace1'] = np.array([0.])
|
|
134
139
|
coord['pixelreplace2'] = np.array([0.])
|
|
135
|
-
coord['worldmap0'] = np.array([0, 1])
|
|
136
|
-
coord['worldmap1'] = np.array([2])
|
|
137
|
-
coord['worldmap2'] = np.array([3])
|
|
140
|
+
coord['worldmap0'] = np.array([0, 1], dtype=np.int32)
|
|
141
|
+
coord['worldmap1'] = np.array([2], dtype=np.int32)
|
|
142
|
+
coord['worldmap2'] = np.array([3], dtype=np.int32)
|
|
138
143
|
coord['worldreplace0'] = coord['direction0']['crval']
|
|
139
144
|
coord['worldreplace1'] = np.array(coord['stokes1']['crval'])
|
|
140
145
|
coord['worldreplace2'] = np.array([xds.freq.attrs['wcs']['crval']])
|
xradio/image/_util/casacore.py
CHANGED
|
@@ -112,7 +112,9 @@ def __xds_to_casa_image(xds: xr.Dataset, imagename:str) -> None:
|
|
|
112
112
|
raise Exception('XDS can only be converted if it has exactly one time plane')
|
|
113
113
|
arr = xds[sky_ap].isel(time=0).transpose(*('freq', 'pol', 'm', 'l'))
|
|
114
114
|
image_full_path = os.path.expanduser(imagename)
|
|
115
|
-
maskname =
|
|
115
|
+
maskname = ''
|
|
116
|
+
if __active_mask in xds.attrs and xds.attrs[__active_mask]:
|
|
117
|
+
maskname = xds.attrs[__active_mask]
|
|
116
118
|
# create the image and then delete the object
|
|
117
119
|
casa_image = images.image(image_full_path, maskname=maskname, shape=arr.shape)
|
|
118
120
|
del casa_image
|
|
@@ -130,7 +132,7 @@ def __xds_to_casa_image(xds: xr.Dataset, imagename:str) -> None:
|
|
|
130
132
|
image_full_path, readonly=False, lockoptions={'option': 'permanentwait'},
|
|
131
133
|
ack=False
|
|
132
134
|
)
|
|
133
|
-
tb.putkeyword('
|
|
135
|
+
tb.putkeyword('coords', coord)
|
|
134
136
|
tb.putkeyword('imageinfo', ii)
|
|
135
137
|
if units:
|
|
136
138
|
tb.putkeyword('units', units)
|
xradio/image/image.py
CHANGED
|
@@ -76,7 +76,6 @@ def read_image(infile:str, chunks:dict={}, verbose:bool=False) -> xr.Dataset:
|
|
|
76
76
|
do_casa = False
|
|
77
77
|
if do_casa:
|
|
78
78
|
try:
|
|
79
|
-
# return __read_casa_image(infile, chunks, masks, history, verbose)
|
|
80
79
|
return __read_casa_image(infile, chunks, verbose=verbose)
|
|
81
80
|
except Exception as e:
|
|
82
81
|
emsgs.append(f'image format appears not to be casacore: {e.args}')
|
xradio/vis/_processing_set.py
CHANGED
|
@@ -6,11 +6,14 @@ class _processing_set(dict):
|
|
|
6
6
|
super().__init__(*args, **kwargs)
|
|
7
7
|
|
|
8
8
|
def summary(self):
|
|
9
|
-
summary_data = {"name": [], "intent": [], "field_name": [], "
|
|
9
|
+
summary_data = {"name": [], "ddi": [], "intent": [], "field_id": [], "field_name": [], "start_frequency": [], "end_frequency": []}
|
|
10
10
|
for key, value in self.items():
|
|
11
11
|
summary_data["name"].append(key)
|
|
12
|
+
summary_data["ddi"].append(value.attrs["ddi"])
|
|
12
13
|
summary_data["intent"].append(value.attrs["intent"])
|
|
14
|
+
summary_data["field_id"].append(value.attrs["field_info"]["field_id"])
|
|
13
15
|
summary_data["field_name"].append(value.attrs["field_info"]["name"])
|
|
14
|
-
summary_data["
|
|
16
|
+
summary_data["start_frequency"].append(value["frequency"].values[0])
|
|
17
|
+
summary_data["end_frequency"].append(value["frequency"].values[-1])
|
|
15
18
|
summary_df = pd.DataFrame(summary_data)
|
|
16
19
|
return summary_df
|
|
@@ -205,19 +205,20 @@ def create_coordinates(
|
|
|
205
205
|
measures_freq_ref
|
|
206
206
|
]
|
|
207
207
|
xds.frequency.attrs["spectral_window_name"] = str(spw_xds.name.values)
|
|
208
|
-
xds.frequency.attrs["reference_frequency"] = float(spw_xds.ref_frequency.values)
|
|
208
|
+
xds.frequency.attrs["reference_frequency"] = {"dims":"", "data":float(spw_xds.ref_frequency.values), "attrs":{"type":"spectral_coord","units":"Hz","velocity_frame":xds.frequency.attrs["velocity_frame"]}}
|
|
209
209
|
xds.frequency.attrs["effective_channel_width"] = "EFFECTIVE_CHANNEL_WIDTH"
|
|
210
210
|
# Add if doppler table is present
|
|
211
211
|
# xds.frequency.attrs["doppler_velocity"] =
|
|
212
212
|
# xds.frequency.attrs["doppler_type"] =
|
|
213
213
|
|
|
214
|
-
|
|
214
|
+
unique_chan_width = np.unique(spw_xds.chan_width.data[np.logical_not(np.isnan(spw_xds.chan_width.data))])
|
|
215
215
|
# print('unique_chan_width',unique_chan_width)
|
|
216
216
|
# print('spw_xds.chan_width.data',spw_xds.chan_width.data)
|
|
217
|
-
#
|
|
218
|
-
xds.frequency.attrs["channel_width"] = spw_xds.chan_width.data[
|
|
219
|
-
|
|
220
|
-
] # unique_chan_width[0]
|
|
217
|
+
#assert len(unique_chan_width) == 1, "Channel width varies for spw."
|
|
218
|
+
#xds.frequency.attrs["channel_width"] = spw_xds.chan_width.data[
|
|
219
|
+
# ~(np.isnan(spw_xds.chan_width.data))
|
|
220
|
+
#] # unique_chan_width[0]
|
|
221
|
+
xds.frequency.attrs["channel_width"] = {"dims":"", "data":np.abs(unique_chan_width[0]), "attrs":{"type":"quanta","units":"Hz"}} #Should always be increasing (ordering is fixed before saving).
|
|
221
222
|
|
|
222
223
|
main_table_attrs = extract_table_attributes(infile)
|
|
223
224
|
xds.time.attrs["type"] = "time"
|
|
@@ -230,7 +231,7 @@ def create_coordinates(
|
|
|
230
231
|
xds.time.attrs[
|
|
231
232
|
"format"
|
|
232
233
|
] = "unix" # Time gets converted to unix in xradio.vis._vis_utils._ms._tables.read.convert_casacore_time
|
|
233
|
-
xds.time.attrs["integration_time"] = interval
|
|
234
|
+
xds.time.attrs["integration_time"] = {"dims":"", "data":interval, "attrs":{"type":"quanta","units":"s"}}
|
|
234
235
|
xds.time.attrs["effective_integration_time"] = "EFFECTIVE_INTEGRATION_TIME"
|
|
235
236
|
|
|
236
237
|
return xds
|
|
@@ -406,15 +407,18 @@ def convert_and_write_partition(
|
|
|
406
407
|
"FIELD",
|
|
407
408
|
rename_ids=subt_rename_ids["FIELD"],
|
|
408
409
|
)
|
|
410
|
+
|
|
411
|
+
delay_dir = {"dims":"", "data":list(field_xds["delay_dir"].data[field_id, 0, :]), "attrs": {"units": "rad", "type":"sky_coord", "reference_frame":"FK5", "description":"Direction of delay center in right ascension and declination."}}
|
|
412
|
+
phase_dir = {"dims":"", "data":list(field_xds["phase_dir"].data[field_id, 0, :]), "attrs": {"units": "rad", "type":"sky_coord", "reference_frame":"FK5", "description":"Direction of phase center in right ascension and declination."}}
|
|
413
|
+
reference_dir = {"dims":"", "data":list(field_xds["delay_dir"].data[field_id, 0, :]), "attrs": {"units": "rad", "type":"sky_coord", "reference_frame":"FK5","description":"Direction of reference direction in right ascension and declination. Used in single-dish to record the associated reference direction if position-switching has already been applied. For interferometric data, this is the original correlated field center, and may equal delay_direction or phase_direction."}}
|
|
409
414
|
|
|
410
415
|
field_info = {
|
|
411
416
|
"name": field_xds["name"].data[field_id],
|
|
412
417
|
"code": field_xds["code"].data[field_id],
|
|
413
|
-
"
|
|
414
|
-
"
|
|
415
|
-
"
|
|
416
|
-
"
|
|
417
|
-
"reference_dir": list(field_xds["reference_dir"].data[field_id, 0, :]),
|
|
418
|
+
"delay_direction": delay_dir,
|
|
419
|
+
"phase_direction": phase_dir,
|
|
420
|
+
"reference_direction": reference_dir,
|
|
421
|
+
"field_id": field_id
|
|
418
422
|
}
|
|
419
423
|
xds.attrs["field_info"] = field_info
|
|
420
424
|
|
|
@@ -442,6 +446,7 @@ def convert_and_write_partition(
|
|
|
442
446
|
del ant_xds.attrs["other"]
|
|
443
447
|
|
|
444
448
|
xds.attrs["intent"] = intent
|
|
449
|
+
xds.attrs["ddi"] = ddi
|
|
445
450
|
|
|
446
451
|
#Time and frequency should always be increasing
|
|
447
452
|
if xds.frequency[1]-xds.frequency[0] < 0:
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
xradio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
xradio/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
xradio/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
xradio/data/_dropbox.py,sha256=
|
|
4
|
+
xradio/data/_dropbox.py,sha256=C749TtLFuqEExph4H8HhNYdPSzWzIpBrnUB7tLkZQ5o,1803
|
|
5
5
|
xradio/data/_google_drive.py,sha256=GA3XabwzvA9lBGcHteHYQJhW8pbAXGhMCQBiNeWPphY,4340
|
|
6
6
|
xradio/data/datasets.py,sha256=rBsum83Qe9v_SIRsD0Ym9roz0dyVKKZrysRXezwkDho,457
|
|
7
7
|
xradio/image/__init__.py,sha256=ZhTma3aF9LgC6bEc2Y36QmH7AhfjAAQyVrEfA6JAxsg,303
|
|
8
|
-
xradio/image/image.py,sha256=
|
|
9
|
-
xradio/image/_util/casacore.py,sha256=
|
|
8
|
+
xradio/image/image.py,sha256=T_zZ0lY0ZHyB75Of6H07eehjo1j_TFU2IgY4s95nroE,8242
|
|
9
|
+
xradio/image/_util/casacore.py,sha256=5d6HwEFTObUa8DchRON03hcz8hoo5g8h7FXAjmITUks,5777
|
|
10
10
|
xradio/image/_util/common.py,sha256=f-PvBAHhPenVOZYRVhYf3pwItecYVHjNsATlaitNU90,1614
|
|
11
11
|
xradio/image/_util/fits.py,sha256=PSVgeFCvyvUvrgsXQyj-AaP6OKDU2gWo2x5An4Aik_c,1106
|
|
12
12
|
xradio/image/_util/image_factory.py,sha256=0XEgtO8MDCiXhqQvO-WkHExPHNoyQG4uU5JxKpVLqsA,4932
|
|
13
13
|
xradio/image/_util/zarr.py,sha256=HAmQzvukFGltlMdJhbKRkZhfRYxtX1aPpVKiwQaERtw,454
|
|
14
14
|
xradio/image/_util/_casacore/__init__.py,sha256=AzU22a8tVAbxO7EAYfE8M3Xn8217YANKiXYtPkewM20,42
|
|
15
15
|
xradio/image/_util/_casacore/common.py,sha256=m2MKjM7aZ-gXvGLl7HzyN8KqoVUyiv_GyTDN-DIyg98,224
|
|
16
|
-
xradio/image/_util/_casacore/xds_from_casacore.py,sha256=
|
|
17
|
-
xradio/image/_util/_casacore/xds_to_casacore.py,sha256=
|
|
16
|
+
xradio/image/_util/_casacore/xds_from_casacore.py,sha256=ByadUH6fPLvhvlXGJpvS6fgdO-bHfxEJZJudWi4URmQ,39661
|
|
17
|
+
xradio/image/_util/_casacore/xds_to_casacore.py,sha256=BEe8U2Awbe3YXEQIYKuCTdOXz2FGNNnsFE7JWFgB20M,11113
|
|
18
18
|
xradio/image/_util/_fits/fits_to_xds.py,sha256=x_ZNCu2FLDkZnp4aMbZaQBOKnKZ4LI6SGgD63JLPRjI,11132
|
|
19
19
|
xradio/image/_util/_zarr/common.py,sha256=rCntE2QrGMseMJ7DsuWnbNk9kuvCgFFJXMyIzzedo0U,349
|
|
20
20
|
xradio/image/_util/_zarr/xds_from_zarr.py,sha256=Es97yMB74SY2D_ecY8c_y6M4Vm7eqmvofWWyWe_btUE,1697
|
|
21
21
|
xradio/image/_util/_zarr/xds_to_zarr.py,sha256=Sh2RbvKHLJx3vOVzDcrurNE215YWbKP1NFGM7zuQFRA,1642
|
|
22
22
|
xradio/vis/__init__.py,sha256=u5CAJpknYDspPF_50istwz70FHSNc3eL8J76ndwgYZo,111
|
|
23
|
-
xradio/vis/_processing_set.py,sha256=
|
|
24
|
-
xradio/vis/convert_msv2_to_processing_set.py,sha256=
|
|
23
|
+
xradio/vis/_processing_set.py,sha256=dpZbhGDvq4EQFBp5-XgUFJ48MYF897_21Xw77UF0SmE,905
|
|
24
|
+
xradio/vis/convert_msv2_to_processing_set.py,sha256=YBgcUXDtL5Auvw8oe2vrg4vUu72MGsljpH49fTwcb_8,20764
|
|
25
25
|
xradio/vis/load_processing_set.py,sha256=HXQEjfZThK85sVhwp1JxxUTl1LqedZgAXQFyf9i5Wuw,4505
|
|
26
26
|
xradio/vis/read_processing_set.py,sha256=E4nIWGz3fDkoOaF1uG09OcmstEN11Do3ekGIHONn2ac,688
|
|
27
27
|
xradio/vis/vis_io.py,sha256=5b0htEaaAJ1XFJcR2HSNgQmxmmJNW-znrku7-QuPdSo,6022
|
|
@@ -49,8 +49,8 @@ xradio/vis/_vis_utils/_utils/stokes_types.py,sha256=rMX7BQFbGFfT6oP54qTit4q16JRA
|
|
|
49
49
|
xradio/vis/_vis_utils/_utils/xds_helper.py,sha256=xrS46H7INWTxiuo2zN_a2wOaTr6irbVlkv1efjm7YxY,11853
|
|
50
50
|
xradio/vis/_vis_utils/_zarr/read.py,sha256=fxznKzP0G8YFjkyMxg04PMI3Mtnu1mMjSnvEhY2arIU,7834
|
|
51
51
|
xradio/vis/_vis_utils/_zarr/write.py,sha256=fnu9xh_AZ4OfoOGHsMnCpVEZ_2UiZGP7qXhlqZesCCs,9585
|
|
52
|
-
xradio-0.0.
|
|
53
|
-
xradio-0.0.
|
|
54
|
-
xradio-0.0.
|
|
55
|
-
xradio-0.0.
|
|
56
|
-
xradio-0.0.
|
|
52
|
+
xradio-0.0.5.dist-info/LICENSE.txt,sha256=dvACd-5O67yjSZlnEKcWmu3DqwzBtbC922iPv0KOeAw,1516
|
|
53
|
+
xradio-0.0.5.dist-info/METADATA,sha256=zs0uCEuxHGf60CmklFGqASlAmxu5GfghrNWhfgNNjH8,4000
|
|
54
|
+
xradio-0.0.5.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
55
|
+
xradio-0.0.5.dist-info/top_level.txt,sha256=dQu27fGBZJ2Yk-gW5XeD-dZ76Xa4Xcvk60Vz-dwXp7k,7
|
|
56
|
+
xradio-0.0.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|