xradio 0.0.40__py3-none-any.whl → 0.0.42__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/_utils/coord_math.py +100 -0
- xradio/_utils/list_and_array.py +49 -4
- xradio/_utils/schema.py +36 -16
- xradio/image/_util/_casacore/xds_from_casacore.py +5 -5
- xradio/image/_util/_casacore/xds_to_casacore.py +12 -11
- xradio/image/_util/_fits/xds_from_fits.py +18 -17
- xradio/image/_util/_zarr/zarr_low_level.py +29 -12
- xradio/image/_util/common.py +1 -1
- xradio/image/_util/image_factory.py +1 -1
- xradio/measurement_set/__init__.py +18 -0
- xradio/measurement_set/_utils/__init__.py +5 -0
- xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/_tables/load_main_table.py +1 -1
- xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/_tables/read.py +15 -1
- xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/conversion.py +186 -84
- xradio/measurement_set/_utils/_msv2/create_antenna_xds.py +535 -0
- xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/create_field_and_source_xds.py +146 -58
- xradio/measurement_set/_utils/_msv2/msv4_info_dicts.py +203 -0
- xradio/measurement_set/_utils/_msv2/msv4_sub_xdss.py +550 -0
- xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/subtables.py +1 -1
- xradio/{vis/_vis_utils → measurement_set/_utils}/_utils/xds_helper.py +1 -1
- xradio/{vis/_vis_utils/ms.py → measurement_set/_utils/msv2.py} +4 -4
- xradio/{vis/_vis_utils → measurement_set/_utils}/zarr.py +3 -3
- xradio/{vis → measurement_set}/convert_msv2_to_processing_set.py +9 -2
- xradio/{vis → measurement_set}/load_processing_set.py +16 -20
- xradio/measurement_set/measurement_set_xds.py +83 -0
- xradio/{vis/read_processing_set.py → measurement_set/open_processing_set.py} +25 -34
- xradio/measurement_set/processing_set.py +777 -0
- xradio/measurement_set/schema.py +1979 -0
- xradio/schema/check.py +42 -22
- xradio/schema/dataclass.py +56 -6
- xradio/sphinx/__init__.py +12 -0
- xradio/sphinx/schema_table.py +351 -0
- {xradio-0.0.40.dist-info → xradio-0.0.42.dist-info}/METADATA +17 -15
- xradio-0.0.42.dist-info/RECORD +76 -0
- {xradio-0.0.40.dist-info → xradio-0.0.42.dist-info}/WHEEL +1 -1
- xradio/_utils/common.py +0 -101
- xradio/vis/__init__.py +0 -14
- xradio/vis/_processing_set.py +0 -302
- xradio/vis/_vis_utils/__init__.py +0 -5
- xradio/vis/_vis_utils/_ms/create_antenna_xds.py +0 -482
- xradio/vis/_vis_utils/_ms/msv4_infos.py +0 -0
- xradio/vis/_vis_utils/_ms/msv4_sub_xdss.py +0 -306
- xradio/vis/schema.py +0 -1102
- xradio-0.0.40.dist-info/RECORD +0 -73
- /xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/_tables/load.py +0 -0
- /xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/_tables/read_main_table.py +0 -0
- /xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/_tables/read_subtables.py +0 -0
- /xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/_tables/table_query.py +0 -0
- /xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/_tables/write.py +0 -0
- /xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/_tables/write_exp_api.py +0 -0
- /xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/chunks.py +0 -0
- /xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/descr.py +0 -0
- /xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/msv2_msv3.py +0 -0
- /xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/msv2_to_msv4_meta.py +0 -0
- /xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/optimised_functions.py +0 -0
- /xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/partition_queries.py +0 -0
- /xradio/{vis/_vis_utils/_ms → measurement_set/_utils/_msv2}/partitions.py +0 -0
- /xradio/{vis/_vis_utils → measurement_set/_utils}/_utils/cds.py +0 -0
- /xradio/{vis/_vis_utils → measurement_set/_utils}/_utils/partition_attrs.py +0 -0
- /xradio/{vis/_vis_utils → measurement_set/_utils}/_utils/stokes_types.py +0 -0
- /xradio/{vis/_vis_utils → measurement_set/_utils}/_zarr/encoding.py +0 -0
- /xradio/{vis/_vis_utils → measurement_set/_utils}/_zarr/read.py +0 -0
- /xradio/{vis/_vis_utils → measurement_set/_utils}/_zarr/write.py +0 -0
- {xradio-0.0.40.dist-info → xradio-0.0.42.dist-info}/LICENSE.txt +0 -0
- {xradio-0.0.40.dist-info → xradio-0.0.42.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,1979 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Literal, Optional, Union, List
|
|
4
|
+
from xradio.schema.bases import (
|
|
5
|
+
xarray_dataset_schema,
|
|
6
|
+
xarray_dataarray_schema,
|
|
7
|
+
dict_schema,
|
|
8
|
+
)
|
|
9
|
+
from xradio.schema.typing import Attr, Coord, Coordof, Data, Dataof, Name
|
|
10
|
+
import numpy
|
|
11
|
+
|
|
12
|
+
# Dimensions
|
|
13
|
+
Time = Literal["time"]
|
|
14
|
+
""" Observation time dimension """
|
|
15
|
+
TimeCal = Literal["time_cal"]
|
|
16
|
+
""" time dimension of system calibration (when not interpolated to main time)"""
|
|
17
|
+
TimeEphemeris = Literal["time_ephemeris"]
|
|
18
|
+
""" time dimension of ephemeris data (when not interpolated to main time) """
|
|
19
|
+
TimePhaseCal = Literal["time_phase_cal"]
|
|
20
|
+
""" Coordinate label for VLBI-specific phase cal time axis """
|
|
21
|
+
TimePointing = Literal["time_pointing"]
|
|
22
|
+
""" time dimension of pointing dataset (when not interpolated to main time) """
|
|
23
|
+
TimeWeather = Literal["time_weather"]
|
|
24
|
+
""" time dimension of weather dataset (when not interpolated to main time) """
|
|
25
|
+
AntennaName = Literal["antenna_name"]
|
|
26
|
+
""" Antenna name dimension """
|
|
27
|
+
StationName = Literal["station_name"]
|
|
28
|
+
""" Station identifier dimension """
|
|
29
|
+
ReceptorLabel = Literal["receptor_label"]
|
|
30
|
+
""" Receptor label dimension """
|
|
31
|
+
ToneLabel = Literal["tone_label"]
|
|
32
|
+
""" Tone label dimension """
|
|
33
|
+
BaselineId = Literal["baseline_id"]
|
|
34
|
+
""" Baseline ID dimension """
|
|
35
|
+
Frequency = Literal["frequency"]
|
|
36
|
+
""" Frequency dimension """
|
|
37
|
+
FrequencyCal = Literal["frequency_cal"]
|
|
38
|
+
""" Frequency dimension in the system calibration dataset """
|
|
39
|
+
Polarization = Literal["polarization"]
|
|
40
|
+
""" Polarization dimension """
|
|
41
|
+
UvwLabel = Literal["uvw_label"]
|
|
42
|
+
""" Coordinate dimension of UVW data (typically shape 3 for 'u', 'v', 'w') """
|
|
43
|
+
SkyDirLabel = Literal["sky_dir_label"]
|
|
44
|
+
""" Coordinate labels of sky directions (typically shape 2 and 'ra', 'dec') """
|
|
45
|
+
LocalSkyDirLabel = Literal["local_sky_dir_label"]
|
|
46
|
+
""" Coordinate labels of local sky directions (typically shape 2 and 'az', 'alt') """
|
|
47
|
+
SphericalDirLabel = Literal["spherical_dir_label"]
|
|
48
|
+
""" Coordinate labels of spherical directions (shape 2 and 'lon', 'lat1' """
|
|
49
|
+
SkyPosLabel = Literal["sky_pos_label"]
|
|
50
|
+
""" Coordinate labels of sky positions (typically shape 3 and 'ra', 'dec', 'dist') """
|
|
51
|
+
SphericalPosLabel = Literal["spherical_pos_label"]
|
|
52
|
+
""" Coordinate labels of spherical positions (shape shape 3 and 'lon', 'lat1', 'dist2') """
|
|
53
|
+
EllipsoidPosLabel = Literal["ellipsoid_pos_label"]
|
|
54
|
+
""" Coordinate labels of geodetic earth location data (typically shape 3 and 'lon', 'lat', 'height')"""
|
|
55
|
+
CartesianPosLabel = Literal["cartesian_pos_label"]
|
|
56
|
+
""" Coordinate labels of geocentric earth location data (typically shape 3 and 'x', 'y', 'z')"""
|
|
57
|
+
nPolynomial = Literal["n_polynomial"]
|
|
58
|
+
""" For data that is represented as variable in time using Taylor expansion """
|
|
59
|
+
PolyTerm = Literal["poly_term"]
|
|
60
|
+
""" Polynomial term used in VLBI GAIN_CURVE """
|
|
61
|
+
LineLabel = Literal["line_label"]
|
|
62
|
+
""" Line labels (for line names and variables). """
|
|
63
|
+
|
|
64
|
+
# Represents "no dimension", i.e. used for coordinates and data variables with
|
|
65
|
+
# zero dimensions.
|
|
66
|
+
ZD = tuple[()]
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
# Types of quantity and measures
|
|
70
|
+
Quantity = Literal["quantity"]
|
|
71
|
+
SkyCoord = Literal["sky_coord"]
|
|
72
|
+
SpectralCoord = Literal["spectral_coord"]
|
|
73
|
+
Location = Literal["location"]
|
|
74
|
+
Doppler = Literal["doppler"]
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
# Units of quantities and measures
|
|
78
|
+
UnitsSeconds = list[Literal["s"]]
|
|
79
|
+
UnitsHertz = list[Literal["Hz"]]
|
|
80
|
+
UnitsMeters = list[Literal["m"]]
|
|
81
|
+
|
|
82
|
+
UnitsOfSkyCoordInRadians = list[Literal["rad"], Literal["rad"]]
|
|
83
|
+
UnitsOfLocationInMetersOrRadians = Union[
|
|
84
|
+
list[Literal["m"], Literal["m"], Literal["m"]],
|
|
85
|
+
list[Literal["rad"], Literal["rad"], Literal["m"]],
|
|
86
|
+
]
|
|
87
|
+
UnitsOfPositionInRadians = list[Literal["rad"], Literal["rad"], Literal["m"]]
|
|
88
|
+
UnitsOfDopplerShift = Union[list[Literal["ratio"]], list[Literal["m/s"]]]
|
|
89
|
+
|
|
90
|
+
UnitsRadians = list[Literal["rad"]]
|
|
91
|
+
UnitsKelvin = list[Literal["K"]]
|
|
92
|
+
UnitsKelvinPerJansky = list[Literal["K/Jy"]]
|
|
93
|
+
UnitsMetersPerSecond = list[Literal["m/s"]]
|
|
94
|
+
UnitsPascal = list[Literal["Pa"]] # hPa? (in MSv2)
|
|
95
|
+
UnitsPerSquareMeters = list[Literal["/m^2"]]
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
# Quantities
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
@xarray_dataarray_schema
|
|
102
|
+
class QuantityInSecondsArray:
|
|
103
|
+
"""
|
|
104
|
+
Quantity with units of seconds
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
data: Data[ZD, float]
|
|
108
|
+
|
|
109
|
+
units: Attr[UnitsSeconds]
|
|
110
|
+
type: Attr[Quantity] = "quantity"
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
@xarray_dataarray_schema
|
|
114
|
+
class QuantityInHertzArray:
|
|
115
|
+
"""
|
|
116
|
+
Quantity with units of Hertz
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
data: Data[ZD, float]
|
|
120
|
+
|
|
121
|
+
units: Attr[UnitsHertz]
|
|
122
|
+
type: Attr[Quantity] = "quantity"
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
@xarray_dataarray_schema
|
|
126
|
+
class QuantityInMetersArray:
|
|
127
|
+
"""
|
|
128
|
+
Quantity with units of Hertz
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
data: Data[ZD, float]
|
|
132
|
+
|
|
133
|
+
units: Attr[UnitsMeters]
|
|
134
|
+
type: Attr[Quantity] = "quantity"
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
@xarray_dataarray_schema
|
|
138
|
+
class QuantityInMetersPerSecondArray:
|
|
139
|
+
"""
|
|
140
|
+
Quantity with units of Hertz
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
data: Data[ZD, float]
|
|
144
|
+
|
|
145
|
+
units: Attr[UnitsMetersPerSecond]
|
|
146
|
+
type: Attr[Quantity] = "quantity"
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
@xarray_dataarray_schema
|
|
150
|
+
class QuantityInRadiansArray:
|
|
151
|
+
"""
|
|
152
|
+
Quantity with units of Hertz
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
data: Data[ZD, float]
|
|
156
|
+
|
|
157
|
+
units: Attr[UnitsRadians]
|
|
158
|
+
type: Attr[Quantity] = "quantity"
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
@xarray_dataarray_schema
|
|
162
|
+
class QuantityInKelvinArray:
|
|
163
|
+
"""
|
|
164
|
+
Quantity with units of Kelvins
|
|
165
|
+
"""
|
|
166
|
+
|
|
167
|
+
data: Data[ZD, float]
|
|
168
|
+
|
|
169
|
+
units: Attr[UnitsKelvin]
|
|
170
|
+
type: Attr[Quantity] = "quantity"
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
@xarray_dataarray_schema
|
|
174
|
+
class QuantityInKelvinPerJanskyArray:
|
|
175
|
+
"""
|
|
176
|
+
Quantity with units of K/Jy (sensitivity in gain curve)
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
data: Data[ZD, numpy.float64]
|
|
180
|
+
|
|
181
|
+
units: Attr[UnitsKelvinPerJansky]
|
|
182
|
+
type: Attr[Quantity] = "quantity"
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
@xarray_dataarray_schema
|
|
186
|
+
class QuantityInPascalArray:
|
|
187
|
+
"""
|
|
188
|
+
Quantity with units of Pa
|
|
189
|
+
"""
|
|
190
|
+
|
|
191
|
+
data: Data[ZD, numpy.float64]
|
|
192
|
+
|
|
193
|
+
units: Attr[UnitsPascal]
|
|
194
|
+
type: Attr[Quantity] = "quantity"
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
@xarray_dataarray_schema
|
|
198
|
+
class QuantityInPerSquareMetersArray:
|
|
199
|
+
"""
|
|
200
|
+
Quantity with units of /m^2
|
|
201
|
+
"""
|
|
202
|
+
|
|
203
|
+
data: Data[ZD, numpy.float64]
|
|
204
|
+
|
|
205
|
+
units: Attr[UnitsPerSquareMeters]
|
|
206
|
+
type: Attr[Quantity] = "quantity"
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
AllowedTimeScales = Literal["tai", "tcb", "tcg", "tdb", "tt", "ut1", "utc"]
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
AllowedTimeFormats = Literal["unix", "mjd", "cxcsec", "gps"]
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
@xarray_dataarray_schema
|
|
216
|
+
class TimeArray:
|
|
217
|
+
"""
|
|
218
|
+
Representation of a time measure.
|
|
219
|
+
|
|
220
|
+
:py:class:`astropy.time.Time` serves as the reference implementation.
|
|
221
|
+
Data can be converted as follows::
|
|
222
|
+
|
|
223
|
+
astropy.time.Time(data * astropy.units.Unit(attrs['units'][0]),
|
|
224
|
+
format=attrs['format'], scale=attrs['scale'])
|
|
225
|
+
|
|
226
|
+
All formats that express time as floating point numbers since an epoch
|
|
227
|
+
are permissible, so at present the realistic options are:
|
|
228
|
+
|
|
229
|
+
* ``mjd`` (from 1858-11-17 00:00:00 UTC)
|
|
230
|
+
* ``unix`` (from 1970-01-01 00:00:00 UTC)
|
|
231
|
+
* ``unix_tai`` (from 1970-01-01 00:00:00 TAI)
|
|
232
|
+
* ``cxcsec`` (from 1998-01-01 00:00:00 TT)
|
|
233
|
+
* ``gps`` (from 1980-01-06 00:00:00 UTC)
|
|
234
|
+
|
|
235
|
+
"""
|
|
236
|
+
|
|
237
|
+
data: Data[ZD, float]
|
|
238
|
+
"""Time since epoch, typically in seconds (see ``units``)."""
|
|
239
|
+
|
|
240
|
+
type: Attr[Time] = "time"
|
|
241
|
+
""" Array type. Should be ``"time"``. """
|
|
242
|
+
units: Attr[UnitsSeconds] = ("s",)
|
|
243
|
+
""" Units to associate with axis"""
|
|
244
|
+
scale: Attr[AllowedTimeScales] = "utc"
|
|
245
|
+
"""
|
|
246
|
+
Time scale of data. Must be one of ``(‘tai’, ‘tcb’, ‘tcg’, ‘tdb’, ‘tt’, ‘ut1’, ‘utc’)``,
|
|
247
|
+
see :py:class:`astropy.time.Time`
|
|
248
|
+
"""
|
|
249
|
+
format: Attr[AllowedTimeFormats] = "unix"
|
|
250
|
+
"""Time representation and epoch, see :py:class:`TimeArray`."""
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
# Taken from the list of astropy built-in frame classes: https://docs.astropy.org/en/stable/coordinates/index.html
|
|
254
|
+
AllowedSkyCoordFrames = Literal[
|
|
255
|
+
"icrs",
|
|
256
|
+
"fk5",
|
|
257
|
+
"fk4",
|
|
258
|
+
"fk4noterms",
|
|
259
|
+
"galactic",
|
|
260
|
+
"galactocentric",
|
|
261
|
+
"supergalactic",
|
|
262
|
+
"altaz",
|
|
263
|
+
"hadec",
|
|
264
|
+
"gcrs",
|
|
265
|
+
"cirs",
|
|
266
|
+
"itrs",
|
|
267
|
+
"hcrs",
|
|
268
|
+
"teme",
|
|
269
|
+
"tete",
|
|
270
|
+
"precessedgeocentric",
|
|
271
|
+
"geocentricmeanecliptic",
|
|
272
|
+
"barycentricmeanecliptic",
|
|
273
|
+
"heliocentricmeanecliptic",
|
|
274
|
+
"geocentrictrueecliptic",
|
|
275
|
+
"barycentrictrueecliptic",
|
|
276
|
+
"heliocentrictrueecliptic",
|
|
277
|
+
"heliocentriceclipticiau76",
|
|
278
|
+
"custombarycentricecliptic",
|
|
279
|
+
"lsr",
|
|
280
|
+
"lsrk",
|
|
281
|
+
"lsrd",
|
|
282
|
+
"galacticlsr",
|
|
283
|
+
]
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
@xarray_dataarray_schema
|
|
287
|
+
class SkyCoordArray:
|
|
288
|
+
"""Measures array for data variables that are sky coordinates, used in :py:class:`FieldSourceXds`"""
|
|
289
|
+
|
|
290
|
+
data: Data[Union[SkyDirLabel, SkyPosLabel], float]
|
|
291
|
+
|
|
292
|
+
type: Attr[SkyCoord] = "sky_coord"
|
|
293
|
+
units: Attr[UnitsOfSkyCoordInRadians] = ("rad", "rad")
|
|
294
|
+
frame: Attr[AllowedSkyCoordFrames] = ""
|
|
295
|
+
"""
|
|
296
|
+
Possible values are astropy SkyCoord frames.
|
|
297
|
+
Several casacore frames found in MSv2 are translated to astropy frames as follows: AZELGEO=>altaz, J2000=>fk5, ICRS=>icrs.
|
|
298
|
+
From fixvis docs: clean and the im tool ignore the reference frame
|
|
299
|
+
claimed by the UVW column (it is often mislabelled as ITRF when it is
|
|
300
|
+
really FK5 (J2000)) and instead assume the (u, v, w)s are in the same frame
|
|
301
|
+
as the phase tracking center. calcuvw does not yet force the UVW column and
|
|
302
|
+
field centers to use the same reference frame! Blank = use the phase
|
|
303
|
+
tracking frame of vis.
|
|
304
|
+
"""
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
@xarray_dataarray_schema
|
|
308
|
+
class LocalSkyCoordArray:
|
|
309
|
+
"""Measures array for the arrays that have coordinate local_sky_dir_label in :py:class:`PointingXds`"""
|
|
310
|
+
|
|
311
|
+
data: Data[LocalSkyDirLabel, float]
|
|
312
|
+
|
|
313
|
+
type: Attr[SkyCoord] = "sky_coord"
|
|
314
|
+
units: Attr[UnitsOfSkyCoordInRadians] = ("rad", "rad")
|
|
315
|
+
frame: Attr[AllowedSkyCoordFrames] = "fk5"
|
|
316
|
+
"""
|
|
317
|
+
From fixvis docs: clean and the im tool ignore the reference frame claimed by the UVW column (it is often mislabelled
|
|
318
|
+
as ITRF when it is really FK5 (J2000)) and instead assume the (u, v, w)s are in the same frame as the phase tracking
|
|
319
|
+
center. calcuvw does not yet force the UVW column and field centers to use the same reference frame! Blank = use the
|
|
320
|
+
phase tracking frame of vis.
|
|
321
|
+
"""
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
# Coordinates / Axes
|
|
325
|
+
@xarray_dataarray_schema
|
|
326
|
+
class TimeCoordArray:
|
|
327
|
+
"""Data model of the main dataset time axis. See also :py:class:`TimeArray`."""
|
|
328
|
+
|
|
329
|
+
data: Data[Time, float]
|
|
330
|
+
"""
|
|
331
|
+
Time, expressed in seconds since the epoch (see ``scale`` &
|
|
332
|
+
``format``), see also see :py:class:`TimeArray`.
|
|
333
|
+
"""
|
|
334
|
+
|
|
335
|
+
type: Attr[Time] = "time"
|
|
336
|
+
""" Coordinate type. Should be ``"time"``. """
|
|
337
|
+
|
|
338
|
+
units: Attr[UnitsSeconds] = ("s",)
|
|
339
|
+
""" Units to associate with axis"""
|
|
340
|
+
|
|
341
|
+
scale: Attr[AllowedTimeScales] = "utc"
|
|
342
|
+
""" Astropy time scales, see :py:class:`TimeArray` """
|
|
343
|
+
|
|
344
|
+
format: Attr[AllowedTimeFormats] = "unix"
|
|
345
|
+
""" Astropy format, see :py:class:`TimeArray`"""
|
|
346
|
+
|
|
347
|
+
integration_time: Attr[QuantityInSecondsArray] = None
|
|
348
|
+
""" The nominal sampling interval (ms v2). Units of seconds. """
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
@xarray_dataarray_schema
|
|
352
|
+
class TimeInterpolatedCoordArray:
|
|
353
|
+
"""
|
|
354
|
+
Data model of a time axis when it is interpolated to match the time
|
|
355
|
+
axis of the main dataset. This can be used in the system_calibration_xds,
|
|
356
|
+
pointing_xds, weather_xds, field_and_source_info_xds, and phase_cal_xds
|
|
357
|
+
when their respective time_cal, time_pointing, time_weather,
|
|
358
|
+
time_ephemeris or time_phase_cal are interpolated to the main dataset
|
|
359
|
+
time. See also :py:class:`TimeArray`.
|
|
360
|
+
|
|
361
|
+
The only difference with respect to the main TimeCoordArray is the
|
|
362
|
+
absence of the attribute integration_time
|
|
363
|
+
"""
|
|
364
|
+
|
|
365
|
+
data: Data[Time, float]
|
|
366
|
+
"""
|
|
367
|
+
Time, expressed in seconds since the epoch (see ``scale`` &
|
|
368
|
+
``format``), see also see :py:class:`TimeArray`.
|
|
369
|
+
"""
|
|
370
|
+
|
|
371
|
+
type: Attr[Time] = "time"
|
|
372
|
+
""" Coordinate type. Should be ``"time"``. """
|
|
373
|
+
|
|
374
|
+
units: Attr[UnitsSeconds] = ("s",)
|
|
375
|
+
""" Units to associate with axis"""
|
|
376
|
+
|
|
377
|
+
scale: Attr[AllowedTimeScales] = "utc"
|
|
378
|
+
""" Astropy time scales, see :py:class:`TimeArray` """
|
|
379
|
+
|
|
380
|
+
format: Attr[AllowedTimeFormats] = "unix"
|
|
381
|
+
""" Astropy format, see :py:class:`TimeArray`"""
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
@xarray_dataarray_schema
|
|
385
|
+
class TimeCalCoordArray:
|
|
386
|
+
"""Data model of 'time_cal' axis (time axis in system_calibration_xds
|
|
387
|
+
subdataset when not interpolated to the main time axis. See also
|
|
388
|
+
:py:class:`TimeCoordArray`."""
|
|
389
|
+
|
|
390
|
+
data: Data[TimeCal, float]
|
|
391
|
+
"""
|
|
392
|
+
Time, expressed in seconds since the epoch (see ``scale`` &
|
|
393
|
+
``format``).
|
|
394
|
+
"""
|
|
395
|
+
|
|
396
|
+
type: Attr[Time] = "time_cal"
|
|
397
|
+
""" Coordinate type. Should be ``"time_cal"``. """
|
|
398
|
+
|
|
399
|
+
units: Attr[UnitsSeconds] = ("s",)
|
|
400
|
+
""" Units to associate with axis"""
|
|
401
|
+
|
|
402
|
+
scale: Attr[AllowedTimeScales] = "utc"
|
|
403
|
+
""" Astropy time scales, see :py:class:`TimeArray` """
|
|
404
|
+
|
|
405
|
+
format: Attr[AllowedTimeFormats] = "unix"
|
|
406
|
+
""" Astropy format, see :py:class:`TimeArray`"""
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
@xarray_dataarray_schema
|
|
410
|
+
class TimePointingCoordArray:
|
|
411
|
+
"""Data model of the 'time_pointing' axis (time axis in pointing_xds
|
|
412
|
+
subdataset when not interpolated to the main time axis. See also
|
|
413
|
+
:py:class:`TimeCoordArray`."""
|
|
414
|
+
|
|
415
|
+
data: Data[TimePointing, float]
|
|
416
|
+
"""
|
|
417
|
+
Time, expressed in seconds since the epoch (see ``scale`` &
|
|
418
|
+
``format``).
|
|
419
|
+
"""
|
|
420
|
+
|
|
421
|
+
type: Attr[TimePointing] = "time_pointing"
|
|
422
|
+
""" Coordinate type. Should be ``"time_pointing"``. """
|
|
423
|
+
|
|
424
|
+
units: Attr[UnitsSeconds] = ("s",)
|
|
425
|
+
""" Units to associate with axis"""
|
|
426
|
+
|
|
427
|
+
scale: Attr[AllowedTimeScales] = "utc"
|
|
428
|
+
""" Astropy time scales, see :py:class:`TimeArray` """
|
|
429
|
+
|
|
430
|
+
format: Attr[AllowedTimeFormats] = "unix"
|
|
431
|
+
""" Astropy format, see :py:class:`TimeArray`"""
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
@xarray_dataarray_schema
|
|
435
|
+
class TimeEphemerisCoordArray:
|
|
436
|
+
"""Data model of the 'time_ephemeris' axis (time axis in the
|
|
437
|
+
field_and_source_info_xds subdataset when not interpolated to the main
|
|
438
|
+
time axis. See also :py:class:`TimeCoordArray`."""
|
|
439
|
+
|
|
440
|
+
data: Data[TimeEphemeris, float]
|
|
441
|
+
"""
|
|
442
|
+
Time, expressed in seconds since the epoch (see ``scale`` &
|
|
443
|
+
``format``).
|
|
444
|
+
"""
|
|
445
|
+
|
|
446
|
+
type: Attr[TimeEphemeris] = "time_ephemeris"
|
|
447
|
+
""" Coordinate type. Should be ``"time_ephemeris"``. """
|
|
448
|
+
|
|
449
|
+
units: Attr[UnitsSeconds] = ("s",)
|
|
450
|
+
""" Units to associate with axis"""
|
|
451
|
+
|
|
452
|
+
scale: Attr[AllowedTimeScales] = "utc"
|
|
453
|
+
""" Astropy time scales, see :py:class:`TimeArray` """
|
|
454
|
+
|
|
455
|
+
format: Attr[AllowedTimeFormats] = "unix"
|
|
456
|
+
""" Astropy format, see :py:class:`TimeArray`"""
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
@xarray_dataarray_schema
|
|
460
|
+
class TimeWeatherCoordArray:
|
|
461
|
+
"""Data model of the 'time_weather' axis (time axis in the weather_xds
|
|
462
|
+
subdataset when not interpolated to the main time axis. See also
|
|
463
|
+
:py:class:`TimeCoordArray`."""
|
|
464
|
+
|
|
465
|
+
data: Data[TimeWeather, float]
|
|
466
|
+
"""
|
|
467
|
+
Time, expressed in seconds since the epoch (see ``scale`` &
|
|
468
|
+
``format``).
|
|
469
|
+
"""
|
|
470
|
+
|
|
471
|
+
type: Attr[Time] = "time_weather"
|
|
472
|
+
""" Coordinate type. Should be ``"time_weather"``. """
|
|
473
|
+
|
|
474
|
+
units: Attr[UnitsSeconds] = ("s",)
|
|
475
|
+
""" Units to associate with axis"""
|
|
476
|
+
|
|
477
|
+
scale: Attr[AllowedTimeScales] = "utc"
|
|
478
|
+
""" Astropy time scales, see :py:class:`TimeArray` """
|
|
479
|
+
|
|
480
|
+
format: Attr[AllowedTimeFormats] = "unix"
|
|
481
|
+
""" Astropy format, see :py:class:`TimeArray`"""
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
# For now allowing both some of the casacore frames (from "REST" to "TOPO" - all in uppercase) as well as
|
|
485
|
+
# the astropy frames (all in lowercase, taken from the list of SpectralCoord:
|
|
486
|
+
# https://docs.astropy.org/en/stable/coordinates/spectralcoord.html)
|
|
487
|
+
AllowedSpectralCoordFrames = Literal[
|
|
488
|
+
"REST",
|
|
489
|
+
# "LSRK" -> "lsrk",
|
|
490
|
+
# "LSRD" -> "lsrd",
|
|
491
|
+
"BARY",
|
|
492
|
+
"GEO",
|
|
493
|
+
"TOPO",
|
|
494
|
+
# astropy frames
|
|
495
|
+
"gcrs",
|
|
496
|
+
"icrs",
|
|
497
|
+
"hcrs",
|
|
498
|
+
"lsrk",
|
|
499
|
+
"lsrd",
|
|
500
|
+
"lsr",
|
|
501
|
+
]
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
@xarray_dataarray_schema
|
|
505
|
+
class SpectralCoordArray:
|
|
506
|
+
"""
|
|
507
|
+
Measures array for data variables and attributes that are spectral coordinates.
|
|
508
|
+
"""
|
|
509
|
+
|
|
510
|
+
data: Data[ZD, float]
|
|
511
|
+
|
|
512
|
+
units: Attr[UnitsHertz] = ("Hz",)
|
|
513
|
+
|
|
514
|
+
observer: Attr[AllowedSpectralCoordFrames] = "gcrs"
|
|
515
|
+
"""
|
|
516
|
+
Capitalized reference observers are from casacore. TOPO implies creating astropy earth_location.
|
|
517
|
+
Astropy velocity reference frames are lowercase. Note that Astropy does not use the name 'TOPO' (telescope centric)
|
|
518
|
+
rather it assumes if no velocity frame is given that this is the default.
|
|
519
|
+
"""
|
|
520
|
+
|
|
521
|
+
type: Attr[SpectralCoord] = "spectral_coord"
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
AllowedLocationFrames = Literal["ITRF", "GRS80", "WGS84", "WGS72", "Undefined"]
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
AllowedLocationCoordinateSystems = Literal[
|
|
528
|
+
"geocentric",
|
|
529
|
+
"planetcentric",
|
|
530
|
+
"geodetic",
|
|
531
|
+
"planetodetic",
|
|
532
|
+
"orbital",
|
|
533
|
+
]
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
@xarray_dataarray_schema
|
|
537
|
+
class LocationArray:
|
|
538
|
+
"""
|
|
539
|
+
Measure type used for example in antenna_xds/ANTENNA_POSITION, field_and_source_xds/OBSERVER_POSITION
|
|
540
|
+
Data dimensions can be EllipsoidPosLabel or CartesianPosLabel
|
|
541
|
+
"""
|
|
542
|
+
|
|
543
|
+
data: Data[Union[EllipsoidPosLabel, CartesianPosLabel], float]
|
|
544
|
+
|
|
545
|
+
units: Attr[UnitsOfLocationInMetersOrRadians]
|
|
546
|
+
"""
|
|
547
|
+
If the units are a list of strings then it must be the same length as
|
|
548
|
+
the last dimension of the data array. This allows for having different
|
|
549
|
+
units in the same data array,for example geodetic coordinates could use
|
|
550
|
+
``['rad','rad','m']``.
|
|
551
|
+
"""
|
|
552
|
+
|
|
553
|
+
frame: Attr[AllowedLocationFrames]
|
|
554
|
+
"""
|
|
555
|
+
Can be ITRF, GRS80, WGS84, WGS72, Undefined
|
|
556
|
+
"""
|
|
557
|
+
|
|
558
|
+
coordinate_system: Attr[AllowedLocationCoordinateSystems]
|
|
559
|
+
""" Can be ``geocentric/planetcentric, geodetic/planetodetic, orbital`` """
|
|
560
|
+
|
|
561
|
+
origin_object_name: Attr[str]
|
|
562
|
+
"""
|
|
563
|
+
earth/sun/moon/etc
|
|
564
|
+
"""
|
|
565
|
+
|
|
566
|
+
type: Attr[Location] = "location"
|
|
567
|
+
""" """
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
@xarray_dataarray_schema
|
|
571
|
+
class EllipsoidPosLocationArray:
|
|
572
|
+
"""
|
|
573
|
+
Measure type used for example in field_and_source_xds/SUB_OBSERVER_POSITION, SUB_SOLAR_POSITION
|
|
574
|
+
"""
|
|
575
|
+
|
|
576
|
+
data: Data[EllipsoidPosLabel, float]
|
|
577
|
+
|
|
578
|
+
frame: Attr[AllowedLocationFrames]
|
|
579
|
+
"""
|
|
580
|
+
Can be ITRF, GRS80, WGS84, WGS72
|
|
581
|
+
"""
|
|
582
|
+
|
|
583
|
+
coordinate_system: Attr[AllowedLocationCoordinateSystems]
|
|
584
|
+
""" Can be ``geocentric/planetcentric, geodetic/planetodetic, orbital`` """
|
|
585
|
+
|
|
586
|
+
origin_object_name: Attr[str]
|
|
587
|
+
"""
|
|
588
|
+
earth/sun/moon/etc
|
|
589
|
+
"""
|
|
590
|
+
|
|
591
|
+
type: Attr[Location] = "location"
|
|
592
|
+
""" """
|
|
593
|
+
|
|
594
|
+
units: Attr[UnitsOfPositionInRadians] = ("rad", "rad", "m")
|
|
595
|
+
"""
|
|
596
|
+
If the units are a list of strings then it must be the same length as
|
|
597
|
+
the last dimension of the data array. This allows for having different
|
|
598
|
+
units in the same data array,for example geodetic coordinates could use
|
|
599
|
+
``['rad','rad','m']``.
|
|
600
|
+
"""
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
@xarray_dataarray_schema
|
|
604
|
+
class BaselineArray:
|
|
605
|
+
"""Model of the baseline_id coordinate in the main dataset (interferometric data, :py:class:`VisibiiltyXds`)"""
|
|
606
|
+
|
|
607
|
+
data: Data[BaselineId, Union[numpy.int64, numpy.int32]]
|
|
608
|
+
"""Unique id for each baseline."""
|
|
609
|
+
long_name: Optional[Attr[str]] = "Baseline ID"
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
@xarray_dataarray_schema
|
|
613
|
+
class BaselineAntennaNameArray:
|
|
614
|
+
"""Array of antenna_name by baseline_id, as used in main_xds and main_sd_xds
|
|
615
|
+
(antenna_name by baseline_id dim"""
|
|
616
|
+
|
|
617
|
+
data: Data[BaselineId, str]
|
|
618
|
+
"""Unique id for each baseline."""
|
|
619
|
+
long_name: Optional[Attr[str]] = "Antenna name by baseline_id"
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
@xarray_dataarray_schema
|
|
623
|
+
class AntennaNameArray:
|
|
624
|
+
"""
|
|
625
|
+
Model of the antenna_name coordinate, used in the main dataset (single dish data, :py:class:`VisibiiltyXds`)
|
|
626
|
+
and several sub-datasets such as antenna_xds, pointing_xds, weather_xds, system_calibration_xds, gain_curve_xds, etc.
|
|
627
|
+
"""
|
|
628
|
+
|
|
629
|
+
data: Data[AntennaName, str]
|
|
630
|
+
"""Unique name for each antenna(_station)."""
|
|
631
|
+
long_name: Optional[Attr[str]] = "Antenna name"
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
AllowedDopplerTypes = Literal[
|
|
635
|
+
"radio", "optical", "z", "ratio", "true", "relativistic", "beta", "gamma"
|
|
636
|
+
]
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
@xarray_dataarray_schema
|
|
640
|
+
class DopplerArray:
|
|
641
|
+
"""Doppler measure information for the frequency coordinate"""
|
|
642
|
+
|
|
643
|
+
data: Data[ZD, numpy.float64]
|
|
644
|
+
|
|
645
|
+
type: Attr[Doppler] = "doppler"
|
|
646
|
+
""" Coordinate type. Should be ``"spectral_coord"``. """
|
|
647
|
+
|
|
648
|
+
units: Attr[UnitsOfDopplerShift] = ("m/s",)
|
|
649
|
+
""" Units to associate with axis, [ratio]/[m/s]"""
|
|
650
|
+
|
|
651
|
+
doppler_type: Attr[AllowedDopplerTypes] = "radio"
|
|
652
|
+
"""
|
|
653
|
+
Allowable values: radio, optical, z, ratio, true, relativistic, beta, gamma.
|
|
654
|
+
Astropy only has radio and optical. Using casacore types: https://casadocs.readthedocs.io/en/stable/notebooks/memo-series.html?highlight=Spectral%20Frames#Spectral-Frames
|
|
655
|
+
"""
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
@xarray_dataarray_schema
|
|
659
|
+
class FrequencyArray:
|
|
660
|
+
"""Frequency coordinate in the main dataset."""
|
|
661
|
+
|
|
662
|
+
data: Data[Frequency, float]
|
|
663
|
+
""" Time, expressed in SI seconds since the epoch. """
|
|
664
|
+
spectral_window_name: Attr[str]
|
|
665
|
+
""" Name associated with spectral window. """
|
|
666
|
+
frequency_group_name: Optional[Attr[str]]
|
|
667
|
+
""" Name associated with frequency group - needed for multi-band VLBI fringe-fitting."""
|
|
668
|
+
reference_frequency: Attr[SpectralCoordArray]
|
|
669
|
+
""" A frequency representative of the spectral window, usually the sky
|
|
670
|
+
frequency corresponding to the DC edge of the baseband. Used by the calibration
|
|
671
|
+
system if a fixed scaling frequency is required or in algorithms to identify the
|
|
672
|
+
observing band. """
|
|
673
|
+
channel_width: Attr[
|
|
674
|
+
QuantityInHertzArray
|
|
675
|
+
] # Not SpectralCoord, as it is a difference
|
|
676
|
+
""" The nominal channel bandwidth. Same units as data array (see units key). """
|
|
677
|
+
doppler: Optional[Attr[DopplerArray]]
|
|
678
|
+
""" Doppler tracking information """
|
|
679
|
+
|
|
680
|
+
type: Attr[SpectralCoord] = "spectral_coord"
|
|
681
|
+
""" Coordinate type. Should be ``"spectral_coord"``. """
|
|
682
|
+
long_name: Optional[Attr[str]] = "Frequency"
|
|
683
|
+
""" Long-form name to use for axis"""
|
|
684
|
+
units: Attr[UnitsHertz] = ("Hz",)
|
|
685
|
+
""" Units to associate with axis"""
|
|
686
|
+
observer: Attr[AllowedSpectralCoordFrames] = "icrs"
|
|
687
|
+
"""
|
|
688
|
+
Astropy velocity reference frames (see :external:ref:`astropy-spectralcoord`).
|
|
689
|
+
Note that Astropy does not use the name
|
|
690
|
+
'topo' (telescope centric) velocity frame, rather it assumes if no velocity
|
|
691
|
+
frame is given that this is the default.
|
|
692
|
+
"""
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
@xarray_dataarray_schema
|
|
696
|
+
class FrequencyCalArray:
|
|
697
|
+
"""The frequency_cal coordinate of the system calibration dataset. It has
|
|
698
|
+
only measures data, as opposed to the frequency array of the main dataset."""
|
|
699
|
+
|
|
700
|
+
data: Data[FrequencyCal, float]
|
|
701
|
+
""" Time, expressed in SI seconds since the epoch. """
|
|
702
|
+
|
|
703
|
+
type: Attr[SpectralCoord] = "spectral_coord"
|
|
704
|
+
units: Attr[UnitsHertz] = ("Hz",)
|
|
705
|
+
""" Units to associate with axis"""
|
|
706
|
+
|
|
707
|
+
observer: Attr[AllowedSpectralCoordFrames] = "icrs"
|
|
708
|
+
"""
|
|
709
|
+
Astropy velocity reference frames (see :external:ref:`astropy-spectralcoord`).
|
|
710
|
+
Note that Astropy does not use the name
|
|
711
|
+
'topo' (telescope centric) velocity frame, rather it assumes if no velocity
|
|
712
|
+
frame is given that this is the default.
|
|
713
|
+
"""
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
@xarray_dataarray_schema
|
|
717
|
+
class PolarizationArray:
|
|
718
|
+
"""
|
|
719
|
+
Possible correlations that can be formed from polarised receptors. Possible
|
|
720
|
+
values, taken from `Measures/Stokes.h
|
|
721
|
+
<https://github.com/casacore/casacore/blob/5a8df94738bdc36be27e695d7b14fe949a1cc2df/measures/Measures/Stokes.h>`_:
|
|
722
|
+
|
|
723
|
+
* ``I``, ``Q``, ``U``, ``V`` (standard stokes parameters)
|
|
724
|
+
* ``RR``, ``RL``, ``LR``, ``LL`` (circular correlation products)
|
|
725
|
+
* ``XX``, ``XY``, ``YX``, ``YY`` (linear correlation products)
|
|
726
|
+
* ``RX``, ``RY``, ``LX``, ``LY``, ``XR``, ``XL``, ``YR``, ``YL`` (mixed correlation products)
|
|
727
|
+
* ``PP``, ``PQ``, ``QP``, ``QQ`` (general quasi-orthogonal correlation products)
|
|
728
|
+
* ``RCircular``, ``LCircular``, ``Linear`` (single dish polarization types)
|
|
729
|
+
* ``Ptotal`` (polarized intensity: ``sqrt(Q²+U²+V²)``)
|
|
730
|
+
* ``Plinear`` (linearly polarized intensity: ``sqrt(Q²+U²)``)
|
|
731
|
+
* ``PFtotal`` (polarization fraction: ``Ptotal/I``)
|
|
732
|
+
* ``PFlinear`` (linear polarization fraction: ``Plinear/I``)
|
|
733
|
+
* ``Pangle`` (linear polarization angle: ``0.5 arctan(U/Q)`` in radians)
|
|
734
|
+
|
|
735
|
+
"""
|
|
736
|
+
|
|
737
|
+
data: Data[Polarization, str]
|
|
738
|
+
""" Polarization names. """
|
|
739
|
+
long_name: Optional[Attr[str]] = "Polarization"
|
|
740
|
+
""" Long-form name to use for axis. Should be ``"Polarization"``"""
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
@xarray_dataarray_schema
|
|
744
|
+
class UvwLabelArray:
|
|
745
|
+
"""
|
|
746
|
+
Coordinate axis to make up ``("u", "v", "w")`` tuple, see :py:class:`UvwArray`.
|
|
747
|
+
"""
|
|
748
|
+
|
|
749
|
+
data: Data[UvwLabel, str] = ("u", "v", "w")
|
|
750
|
+
"""Should be ``('u','v','w')``, used by :py:class:`UvwArray`"""
|
|
751
|
+
long_name: Optional[Attr[str]] = "U/V/W label"
|
|
752
|
+
""" Long-form name to use for axis. Should be ``"U/V/W label"``"""
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
# Data variables
|
|
756
|
+
@xarray_dataarray_schema
|
|
757
|
+
class FlagArray:
|
|
758
|
+
"""
|
|
759
|
+
An array of Boolean values with the same shape as `VISIBILITY`,
|
|
760
|
+
representing the cumulative flags applying to this data matrix. Data are
|
|
761
|
+
flagged bad if the ``FLAG`` array element is ``True``.
|
|
762
|
+
"""
|
|
763
|
+
|
|
764
|
+
data: Data[
|
|
765
|
+
Union[
|
|
766
|
+
tuple[Time, BaselineId, Frequency, Polarization],
|
|
767
|
+
tuple[Time, BaselineId, Frequency],
|
|
768
|
+
tuple[Time, BaselineId],
|
|
769
|
+
tuple[Time, AntennaName, Frequency, Polarization], # SD
|
|
770
|
+
],
|
|
771
|
+
bool,
|
|
772
|
+
]
|
|
773
|
+
time: Coordof[TimeCoordArray]
|
|
774
|
+
baseline_id: Optional[Coordof[BaselineArray]] # Only IF
|
|
775
|
+
antenna_name: Optional[Coordof[AntennaNameArray]] # Only SD
|
|
776
|
+
frequency: Coordof[FrequencyArray]
|
|
777
|
+
polarization: Optional[Coordof[PolarizationArray]] = None
|
|
778
|
+
long_name: Optional[Attr[str]] = "Visibility flags"
|
|
779
|
+
|
|
780
|
+
allow_mutiple_versions: Optional[Attr[bool]] = True
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
@xarray_dataarray_schema
|
|
784
|
+
class WeightArray:
|
|
785
|
+
"""
|
|
786
|
+
The weight for each channel, with the same shape as the associated
|
|
787
|
+
:py:class:`VisibilityArray`, as assigned by the correlator or processor.
|
|
788
|
+
|
|
789
|
+
Weight spectrum in ms v2 is renamed weight. Should be calculated as
|
|
790
|
+
1/sigma^2 (sigma rms noise).
|
|
791
|
+
"""
|
|
792
|
+
|
|
793
|
+
data: Data[
|
|
794
|
+
Union[
|
|
795
|
+
tuple[Time, BaselineId, Frequency, Polarization],
|
|
796
|
+
tuple[Time, BaselineId, Frequency],
|
|
797
|
+
tuple[Time, BaselineId],
|
|
798
|
+
tuple[Time, AntennaName, Frequency, Polarization], # SD
|
|
799
|
+
],
|
|
800
|
+
Union[numpy.float16, numpy.float32, numpy.float64],
|
|
801
|
+
]
|
|
802
|
+
"""Visibility weights"""
|
|
803
|
+
time: Coordof[TimeCoordArray]
|
|
804
|
+
baseline_id: Optional[Coordof[BaselineArray]] # Only IF
|
|
805
|
+
antenna_name: Optional[Coordof[AntennaNameArray]] # Only SD
|
|
806
|
+
frequency: Coordof[FrequencyArray] = None
|
|
807
|
+
polarization: Optional[Coordof[PolarizationArray]] = None
|
|
808
|
+
long_name: Optional[Attr[str]] = "Visibility weights"
|
|
809
|
+
|
|
810
|
+
allow_mutiple_versions: Optional[Attr[bool]] = True
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
# J2000=>fk5 is used most often. icrs is used less often. Both fk5 and icrs are also borrowed from the field center (to fix
|
|
814
|
+
# ITRF=>J2000). APP has only been seen in WSRT datasets.
|
|
815
|
+
AllowedUvwFrames = Literal[
|
|
816
|
+
"fk5",
|
|
817
|
+
"icrs",
|
|
818
|
+
"APP", # "apparent geocentric position", used in WSRT datasets
|
|
819
|
+
]
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
@xarray_dataarray_schema
|
|
823
|
+
class UvwArray:
|
|
824
|
+
"""
|
|
825
|
+
Coordinates for the baseline from ``baseline_antenna2_id`` to
|
|
826
|
+
``baseline_antenna1_id``, i.e. the baseline is equal to the difference
|
|
827
|
+
``POSITION2 - POSITION1``. The UVW given are for the ``TIME_CENTROID``, and
|
|
828
|
+
correspond in general to the reference type for the
|
|
829
|
+
``field_info.phase_dir``.
|
|
830
|
+
|
|
831
|
+
The baseline direction should be: ``W`` towards source direction; ``V`` in
|
|
832
|
+
plane through source and system's pole; ``U`` in direction of increasing
|
|
833
|
+
longitude coordinate. So citing
|
|
834
|
+
http://casa.nrao.edu/Memos/CoordConvention.pdf: Consider an XYZ Celestial
|
|
835
|
+
coordinate system centered at the location of the interferometer, with
|
|
836
|
+
:math:`X` towards the East, :math:`Z` towards the NCP and :math:`Y` to
|
|
837
|
+
complete a right-handed system. The UVW coordinate system is then defined
|
|
838
|
+
by the hour-angle and declination of the phase-reference direction such
|
|
839
|
+
that
|
|
840
|
+
|
|
841
|
+
#. when the direction of observation is the NCP (`ha=0,dec=90`),
|
|
842
|
+
the UVW coordinates are aligned with XYZ,
|
|
843
|
+
#. V, W and the NCP are always on a Great circle,
|
|
844
|
+
#. when W is on the local meridian, U points East
|
|
845
|
+
#. when the direction of observation is at zero declination, an
|
|
846
|
+
hour-angle of -6 hours makes W point due East.
|
|
847
|
+
|
|
848
|
+
This definition also determines the sign of the phase of ``VISIBILITY``.
|
|
849
|
+
|
|
850
|
+
"""
|
|
851
|
+
|
|
852
|
+
data: Data[
|
|
853
|
+
Union[tuple[Time, BaselineId, UvwLabel]],
|
|
854
|
+
Union[
|
|
855
|
+
numpy.float16,
|
|
856
|
+
numpy.float32,
|
|
857
|
+
numpy.float64,
|
|
858
|
+
],
|
|
859
|
+
]
|
|
860
|
+
"""Baseline coordinates from ``baseline_antenna2_id`` to ``baseline_antenna1_id``"""
|
|
861
|
+
time: Coordof[TimeCoordArray]
|
|
862
|
+
baseline_id: Optional[Coordof[BaselineArray]]
|
|
863
|
+
uvw_label: Coordof[UvwLabelArray] = ("u", "v", "w")
|
|
864
|
+
|
|
865
|
+
long_name: Optional[Attr[str]] = "Baseline coordinates"
|
|
866
|
+
""" Long-form name to use for axis. Should be ``"Baseline coordinates``"""
|
|
867
|
+
|
|
868
|
+
type: Attr[Literal["uvw"]] = "uvw"
|
|
869
|
+
frame: Attr[AllowedUvwFrames] = "icrs"
|
|
870
|
+
""" To be defined in astropy (see for example https://github.com/astropy/astropy/issues/7766) """
|
|
871
|
+
units: Attr[UnitsMeters] = ("m",)
|
|
872
|
+
|
|
873
|
+
allow_mutiple_versions: Optional[Attr[bool]] = True
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
@xarray_dataarray_schema
|
|
877
|
+
class TimeSamplingArray:
|
|
878
|
+
"""
|
|
879
|
+
Model of arrays of measures used in the main dataset for data variables such as TIME_CENTROID and
|
|
880
|
+
TIME_CENTROID_EXTRA_PRECISION.
|
|
881
|
+
"""
|
|
882
|
+
|
|
883
|
+
data: Data[
|
|
884
|
+
Union[
|
|
885
|
+
tuple[Time, BaselineId],
|
|
886
|
+
tuple[Time, AntennaName], # SD
|
|
887
|
+
],
|
|
888
|
+
float,
|
|
889
|
+
]
|
|
890
|
+
|
|
891
|
+
time: Coordof[TimeCoordArray]
|
|
892
|
+
baseline_id: Optional[Coordof[BaselineArray]] # Only IF
|
|
893
|
+
antenna_name: Optional[Coordof[AntennaNameArray]] # Only SD
|
|
894
|
+
|
|
895
|
+
scale: Attr[AllowedTimeScales] = "utc"
|
|
896
|
+
""" Astropy time scales, see :py:class:`astropy.time.Time` """
|
|
897
|
+
format: Attr[AllowedTimeFormats] = "unix"
|
|
898
|
+
""" Astropy format, see :py:class:`astropy.time.Time`. Default seconds from 1970-01-01 00:00:00 UTC """
|
|
899
|
+
|
|
900
|
+
long_name: Optional[Attr[str]] = "Time sampling data"
|
|
901
|
+
units: Attr[UnitsSeconds] = ("s",)
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
@xarray_dataarray_schema
|
|
905
|
+
class FreqSamplingArray:
|
|
906
|
+
"""
|
|
907
|
+
Model of frequency related data variables of the main dataset, such as EFFECTIV_CHANNEL_WIDTH and FREQUENCY_CENTROID.
|
|
908
|
+
"""
|
|
909
|
+
|
|
910
|
+
data: Data[
|
|
911
|
+
Union[
|
|
912
|
+
tuple[Time, BaselineId, Frequency, Polarization],
|
|
913
|
+
tuple[Time, BaselineId, Frequency],
|
|
914
|
+
tuple[Time, Frequency],
|
|
915
|
+
tuple[Frequency],
|
|
916
|
+
],
|
|
917
|
+
float,
|
|
918
|
+
]
|
|
919
|
+
"""
|
|
920
|
+
Data about frequency sampling, such as centroid or integration
|
|
921
|
+
time. Concrete function depends on concrete data array within
|
|
922
|
+
:py:class:`VisibilityXds` or :py:class:`SpectrumXds`.
|
|
923
|
+
"""
|
|
924
|
+
frequency: Coordof[FrequencyArray]
|
|
925
|
+
time: Optional[Coordof[TimeCoordArray]] = None
|
|
926
|
+
baseline_id: Optional[Coordof[BaselineArray]] = None
|
|
927
|
+
polarization: Optional[Coordof[PolarizationArray]] = None
|
|
928
|
+
long_name: Optional[Attr[str]] = "Frequency sampling data"
|
|
929
|
+
units: Attr[UnitsHertz] = ("Hz",)
|
|
930
|
+
observer: Attr[AllowedSpectralCoordFrames] = "icrs"
|
|
931
|
+
"""
|
|
932
|
+
Astropy velocity reference frames (see :external:ref:`astropy-spectralcoord`).
|
|
933
|
+
Note that Astropy does not use the name
|
|
934
|
+
'topo' (telescope centric) velocity frame, rather it assumes if no velocity
|
|
935
|
+
frame is given that this is the default.
|
|
936
|
+
"""
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
# Define FieldAndSourceXds dataset already here, as it is needed in the
|
|
940
|
+
# definition of VisibilityArray
|
|
941
|
+
@xarray_dataset_schema
|
|
942
|
+
class FieldSourceXds:
|
|
943
|
+
"""
|
|
944
|
+
Field positions for each source.
|
|
945
|
+
|
|
946
|
+
Defines a field position on the sky. For interferometers, this is the correlated field position.
|
|
947
|
+
For single dishes, this is the nominal pointing direction.
|
|
948
|
+
"""
|
|
949
|
+
|
|
950
|
+
source_name: Optional[Coord[Union[ZD, Time], str]]
|
|
951
|
+
""" Source name. """
|
|
952
|
+
field_name: Optional[Coord[Union[ZD, Time], str]]
|
|
953
|
+
"""Field name."""
|
|
954
|
+
|
|
955
|
+
time: Optional[Coordof[TimeInterpolatedCoordArray]]
|
|
956
|
+
"""Midpoint of time for which this set of parameters is accurate. Labeled 'time' when interpolated to main time """
|
|
957
|
+
time_ephemeris: Optional[Coordof[TimeEphemerisCoordArray]]
|
|
958
|
+
"""Midpoint of time for which this set of parameters is accurate. Labeled 'time_ephemeris' when not interpolating to main time """
|
|
959
|
+
|
|
960
|
+
line_label: Optional[Coord[LineLabel, str]]
|
|
961
|
+
""" Line labels (for line names and variables). """
|
|
962
|
+
|
|
963
|
+
line_names: Optional[
|
|
964
|
+
Coord[
|
|
965
|
+
Union[
|
|
966
|
+
tuple[LineLabel],
|
|
967
|
+
tuple[Time, LineLabel],
|
|
968
|
+
tuple[TimeEphemeris, LineLabel],
|
|
969
|
+
],
|
|
970
|
+
str,
|
|
971
|
+
]
|
|
972
|
+
]
|
|
973
|
+
""" Line names (e.g. v=1, J=1-0, SiO). """
|
|
974
|
+
|
|
975
|
+
FIELD_PHASE_CENTER: Optional[
|
|
976
|
+
Data[Union[ZD, tuple[Time], tuple[TimeEphemeris]], SkyCoordArray]
|
|
977
|
+
]
|
|
978
|
+
"""
|
|
979
|
+
Offset from the SOURCE_DIRECTION that gives the direction of phase
|
|
980
|
+
center for which the fringes have been stopped-that is a point source in
|
|
981
|
+
this direction will produce a constant measured phase (page 2 of
|
|
982
|
+
https://articles.adsabs.harvard.edu/pdf/1999ASPC..180...79F). For
|
|
983
|
+
conversion from MSv2, frame refers column keywords by default. If frame
|
|
984
|
+
varies with field, it refers DelayDir_Ref column instead.
|
|
985
|
+
"""
|
|
986
|
+
|
|
987
|
+
FIELD_REFERENCE_CENTER: Optional[
|
|
988
|
+
Data[Union[ZD, tuple[Time], tuple[TimeEphemeris]], SkyCoordArray]
|
|
989
|
+
]
|
|
990
|
+
"""
|
|
991
|
+
Used in single-dish to record the associated reference direction if positionswitching
|
|
992
|
+
been applied. For conversion from MSv2, frame refers column keywords by default. If
|
|
993
|
+
frame varies with field, it refers DelayDir_Ref column instead.
|
|
994
|
+
"""
|
|
995
|
+
|
|
996
|
+
SOURCE_LOCATION: Optional[
|
|
997
|
+
Data[
|
|
998
|
+
Union[
|
|
999
|
+
ZD,
|
|
1000
|
+
tuple[Time],
|
|
1001
|
+
tuple[TimeEphemeris],
|
|
1002
|
+
],
|
|
1003
|
+
SkyCoordArray,
|
|
1004
|
+
]
|
|
1005
|
+
]
|
|
1006
|
+
"""
|
|
1007
|
+
CASA Table Cols: RA,DEC,Rho."Astrometric RA and Dec and Geocentric
|
|
1008
|
+
distance with respect to the observer’s location (Geocentric). "Adjusted
|
|
1009
|
+
for light-time aberration only. With respect to the reference plane and
|
|
1010
|
+
equinox of the chosen system (ICRF or FK4/B1950). If the FK4/B1950 frame
|
|
1011
|
+
output is selected, elliptic aberration terms are added. Astrometric RA/DEC
|
|
1012
|
+
is generally used when comparing or reducing data against a star catalog."
|
|
1013
|
+
https://ssd.jpl.nasa.gov/horizons/manual.html : 1. Astrometric RA & DEC
|
|
1014
|
+
"""
|
|
1015
|
+
|
|
1016
|
+
LINE_REST_FREQUENCY: Optional[
|
|
1017
|
+
Data[
|
|
1018
|
+
Union[
|
|
1019
|
+
tuple[LineLabel],
|
|
1020
|
+
tuple[Time, LineLabel],
|
|
1021
|
+
tuple[TimeEphemeris, LineLabel],
|
|
1022
|
+
],
|
|
1023
|
+
SpectralCoordArray,
|
|
1024
|
+
]
|
|
1025
|
+
]
|
|
1026
|
+
""" Rest frequencies for the transitions. """
|
|
1027
|
+
|
|
1028
|
+
LINE_SYSTEMIC_VELOCITY: Optional[
|
|
1029
|
+
Data[
|
|
1030
|
+
Union[
|
|
1031
|
+
tuple[LineLabel],
|
|
1032
|
+
tuple[Time, LineLabel],
|
|
1033
|
+
tuple[TimeEphemeris, LineLabel],
|
|
1034
|
+
],
|
|
1035
|
+
QuantityInMetersPerSecondArray,
|
|
1036
|
+
]
|
|
1037
|
+
]
|
|
1038
|
+
""" Systemic velocity at reference """
|
|
1039
|
+
|
|
1040
|
+
SOURCE_RADIAL_VELOCITY: Optional[
|
|
1041
|
+
Data[
|
|
1042
|
+
Union[ZD, tuple[Time], tuple[TimeEphemeris]], QuantityInMetersPerSecondArray
|
|
1043
|
+
]
|
|
1044
|
+
]
|
|
1045
|
+
""" CASA Table Cols: RadVel. Geocentric distance rate """
|
|
1046
|
+
|
|
1047
|
+
NORTH_POLE_POSITION_ANGLE: Optional[
|
|
1048
|
+
Data[Union[ZD, tuple[Time], tuple[TimeEphemeris]], QuantityInRadiansArray]
|
|
1049
|
+
]
|
|
1050
|
+
""" CASA Table cols: NP_ang, "Targets' apparent north-pole position angle (counter-clockwise with respect to direction of true-of-date reference-frame north pole) and angular distance from the sub-observer point (center of disc) at print time. A negative distance indicates the north-pole is on the hidden hemisphere." https://ssd.jpl.nasa.gov/horizons/manual.html : 17. North pole position angle & distance from disc center. """
|
|
1051
|
+
|
|
1052
|
+
NORTH_POLE_ANGULAR_DISTANCE: Optional[
|
|
1053
|
+
Data[Union[ZD, tuple[Time], tuple[TimeEphemeris]], QuantityInRadiansArray]
|
|
1054
|
+
]
|
|
1055
|
+
""" CASA Table cols: NP_dist, "Targets' apparent north-pole position angle (counter-clockwise with respect to direction of true-of date reference-frame north pole) and angular distance from the sub-observer point (center of disc) at print time. A negative distance indicates the north-pole is on the hidden hemisphere."https://ssd.jpl.nasa.gov/horizons/manual.html : 17. North pole position angle & distance from disc center. """
|
|
1056
|
+
|
|
1057
|
+
SUB_OBSERVER_DIRECTION: Optional[
|
|
1058
|
+
Data[
|
|
1059
|
+
Union[
|
|
1060
|
+
ZD,
|
|
1061
|
+
tuple[Time],
|
|
1062
|
+
tuple[TimeEphemeris],
|
|
1063
|
+
],
|
|
1064
|
+
EllipsoidPosLocationArray,
|
|
1065
|
+
]
|
|
1066
|
+
]
|
|
1067
|
+
""" CASA Table cols: DiskLong, DiskLat. "Apparent planetodetic longitude and latitude of the center of the target disc seen by the OBSERVER at print-time. This is not exactly the same as the "nearest point" for a non-spherical target shape (since the center of the disc might not be the point closest to the observer), but is generally very close if not a very irregular body shape. The IAU2009 rotation models are used except for Earth and MOON, which use higher-precision models. For the gas giants Jupiter, Saturn, Uranus and Neptune, IAU2009 longitude is based on the "System III" prime meridian rotation angle of the magnetic field. By contrast, pole direction (thus latitude) is relative to the body dynamical equator. There can be an offset between the magnetic pole and the dynamical pole of rotation. Down-leg light travel-time from target to observer is taken into account. Latitude is the angle between the equatorial plane and perpendicular to the reference ellipsoid of the body and body oblateness thereby included. The reference ellipsoid is an oblate spheroid with a single flatness coefficient in which the y-axis body radius is taken to be the same value as the x-axis radius. Whether longitude is positive to the east or west for the target will be indicated at the end of the output ephemeris." https://ssd.jpl.nasa.gov/horizons/manual.html : 14. Observer sub-longitude & sub-latitude """
|
|
1068
|
+
|
|
1069
|
+
SUB_SOLAR_POSITION: Optional[
|
|
1070
|
+
Data[
|
|
1071
|
+
Union[
|
|
1072
|
+
ZD,
|
|
1073
|
+
tuple[Time],
|
|
1074
|
+
tuple[TimeEphemeris],
|
|
1075
|
+
],
|
|
1076
|
+
EllipsoidPosLocationArray,
|
|
1077
|
+
]
|
|
1078
|
+
]
|
|
1079
|
+
""" CASA Table cols: Sl_lon, Sl_lat, r. "Heliocentric distance along with "Apparent sub-solar longitude and latitude of the Sun on the target. The apparent planetodetic longitude and latitude of the center of the target disc as seen from the Sun, as seen by the observer at print-time. This is _NOT_ exactly the same as the "sub-solar" (nearest) point for a non-spherical target shape (since the center of the disc seen from the Sun might not be the closest point to the Sun), but is very close if not a highly irregular body shape. Light travel-time from Sun to target and from target to observer is taken into account. Latitude is the angle between the equatorial plane and the line perpendicular to the reference ellipsoid of the body. The reference ellipsoid is an oblate spheroid with a single flatness coefficient in which the y-axis body radius is taken to be the same value as the x-axis radius. Uses IAU2009 rotation models except for Earth and Moon, which uses a higher precision models. Values for Jupiter, Saturn, Uranus and Neptune are Set III, referring to rotation of their magnetic fields. Whether longitude is positive to the east or west for the target will be indicated at the end of the output ephemeris." https://ssd.jpl.nasa.gov/horizons/manual.html : 15. Solar sub-longitude & sub-latitude """
|
|
1080
|
+
|
|
1081
|
+
HELIOCENTRIC_RADIAL_VELOCITY: Optional[
|
|
1082
|
+
Data[
|
|
1083
|
+
Union[ZD, tuple[Time], tuple[TimeEphemeris]], QuantityInMetersPerSecondArray
|
|
1084
|
+
]
|
|
1085
|
+
]
|
|
1086
|
+
""" CASA Table cols: rdot."The Sun's apparent range-rate relative to the target, as seen by the observer. A positive "rdot" means the target was moving away from the Sun, negative indicates movement toward the Sun." https://ssd.jpl.nasa.gov/horizons/manual.html : 19. Solar range & range-rate (relative to target) """
|
|
1087
|
+
|
|
1088
|
+
OBSERVER_PHASE_ANGLE: Optional[
|
|
1089
|
+
Data[Union[ZD, tuple[Time], tuple[TimeEphemeris]], QuantityInRadiansArray]
|
|
1090
|
+
]
|
|
1091
|
+
""" CASA Table cols: phang.""phi" is the true PHASE ANGLE at the observers' location at print time. "PAB-LON" and "PAB-LAT" are the FK4/B1950 or ICRF/J2000 ecliptic longitude and latitude of the phase angle bisector direction; the outward directed angle bisecting the arc created by the apparent vector from Sun to target center and the astrometric vector from observer to target center. For an otherwise uniform ellipsoid, the time when its long-axis is perpendicular to the PAB direction approximately corresponds to lightcurve maximum (or maximum brightness) of the body. PAB is discussed in Harris et al., Icarus 57, 251-258 (1984)." https://ssd.jpl.nasa.gov/horizons/manual.html : Phase angle and bisector """
|
|
1092
|
+
|
|
1093
|
+
OBSERVER_POSITION: Optional[Data[ZD, LocationArray]]
|
|
1094
|
+
""" Observer location. """
|
|
1095
|
+
|
|
1096
|
+
# --- Attributes ---
|
|
1097
|
+
doppler_shift_velocity: Optional[Attr[UnitsOfDopplerShift]]
|
|
1098
|
+
""" Velocity definition of the Doppler shift, e.g., RADIO or OPTICAL velocity in m/s """
|
|
1099
|
+
|
|
1100
|
+
source_model_url: Optional[Attr[str]]
|
|
1101
|
+
"""URL to access source model"""
|
|
1102
|
+
ephemeris_name: Optional[Attr[str]]
|
|
1103
|
+
"""The name of the ephemeris. For example DE430.
|
|
1104
|
+
|
|
1105
|
+
This can be used with Astropy solar_system_ephemeris.set('DE430'), see
|
|
1106
|
+
https://docs.astropy.org/en/stable/coordinates/solarsystem.html.
|
|
1107
|
+
"""
|
|
1108
|
+
is_ephemeris: Attr[bool] = False
|
|
1109
|
+
|
|
1110
|
+
type: Attr[Literal["field_and_source"]] = "field_and_source"
|
|
1111
|
+
"""
|
|
1112
|
+
Type of dataset.
|
|
1113
|
+
"""
|
|
1114
|
+
|
|
1115
|
+
# --- Optional coordinates ---
|
|
1116
|
+
sky_dir_label: Optional[Coord[SkyDirLabel, str]] = ("ra", "dec")
|
|
1117
|
+
""" Coordinate labels of sky directions (typically shape 2 and 'ra', 'dec') """
|
|
1118
|
+
sky_pos_label: Optional[Coord[SkyPosLabel, str]] = ("ra", "dec", "dist")
|
|
1119
|
+
""" Coordinate lables of sky positions (typically shape 3 and 'ra', 'dec', 'dist') """
|
|
1120
|
+
ellipsoid_pos_label: Optional[Coord[EllipsoidPosLabel, str]] = (
|
|
1121
|
+
"lon",
|
|
1122
|
+
"lat",
|
|
1123
|
+
"height",
|
|
1124
|
+
)
|
|
1125
|
+
""" Coordinate labels of geodetic earth location data (typically shape 3 and 'lon', 'lat', 'height')"""
|
|
1126
|
+
cartesian_pos_label: Optional[Coord[CartesianPosLabel, str]] = ("x", "y", "z")
|
|
1127
|
+
""" Coordinate labels of geocentric earth location data (typically shape 3 and 'x', 'y', 'z')"""
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
@xarray_dataarray_schema
|
|
1131
|
+
class SpectrumArray:
|
|
1132
|
+
"""Definition of xr.DataArray for SPECTRUM data (single dish)"""
|
|
1133
|
+
|
|
1134
|
+
data: Data[
|
|
1135
|
+
tuple[Time, AntennaName, Frequency, Polarization],
|
|
1136
|
+
Union[numpy.float64, numpy.float32, numpy.float16],
|
|
1137
|
+
]
|
|
1138
|
+
|
|
1139
|
+
time: Coordof[TimeCoordArray]
|
|
1140
|
+
antenna_name: Coordof[AntennaNameArray]
|
|
1141
|
+
frequency: Coordof[FrequencyArray]
|
|
1142
|
+
polarization: Coordof[PolarizationArray]
|
|
1143
|
+
|
|
1144
|
+
field_and_source_xds: Attr[FieldSourceXds]
|
|
1145
|
+
long_name: Optional[Attr[str]] = "Spectrum values"
|
|
1146
|
+
""" Long-form name to use for axis. Should be ``"Spectrum values"``"""
|
|
1147
|
+
units: Attr[list[str]] = ("Jy",)
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
@xarray_dataarray_schema
|
|
1151
|
+
class VisibilityArray:
|
|
1152
|
+
"""Visibility data array in main dataset (interferometric data, :py:class:`VisibiiltyXds`)"""
|
|
1153
|
+
|
|
1154
|
+
data: Data[
|
|
1155
|
+
tuple[Time, BaselineId, Frequency, Polarization],
|
|
1156
|
+
Union[numpy.complex64, numpy.complex128],
|
|
1157
|
+
]
|
|
1158
|
+
|
|
1159
|
+
time: Coordof[TimeCoordArray]
|
|
1160
|
+
baseline_id: Coordof[BaselineArray]
|
|
1161
|
+
polarization: Coordof[PolarizationArray]
|
|
1162
|
+
frequency: Coordof[FrequencyArray]
|
|
1163
|
+
|
|
1164
|
+
field_and_source_xds: Attr[FieldSourceXds]
|
|
1165
|
+
long_name: Optional[Attr[str]] = "Visibility values"
|
|
1166
|
+
""" Long-form name to use for axis. Should be ``"Visibility values"``"""
|
|
1167
|
+
units: Attr[list[str]] = ("Jy",)
|
|
1168
|
+
|
|
1169
|
+
allow_mutiple_versions: Optional[Attr[bool]] = True
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
# Info dicts
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
@dict_schema
|
|
1176
|
+
class PartitionInfoDict:
|
|
1177
|
+
# spectral_window_id: missing / remove for good?
|
|
1178
|
+
spectral_window_name: str
|
|
1179
|
+
""" Spectral window Name """
|
|
1180
|
+
# field_id: missing / probably remove for good?
|
|
1181
|
+
field_name: list[str]
|
|
1182
|
+
""" List of all field names """
|
|
1183
|
+
polarization_setup: list[str]
|
|
1184
|
+
""" List of polrization bases. """
|
|
1185
|
+
scan_number: list[int]
|
|
1186
|
+
""" List of scan numbers. """
|
|
1187
|
+
source_name: list[str]
|
|
1188
|
+
""" List of source names. """
|
|
1189
|
+
# source_id: mising / remove for good?
|
|
1190
|
+
intents: list[str]
|
|
1191
|
+
""" Infromation in obs_mode column of MSv2 State table. """
|
|
1192
|
+
taql: Optional[str]
|
|
1193
|
+
""" The taql query used if converted from MSv2. """
|
|
1194
|
+
line_name: list[str]
|
|
1195
|
+
""" Spectral line names """
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
@dict_schema
|
|
1199
|
+
class ObservationInfoDict:
|
|
1200
|
+
observer: list
|
|
1201
|
+
"""List of observer names."""
|
|
1202
|
+
project: str
|
|
1203
|
+
"""Project Code/Project_UID"""
|
|
1204
|
+
release_date: str
|
|
1205
|
+
"""Project release date. This is the date on which the data may become
|
|
1206
|
+
public. Format: YYYY-MM-DDTHH:mm:ss.SSS (ISO 8601)"""
|
|
1207
|
+
execution_block_id: Optional[str]
|
|
1208
|
+
""" ASDM: Indicates the position of the execution block in the project
|
|
1209
|
+
(sequential numbering starting at 1). """
|
|
1210
|
+
execution_block_number: Optional[int]
|
|
1211
|
+
"""ASDM: Indicates the position of the execution block in the project
|
|
1212
|
+
(sequential numbering starting at 1)."""
|
|
1213
|
+
execution_block_UID: Optional[str]
|
|
1214
|
+
"""ASDM: The archive’s UID of the execution block."""
|
|
1215
|
+
session_reference: Optional[str]
|
|
1216
|
+
"""ASDM: The observing session reference."""
|
|
1217
|
+
observing_script: Optional[str]
|
|
1218
|
+
"""ASDM: The text of the observation script."""
|
|
1219
|
+
observing_script_UID: Optional[str]
|
|
1220
|
+
"""ASDM: A reference to the Entity which contains the observing script."""
|
|
1221
|
+
observing_log: Optional[str]
|
|
1222
|
+
"""ASDM: Logs of the observation during this execu- tion block."""
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
@dict_schema
|
|
1226
|
+
class ProcessorInfoDict:
|
|
1227
|
+
type: str
|
|
1228
|
+
"""Processor type; reserved keywords include (”CORRELATOR” -
|
|
1229
|
+
interferometric correlator; ”SPECTROMETER” - single-dish correlator;
|
|
1230
|
+
”RADIOMETER” - generic detector/integrator)."""
|
|
1231
|
+
sub_type: str
|
|
1232
|
+
"""Processor sub-type, e.g. ”GBT” or ”JIVE”."""
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
# Data Sets
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
@xarray_dataset_schema
|
|
1239
|
+
class AntennaXds:
|
|
1240
|
+
"""
|
|
1241
|
+
Antenna dataset: global antenna properties for each antenna.
|
|
1242
|
+
"""
|
|
1243
|
+
|
|
1244
|
+
# Coordinates
|
|
1245
|
+
antenna_name: Coordof[AntennaNameArray]
|
|
1246
|
+
""" Antenna name """
|
|
1247
|
+
station: Coord[AntennaName, str]
|
|
1248
|
+
""" Name of the station pad (relevant to arrays with moving antennas). """
|
|
1249
|
+
mount: Coord[AntennaName, str]
|
|
1250
|
+
""" Mount type of the antenna. Reserved keywords include: ”EQUATORIAL” - equatorial mount;
|
|
1251
|
+
”ALT-AZ” - azimuth-elevation mount;
|
|
1252
|
+
"ALT-AZ+ROTATOR" alt-az mount with feed rotator; introduced for ASKAP dishes;
|
|
1253
|
+
"ALT-AZ+NASMYTH-R": Nasmyth mount with receivers at the right-hand side of the cabin. Many high-frequency antennas used for VLBI have such a mount typel;
|
|
1254
|
+
"ALT-AZ+NASMYTH-L:: Nasmyth mount with receivers at the left-hand side of the cabin.
|
|
1255
|
+
”X-Y” - x-y mount;
|
|
1256
|
+
”SPACE-HALCA” - specific orientation model."""
|
|
1257
|
+
telescope_name: Coord[AntennaName, str]
|
|
1258
|
+
""" Useful when data is combined from mutiple arrays for example ACA + ALMA. """
|
|
1259
|
+
receptor_label: Coord[ReceptorLabel, str]
|
|
1260
|
+
""" Names of receptors """
|
|
1261
|
+
polarization_type: Coord[tuple[AntennaName, ReceptorLabel], str]
|
|
1262
|
+
""" Polarization type to which each receptor responds (e.g. ”R”,”L”,”X” or ”Y”).
|
|
1263
|
+
This is the receptor polarization type as recorded in the final correlated data (e.g. ”RR”); i.e.
|
|
1264
|
+
as measured after all polarization combiners. ['X','Y'], ['R','L'] """
|
|
1265
|
+
cartesian_pos_label: Optional[Coord[CartesianPosLabel, str]]
|
|
1266
|
+
""" (x,y,z) - either cartesian or ellipsoid """
|
|
1267
|
+
ellipsoid_pos_label: Optional[Coord[EllipsoidPosLabel, str]]
|
|
1268
|
+
""" (lon, lat, dist) - either cartesian or ellipsoid"""
|
|
1269
|
+
|
|
1270
|
+
# Data variables
|
|
1271
|
+
ANTENNA_POSITION: Data[tuple[AntennaName], LocationArray]
|
|
1272
|
+
"""
|
|
1273
|
+
In a right-handed frame, X towards the intersection of the equator and
|
|
1274
|
+
the Greenwich meridian, Z towards the pole.
|
|
1275
|
+
"""
|
|
1276
|
+
ANTENNA_DISH_DIAMETER: Optional[Data[tuple[AntennaName], QuantityInMetersArray]]
|
|
1277
|
+
"""
|
|
1278
|
+
The diameter of the main reflector (or the largest dimension for non-circular apertures).
|
|
1279
|
+
"""
|
|
1280
|
+
ANTENNA_EFFECTIVE_DISH_DIAMETER: Optional[
|
|
1281
|
+
Data[tuple[AntennaName], QuantityInMetersArray]
|
|
1282
|
+
]
|
|
1283
|
+
""" Effective dish diameter used in computing beam model (such as airy disk). """
|
|
1284
|
+
|
|
1285
|
+
ANTENNA_BLOCKAGE: Optional[Data[tuple[AntennaName], QuantityInMetersArray]]
|
|
1286
|
+
"""
|
|
1287
|
+
Blockage caused by secondary reflector used in computing beam model (such as airy disk).
|
|
1288
|
+
"""
|
|
1289
|
+
|
|
1290
|
+
# TODO: setting BEAM_OFFSET and RECEPTOR_ANGLE as optional for now, as it
|
|
1291
|
+
# is not present in some datasets (example: test_alma_ephemris_mosaic)
|
|
1292
|
+
ANTENNA_RECEPTOR_ANGLE: Optional[
|
|
1293
|
+
Data[tuple[AntennaName, ReceptorLabel], QuantityInRadiansArray]
|
|
1294
|
+
]
|
|
1295
|
+
"""
|
|
1296
|
+
Polarization reference angle. Converts into parallactic angle in the sky domain.
|
|
1297
|
+
"""
|
|
1298
|
+
ANTENNA_FOCUS_LENGTH: Optional[Data[tuple[AntennaName], QuantityInMetersArray]]
|
|
1299
|
+
"""
|
|
1300
|
+
Focus length. As defined along the optical axis of the antenna.
|
|
1301
|
+
"""
|
|
1302
|
+
|
|
1303
|
+
# Attributes
|
|
1304
|
+
overall_telescope_name: Optional[Attr[str]]
|
|
1305
|
+
"""
|
|
1306
|
+
The name of the collection of arrays and dishes that were used for the observation.
|
|
1307
|
+
In many instances this will only be a single array or dish. An example of a
|
|
1308
|
+
telescope consistening of mutiple arrays and dishes is the EHT. The coordinate
|
|
1309
|
+
telescope_name will give the names of the constituent arrays and dishes. From
|
|
1310
|
+
MSv2 observation table.
|
|
1311
|
+
"""
|
|
1312
|
+
relocatable_antennas: Optional[Attr[bool]]
|
|
1313
|
+
""" Can the antennas be moved (ALMA, VLA, NOEMA) """
|
|
1314
|
+
type: Attr[Literal["antenna"]] = "antenna"
|
|
1315
|
+
"""
|
|
1316
|
+
Type of dataset. Expected to be ``antenna``
|
|
1317
|
+
"""
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
@xarray_dataset_schema
|
|
1321
|
+
class GainCurveXds:
|
|
1322
|
+
"""
|
|
1323
|
+
Gain curve dataset. See See https://casacore.github.io/casacore-notes/265.pdf for a full description.
|
|
1324
|
+
"""
|
|
1325
|
+
|
|
1326
|
+
# Coordinates
|
|
1327
|
+
antenna_name: Coordof[AntennaNameArray]
|
|
1328
|
+
""" Antenna name """
|
|
1329
|
+
station: Coord[AntennaName, str]
|
|
1330
|
+
""" Name of the station pad (relevant to arrays with moving antennas). """
|
|
1331
|
+
mount: Coord[AntennaName, str]
|
|
1332
|
+
""" Mount type of the antenna. Reserved keywords include: ”EQUATORIAL” - equatorial mount;
|
|
1333
|
+
”ALT-AZ” - azimuth-elevation mount;
|
|
1334
|
+
"ALT-AZ+ROTATOR" alt-az mount with feed rotator; introduced for ASKAP dishes;
|
|
1335
|
+
"ALT-AZ+NASMYTH-R": Nasmyth mount with receivers at the right-hand side of the cabin. Many high-frequency antennas used for VLBI have such a mount typel;
|
|
1336
|
+
"ALT-AZ+NASMYTH-L:: Nasmyth mount with receivers at the left-hand side of the cabin.
|
|
1337
|
+
”X-Y” - x-y mount;
|
|
1338
|
+
”SPACE-HALCA” - specific orientation model."""
|
|
1339
|
+
telescope_name: Coord[AntennaName, str]
|
|
1340
|
+
""" Useful when data is combined from mutiple arrays for example ACA + ALMA. """
|
|
1341
|
+
receptor_label: Coord[ReceptorLabel, str]
|
|
1342
|
+
""" Names of receptors """
|
|
1343
|
+
polarization_type: Optional[Coord[tuple[AntennaName, ReceptorLabel], str]]
|
|
1344
|
+
""" Polarization type to which each receptor responds (e.g. ”R”,”L”,”X” or ”Y”).
|
|
1345
|
+
This is the receptor polarization type as recorded in the final correlated data (e.g. ”RR”); i.e.
|
|
1346
|
+
as measured after all polarization combiners. ['X','Y'], ['R','L'] """
|
|
1347
|
+
gain_curve_type: Optional[Coord[AntennaName, str]]
|
|
1348
|
+
"""
|
|
1349
|
+
Gain curve type. Reserved keywords include:
|
|
1350
|
+
(”POWER(EL)” - Power as a function of elevation;
|
|
1351
|
+
”POWER(ZA)” - Power as a function of zenith angle;
|
|
1352
|
+
”VOLTAGE(EL)” - Voltage as a function of elevation;
|
|
1353
|
+
”VOLTAGE(ZA)” - Voltage as a function of zenith angle). See https://casacore.github.io/casacore-notes/265.pdf
|
|
1354
|
+
"""
|
|
1355
|
+
poly_term: Coord[PolyTerm, int]
|
|
1356
|
+
"""Term orders in gain curve polynomial"""
|
|
1357
|
+
|
|
1358
|
+
GAIN_CURVE: Data[tuple[AntennaName, PolyTerm, ReceptorLabel], numpy.float64]
|
|
1359
|
+
""" Coefficients of the polynomial that describes the (power or voltage) gain. """
|
|
1360
|
+
GAIN_CURVE_INTERVAL: Data[tuple[AntennaName], QuantityInSecondsArray]
|
|
1361
|
+
""" Time interval. """
|
|
1362
|
+
GAIN_CURVE_SENSITIVITY: Data[
|
|
1363
|
+
tuple[AntennaName, ReceptorLabel], QuantityInKelvinPerJanskyArray
|
|
1364
|
+
]
|
|
1365
|
+
""" Sensitivity of the antenna expressed in K/Jy. This is what AIPS calls “DPFU”. """
|
|
1366
|
+
|
|
1367
|
+
measured_date: Attr[str]
|
|
1368
|
+
"""
|
|
1369
|
+
Date gain curve was measured. Format: YYYY-MM-DDTHH:mm:ss.SSS (ISO 8601)
|
|
1370
|
+
"""
|
|
1371
|
+
type: Attr[Literal["gain_curve"]] = "gain_curve"
|
|
1372
|
+
"""
|
|
1373
|
+
Type of dataset. Expected to be ``gain_curve``
|
|
1374
|
+
"""
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
@xarray_dataset_schema
|
|
1378
|
+
class PhaseCalibrationXds:
|
|
1379
|
+
"""
|
|
1380
|
+
Phase calibration dataset: signal chain phase calibration measurements.
|
|
1381
|
+
"""
|
|
1382
|
+
|
|
1383
|
+
# Coordinates
|
|
1384
|
+
antenna_name: Coordof[AntennaNameArray]
|
|
1385
|
+
""" Antenna name """
|
|
1386
|
+
station: Coord[AntennaName, str]
|
|
1387
|
+
""" Name of the station pad (relevant to arrays with moving antennas). """
|
|
1388
|
+
mount: Coord[AntennaName, str]
|
|
1389
|
+
""" Mount type of the antenna. Reserved keywords include: ”EQUATORIAL” - equatorial mount;
|
|
1390
|
+
”ALT-AZ” - azimuth-elevation mount;
|
|
1391
|
+
"ALT-AZ+ROTATOR" alt-az mount with feed rotator; introduced for ASKAP dishes;
|
|
1392
|
+
"ALT-AZ+NASMYTH-R": Nasmyth mount with receivers at the right-hand side of the cabin. Many high-frequency antennas used for VLBI have such a mount typel;
|
|
1393
|
+
"ALT-AZ+NASMYTH-L:: Nasmyth mount with receivers at the left-hand side of the cabin.
|
|
1394
|
+
”X-Y” - x-y mount;
|
|
1395
|
+
”SPACE-HALCA” - specific orientation model."""
|
|
1396
|
+
telescope_name: Coord[AntennaName, str]
|
|
1397
|
+
""" Useful when data is combined from mutiple arrays for example ACA + ALMA. """
|
|
1398
|
+
receptor_label: Coord[ReceptorLabel, str]
|
|
1399
|
+
""" Names of receptors """
|
|
1400
|
+
polarization_type: Optional[Coord[tuple[AntennaName, ReceptorLabel], str]]
|
|
1401
|
+
""" Polarization type to which each receptor responds (e.g. ”R”,”L”,”X” or ”Y”).
|
|
1402
|
+
This is the receptor polarization type as recorded in the final correlated data (e.g. ”RR”); i.e.
|
|
1403
|
+
as measured after all polarization combiners. ['X','Y'], ['R','L'] """
|
|
1404
|
+
time: Optional[Coordof[TimeInterpolatedCoordArray]]
|
|
1405
|
+
""" Time for VLBI phase cal"""
|
|
1406
|
+
time_phase_cal: Optional[Coord[TimePhaseCal, numpy.float64]]
|
|
1407
|
+
""" Time for VLBI phase cal"""
|
|
1408
|
+
tone_label: Optional[Coord[ToneLabel, str]]
|
|
1409
|
+
"""
|
|
1410
|
+
Phase-cal tones that are measured. This number may vary by antenna, and may vary by spectral window as well, especially
|
|
1411
|
+
if spectral windows of varying widths are supported
|
|
1412
|
+
"""
|
|
1413
|
+
|
|
1414
|
+
PHASE_CAL: Data[
|
|
1415
|
+
Union[
|
|
1416
|
+
tuple[AntennaName, Time, ReceptorLabel, ToneLabel],
|
|
1417
|
+
tuple[AntennaName, TimePhaseCal, ReceptorLabel, ToneLabel],
|
|
1418
|
+
],
|
|
1419
|
+
numpy.complex64,
|
|
1420
|
+
]
|
|
1421
|
+
"""
|
|
1422
|
+
Phase calibration measurements. These are provided as complex values that represent both the phase
|
|
1423
|
+
and amplitude for a measured phase-cal tone. Measurements are provided as a two-dimensional array such that
|
|
1424
|
+
separate measurements can be provided for each receptor of a feed (so separate values for each polarization)
|
|
1425
|
+
for each of the measured tones. See https://casacore.github.io/casacore-notes/265.pdf
|
|
1426
|
+
"""
|
|
1427
|
+
PHASE_CAL_CABLE_CAL: Data[
|
|
1428
|
+
Union[tuple[AntennaName, Time], tuple[AntennaName, TimePhaseCal]],
|
|
1429
|
+
QuantityInSecondsArray,
|
|
1430
|
+
]
|
|
1431
|
+
"""
|
|
1432
|
+
Cable calibration measurement. This is a measurement of the delay in the cable that provides the
|
|
1433
|
+
reference signal to the receiver. There should be only a single reference signal per feed (even if that feed has
|
|
1434
|
+
multiple receptors) so this is provided as a simple scalar. See https://casacore.github.io/casacore-notes/265.pdf
|
|
1435
|
+
"""
|
|
1436
|
+
PHASE_CAL_INTERVAL: Data[
|
|
1437
|
+
Union[tuple[AntennaName, Time], tuple[AntennaName, TimePhaseCal]],
|
|
1438
|
+
QuantityInSecondsArray,
|
|
1439
|
+
]
|
|
1440
|
+
"""
|
|
1441
|
+
Time interval. See https://casacore.github.io/casacore-notes/265.pdf
|
|
1442
|
+
"""
|
|
1443
|
+
PHASE_CAL_TONE_FREQUENCY: Data[
|
|
1444
|
+
Union[
|
|
1445
|
+
tuple[AntennaName, Time, ReceptorLabel, ToneLabel],
|
|
1446
|
+
tuple[AntennaName, TimePhaseCal, ReceptorLabel, ToneLabel],
|
|
1447
|
+
],
|
|
1448
|
+
QuantityInHertzArray,
|
|
1449
|
+
]
|
|
1450
|
+
"""
|
|
1451
|
+
The sky frequencies of each measured phase-cal tone. See https://casacore.github.io/casacore-notes/265.pdf
|
|
1452
|
+
"""
|
|
1453
|
+
|
|
1454
|
+
type: Attr[Literal["phase_calibration"]] = "phase_calibration"
|
|
1455
|
+
"""
|
|
1456
|
+
Type of dataset. Expected to be ``phase_calibration``
|
|
1457
|
+
"""
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
@xarray_dataset_schema
|
|
1461
|
+
class WeatherXds:
|
|
1462
|
+
"""
|
|
1463
|
+
Weather dataset: station positions and time-dependent mean external atmosphere and weather information
|
|
1464
|
+
"""
|
|
1465
|
+
|
|
1466
|
+
# Coordinates
|
|
1467
|
+
station_name: Coord[StationName, str]
|
|
1468
|
+
""" Station identifier """
|
|
1469
|
+
time: Optional[Coordof[TimeInterpolatedCoordArray]]
|
|
1470
|
+
""" Mid-point of the time interval. Labeled 'time' when interpolated to main time axis """
|
|
1471
|
+
time_weather: Optional[Coordof[TimeWeatherCoordArray]]
|
|
1472
|
+
""" Mid-point of the time interval. Labeled 'time_cal' when not interpolated to main time axis """
|
|
1473
|
+
antenna_name: Optional[Coordof[AntennaNameArray]]
|
|
1474
|
+
""" Antenna identifier """
|
|
1475
|
+
ellipsoid_pos_label: Optional[Coord[EllipsoidPosLabel, str]] = (
|
|
1476
|
+
"lon",
|
|
1477
|
+
"lat",
|
|
1478
|
+
"height",
|
|
1479
|
+
)
|
|
1480
|
+
""" Coordinate labels of geodetic earth location data (typically shape 3 and 'lon', 'lat', 'height')"""
|
|
1481
|
+
cartesian_pos_label: Optional[Coord[CartesianPosLabel, str]] = ("x", "y", "z")
|
|
1482
|
+
""" Coordinate labels of geocentric earth location data (typically shape 3 and 'x', 'y', 'z')"""
|
|
1483
|
+
|
|
1484
|
+
# Data variables (all optional)
|
|
1485
|
+
H2O: Optional[
|
|
1486
|
+
Data[
|
|
1487
|
+
Union[tuple[StationName, Time], tuple[StationName, TimeWeather]],
|
|
1488
|
+
QuantityInPerSquareMetersArray,
|
|
1489
|
+
]
|
|
1490
|
+
] = None
|
|
1491
|
+
""" Average column density of water """
|
|
1492
|
+
IONOS_ELECTRON: Optional[
|
|
1493
|
+
Data[
|
|
1494
|
+
Union[
|
|
1495
|
+
tuple[StationName, Time],
|
|
1496
|
+
tuple[StationName, TimeWeather],
|
|
1497
|
+
],
|
|
1498
|
+
QuantityInPerSquareMetersArray,
|
|
1499
|
+
]
|
|
1500
|
+
] = None
|
|
1501
|
+
""" Average column density of electrons """
|
|
1502
|
+
PRESSURE: Optional[
|
|
1503
|
+
Data[
|
|
1504
|
+
Union[
|
|
1505
|
+
tuple[StationName, Time],
|
|
1506
|
+
tuple[StationName, TimeWeather],
|
|
1507
|
+
],
|
|
1508
|
+
QuantityInPascalArray,
|
|
1509
|
+
]
|
|
1510
|
+
] = None
|
|
1511
|
+
""" Ambient atmospheric pressure """
|
|
1512
|
+
REL_HUMIDITY: Optional[
|
|
1513
|
+
Data[
|
|
1514
|
+
Union[
|
|
1515
|
+
tuple[StationName, Time],
|
|
1516
|
+
tuple[StationName, TimeWeather],
|
|
1517
|
+
],
|
|
1518
|
+
numpy.float64,
|
|
1519
|
+
]
|
|
1520
|
+
] = None
|
|
1521
|
+
""" Ambient relative humidity """
|
|
1522
|
+
TEMPERATURE: Optional[
|
|
1523
|
+
Data[
|
|
1524
|
+
Union[
|
|
1525
|
+
tuple[StationName, Time],
|
|
1526
|
+
tuple[StationName, TimeWeather],
|
|
1527
|
+
],
|
|
1528
|
+
QuantityInKelvinArray,
|
|
1529
|
+
]
|
|
1530
|
+
] = None
|
|
1531
|
+
""" Ambient air temperature for an antenna """
|
|
1532
|
+
DEW_POINT: Optional[
|
|
1533
|
+
Data[
|
|
1534
|
+
Union[
|
|
1535
|
+
tuple[StationName, Time],
|
|
1536
|
+
tuple[StationName, TimeWeather],
|
|
1537
|
+
],
|
|
1538
|
+
QuantityInKelvinArray,
|
|
1539
|
+
]
|
|
1540
|
+
] = None
|
|
1541
|
+
""" Dew point """
|
|
1542
|
+
WIND_DIRECTION: Optional[
|
|
1543
|
+
Data[
|
|
1544
|
+
Union[
|
|
1545
|
+
tuple[StationName, Time],
|
|
1546
|
+
tuple[StationName, TimeWeather],
|
|
1547
|
+
],
|
|
1548
|
+
QuantityInRadiansArray,
|
|
1549
|
+
]
|
|
1550
|
+
] = None
|
|
1551
|
+
""" Average wind direction """
|
|
1552
|
+
WIND_SPEED: Optional[
|
|
1553
|
+
Data[
|
|
1554
|
+
Union[
|
|
1555
|
+
tuple[StationName, Time],
|
|
1556
|
+
tuple[StationName, TimeWeather],
|
|
1557
|
+
],
|
|
1558
|
+
QuantityInMetersPerSecondArray,
|
|
1559
|
+
]
|
|
1560
|
+
] = None
|
|
1561
|
+
""" Average wind speed """
|
|
1562
|
+
STATION_POSITION: Optional[Data[tuple[StationName], LocationArray]] = None
|
|
1563
|
+
""" Station position """
|
|
1564
|
+
|
|
1565
|
+
# Attributes
|
|
1566
|
+
type: Attr[Literal["weather"]] = "weather"
|
|
1567
|
+
"""
|
|
1568
|
+
Type of dataset.
|
|
1569
|
+
"""
|
|
1570
|
+
|
|
1571
|
+
|
|
1572
|
+
@xarray_dataset_schema
|
|
1573
|
+
class PointingXds:
|
|
1574
|
+
"""
|
|
1575
|
+
Pointing dataset: antenna pointing information.
|
|
1576
|
+
"""
|
|
1577
|
+
|
|
1578
|
+
antenna_name: Coordof[AntennaNameArray]
|
|
1579
|
+
"""
|
|
1580
|
+
Antenna name, as specified by baseline_antenna1/2_name in visibility dataset
|
|
1581
|
+
"""
|
|
1582
|
+
|
|
1583
|
+
local_sky_dir_label: Coord[LocalSkyDirLabel, str]
|
|
1584
|
+
"""
|
|
1585
|
+
Direction labels.
|
|
1586
|
+
"""
|
|
1587
|
+
|
|
1588
|
+
POINTING_BEAM: Data[
|
|
1589
|
+
Union[
|
|
1590
|
+
tuple[Time, AntennaName],
|
|
1591
|
+
tuple[TimePointing, AntennaName],
|
|
1592
|
+
tuple[Time, AntennaName, nPolynomial],
|
|
1593
|
+
tuple[TimePointing, AntennaName, nPolynomial],
|
|
1594
|
+
],
|
|
1595
|
+
LocalSkyCoordArray,
|
|
1596
|
+
]
|
|
1597
|
+
"""
|
|
1598
|
+
Antenna pointing direction, optionally expressed as polynomial coefficients. DIRECTION in MSv3.
|
|
1599
|
+
"""
|
|
1600
|
+
|
|
1601
|
+
time: Optional[Coordof[TimeInterpolatedCoordArray]] = None
|
|
1602
|
+
"""
|
|
1603
|
+
Mid-point of the time interval for which the information in this row is
|
|
1604
|
+
valid. Required to use the same time measure reference as in visibility dataset.
|
|
1605
|
+
Labeled 'time' when interpolating to main time axis.
|
|
1606
|
+
"""
|
|
1607
|
+
time_pointing: Optional[Coordof[TimePointingCoordArray]] = None
|
|
1608
|
+
""" Midpoint of time for which this set of parameters is accurate. Labeled
|
|
1609
|
+
'time_pointing' when not interpolating to main time axis """
|
|
1610
|
+
|
|
1611
|
+
POINTING_DISH_MEASURED: Optional[
|
|
1612
|
+
Data[
|
|
1613
|
+
Union[
|
|
1614
|
+
tuple[Time, AntennaName],
|
|
1615
|
+
tuple[TimePointing, AntennaName],
|
|
1616
|
+
],
|
|
1617
|
+
LocalSkyCoordArray,
|
|
1618
|
+
]
|
|
1619
|
+
] = None
|
|
1620
|
+
"""
|
|
1621
|
+
The current encoder values on the primary axes of the mount type for
|
|
1622
|
+
the antenna. ENCODER in MSv3.
|
|
1623
|
+
"""
|
|
1624
|
+
POINTING_OVER_THE_TOP: Optional[
|
|
1625
|
+
Data[Union[tuple[Time, AntennaName], tuple[TimePointing, AntennaName]], bool]
|
|
1626
|
+
] = None
|
|
1627
|
+
|
|
1628
|
+
# Attributes
|
|
1629
|
+
type: Attr[Literal["pointing"]] = "pointing"
|
|
1630
|
+
"""
|
|
1631
|
+
Type of dataset.
|
|
1632
|
+
"""
|
|
1633
|
+
|
|
1634
|
+
|
|
1635
|
+
@xarray_dataset_schema
|
|
1636
|
+
class SystemCalibrationXds:
|
|
1637
|
+
"""
|
|
1638
|
+
System calibration dataset: time- and frequency- variable calibration measurements for each antenna,
|
|
1639
|
+
as indexed on receptor
|
|
1640
|
+
"""
|
|
1641
|
+
|
|
1642
|
+
# Coordinates
|
|
1643
|
+
antenna_name: Coordof[AntennaNameArray]
|
|
1644
|
+
""" Antenna identifier """
|
|
1645
|
+
receptor_label: Coord[ReceptorLabel, numpy.int64]
|
|
1646
|
+
""" """
|
|
1647
|
+
time: Optional[Coordof[TimeInterpolatedCoordArray]] = None
|
|
1648
|
+
""" Midpoint of time for which this set of parameters is accurate. Labeled 'time' when interpolating to main time axis """
|
|
1649
|
+
time_cal: Optional[Coordof[TimeCalCoordArray]] = None
|
|
1650
|
+
""" Midpoint of time for which this set of parameters is accurate. Labeled 'time_cal' when not interpolating to main time axis """
|
|
1651
|
+
frequency: Optional[Coordof[FrequencyCalArray]] = None
|
|
1652
|
+
""" """
|
|
1653
|
+
frequency_cal: Optional[Coord[FrequencyCal, int]] = None
|
|
1654
|
+
"""TODO: What is this?"""
|
|
1655
|
+
|
|
1656
|
+
# Data variables (all optional)
|
|
1657
|
+
PHASE_DIFFERENCE: Optional[
|
|
1658
|
+
Data[
|
|
1659
|
+
Union[tuple[AntennaName, TimeCal], tuple[AntennaName, Time]],
|
|
1660
|
+
QuantityInRadiansArray,
|
|
1661
|
+
]
|
|
1662
|
+
] = None
|
|
1663
|
+
""" Phase difference between receptor 0 and receptor 1 """
|
|
1664
|
+
TCAL: Optional[
|
|
1665
|
+
Data[
|
|
1666
|
+
Union[
|
|
1667
|
+
tuple[AntennaName, TimeCal, ReceptorLabel, FrequencyCal],
|
|
1668
|
+
tuple[AntennaName, TimeCal, ReceptorLabel, Frequency],
|
|
1669
|
+
tuple[AntennaName, TimeCal, ReceptorLabel],
|
|
1670
|
+
tuple[AntennaName, Time, ReceptorLabel, FrequencyCal],
|
|
1671
|
+
tuple[AntennaName, Time, ReceptorLabel, Frequency],
|
|
1672
|
+
tuple[AntennaName, Time, ReceptorLabel],
|
|
1673
|
+
],
|
|
1674
|
+
QuantityInKelvinArray,
|
|
1675
|
+
]
|
|
1676
|
+
] = None
|
|
1677
|
+
""" Calibration temp """
|
|
1678
|
+
TRX: Optional[
|
|
1679
|
+
Data[
|
|
1680
|
+
Union[
|
|
1681
|
+
tuple[AntennaName, TimeCal, ReceptorLabel, FrequencyCal],
|
|
1682
|
+
tuple[AntennaName, TimeCal, ReceptorLabel, Frequency],
|
|
1683
|
+
tuple[AntennaName, TimeCal, ReceptorLabel],
|
|
1684
|
+
tuple[AntennaName, Time, ReceptorLabel, FrequencyCal],
|
|
1685
|
+
tuple[AntennaName, Time, ReceptorLabel, Frequency],
|
|
1686
|
+
tuple[AntennaName, Time, ReceptorLabel],
|
|
1687
|
+
],
|
|
1688
|
+
QuantityInKelvinArray,
|
|
1689
|
+
]
|
|
1690
|
+
] = None
|
|
1691
|
+
""" Receiver temperature """
|
|
1692
|
+
TSKY: Optional[
|
|
1693
|
+
Data[
|
|
1694
|
+
Union[
|
|
1695
|
+
tuple[AntennaName, TimeCal, ReceptorLabel, FrequencyCal],
|
|
1696
|
+
tuple[AntennaName, TimeCal, ReceptorLabel, Frequency],
|
|
1697
|
+
tuple[AntennaName, TimeCal, ReceptorLabel],
|
|
1698
|
+
tuple[AntennaName, Time, ReceptorLabel, FrequencyCal],
|
|
1699
|
+
tuple[AntennaName, Time, ReceptorLabel, Frequency],
|
|
1700
|
+
tuple[AntennaName, Time, ReceptorLabel],
|
|
1701
|
+
],
|
|
1702
|
+
QuantityInKelvinArray,
|
|
1703
|
+
]
|
|
1704
|
+
] = None
|
|
1705
|
+
""" Sky temperature """
|
|
1706
|
+
TSYS: Optional[
|
|
1707
|
+
Data[
|
|
1708
|
+
Union[
|
|
1709
|
+
tuple[AntennaName, TimeCal, ReceptorLabel, FrequencyCal],
|
|
1710
|
+
tuple[AntennaName, TimeCal, ReceptorLabel, Frequency],
|
|
1711
|
+
tuple[AntennaName, TimeCal, ReceptorLabel],
|
|
1712
|
+
tuple[AntennaName, Time, ReceptorLabel, FrequencyCal],
|
|
1713
|
+
tuple[AntennaName, Time, ReceptorLabel, Frequency],
|
|
1714
|
+
tuple[AntennaName, Time, ReceptorLabel],
|
|
1715
|
+
],
|
|
1716
|
+
QuantityInKelvinArray,
|
|
1717
|
+
]
|
|
1718
|
+
] = None
|
|
1719
|
+
""" System temperature """
|
|
1720
|
+
TANT: Optional[
|
|
1721
|
+
Data[
|
|
1722
|
+
Union[
|
|
1723
|
+
tuple[AntennaName, TimeCal, ReceptorLabel, FrequencyCal],
|
|
1724
|
+
tuple[AntennaName, TimeCal, ReceptorLabel, Frequency],
|
|
1725
|
+
tuple[AntennaName, TimeCal, ReceptorLabel],
|
|
1726
|
+
tuple[AntennaName, Time, ReceptorLabel, FrequencyCal],
|
|
1727
|
+
tuple[AntennaName, Time, ReceptorLabel, Frequency],
|
|
1728
|
+
tuple[AntennaName, Time, ReceptorLabel],
|
|
1729
|
+
],
|
|
1730
|
+
QuantityInKelvinArray,
|
|
1731
|
+
]
|
|
1732
|
+
] = None
|
|
1733
|
+
""" Antenna temperature """
|
|
1734
|
+
TANT_SYS: Optional[
|
|
1735
|
+
Data[
|
|
1736
|
+
Union[
|
|
1737
|
+
tuple[AntennaName, TimeCal, ReceptorLabel, FrequencyCal],
|
|
1738
|
+
tuple[AntennaName, TimeCal, ReceptorLabel, Frequency],
|
|
1739
|
+
tuple[AntennaName, TimeCal, ReceptorLabel],
|
|
1740
|
+
tuple[AntennaName, Time, ReceptorLabel, FrequencyCal],
|
|
1741
|
+
tuple[AntennaName, Time, ReceptorLabel, Frequency],
|
|
1742
|
+
tuple[AntennaName, Time, ReceptorLabel],
|
|
1743
|
+
],
|
|
1744
|
+
QuantityInKelvinArray,
|
|
1745
|
+
]
|
|
1746
|
+
] = None
|
|
1747
|
+
""" TANT/TSYS """
|
|
1748
|
+
|
|
1749
|
+
# Attributes
|
|
1750
|
+
type: Attr[Literal["system_calibration"]] = "system_calibration"
|
|
1751
|
+
"""
|
|
1752
|
+
Type of dataset.
|
|
1753
|
+
"""
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
@xarray_dataset_schema
|
|
1757
|
+
class PhasedArrayXds:
|
|
1758
|
+
"""Not specified. Not implemented."""
|
|
1759
|
+
|
|
1760
|
+
pass
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
@xarray_dataset_schema
|
|
1764
|
+
class DopplerXds:
|
|
1765
|
+
"""Not specified. Not implemented."""
|
|
1766
|
+
|
|
1767
|
+
pass
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
@xarray_dataset_schema
|
|
1771
|
+
class VisibilityXds:
|
|
1772
|
+
"""Main dataset for interferometric data"""
|
|
1773
|
+
|
|
1774
|
+
# --- Required Coordinates ---
|
|
1775
|
+
time: Coordof[TimeCoordArray]
|
|
1776
|
+
"""
|
|
1777
|
+
The time coordinate is the mid-point of the nominal sampling interval, as
|
|
1778
|
+
specified in the ``ms_v4.time.attrs['integration_time']`` (ms v2 interval).
|
|
1779
|
+
"""
|
|
1780
|
+
baseline_id: Coordof[BaselineArray]
|
|
1781
|
+
""" Baseline ID """
|
|
1782
|
+
frequency: Coordof[FrequencyArray]
|
|
1783
|
+
"""Center frequencies for each channel."""
|
|
1784
|
+
polarization: Coordof[PolarizationArray]
|
|
1785
|
+
"""
|
|
1786
|
+
Labels for polarization types, e.g. ``['XX','XY','YX','YY']``, ``['RR','RL','LR','LL']``.
|
|
1787
|
+
"""
|
|
1788
|
+
|
|
1789
|
+
# --- Required data variables ---
|
|
1790
|
+
|
|
1791
|
+
VISIBILITY: Dataof[VisibilityArray]
|
|
1792
|
+
"""Complex visibilities, either simulated or measured by interferometer."""
|
|
1793
|
+
|
|
1794
|
+
baseline_antenna1_name: Coordof[BaselineAntennaNameArray]
|
|
1795
|
+
"""Antenna name for 1st antenna in baseline. Maps to ``attrs['antenna_xds'].antenna_name``"""
|
|
1796
|
+
baseline_antenna2_name: Coordof[BaselineAntennaNameArray]
|
|
1797
|
+
"""Antenna name for 2nd antenna in baseline. Maps to ``attrs['antenna_xds'].antenna_name``"""
|
|
1798
|
+
|
|
1799
|
+
# --- Required Attributes ---
|
|
1800
|
+
partition_info: Attr[PartitionInfoDict]
|
|
1801
|
+
observation_info: Attr[ObservationInfoDict]
|
|
1802
|
+
processor_info: Attr[ProcessorInfoDict]
|
|
1803
|
+
antenna_xds: Attr[AntennaXds]
|
|
1804
|
+
|
|
1805
|
+
schema_version: Attr[str]
|
|
1806
|
+
"""Semantic version of xradio data format"""
|
|
1807
|
+
creation_date: Attr[str]
|
|
1808
|
+
"""Date visibility dataset was created . Format: YYYY-MM-DDTHH:mm:ss.SSS (ISO 8601)"""
|
|
1809
|
+
|
|
1810
|
+
type: Attr[Literal["visibility"]] = "visibility"
|
|
1811
|
+
"""
|
|
1812
|
+
Dataset type
|
|
1813
|
+
"""
|
|
1814
|
+
|
|
1815
|
+
# --- Optional Coordinates ---
|
|
1816
|
+
polarization_mixed: Optional[Coord[tuple[BaselineId, Polarization], str]] = None
|
|
1817
|
+
"""
|
|
1818
|
+
If the polarizations are not constant over baseline
|
|
1819
|
+
"""
|
|
1820
|
+
uvw_label: Optional[Coordof[UvwLabelArray]] = None
|
|
1821
|
+
""" u,v,w """
|
|
1822
|
+
scan_number: Optional[Coord[Time, Union[numpy.int64, numpy.int32]]] = None
|
|
1823
|
+
"""Arbitary scan number to identify data taken in the same logical scan."""
|
|
1824
|
+
|
|
1825
|
+
# --- Optional data variables / arrays ---
|
|
1826
|
+
|
|
1827
|
+
# VISIBILITY_CORRECTED: Optional[Dataof[VisibilityArray]] = None
|
|
1828
|
+
# VISIBILITY_MODEL: Optional[Dataof[VisibilityArray]] = None
|
|
1829
|
+
|
|
1830
|
+
FLAG: Dataof[FlagArray] = None
|
|
1831
|
+
WEIGHT: Dataof[WeightArray] = None
|
|
1832
|
+
UVW: Dataof[UvwArray] = None
|
|
1833
|
+
EFFECTIVE_INTEGRATION_TIME: Optional[
|
|
1834
|
+
Data[
|
|
1835
|
+
Union[
|
|
1836
|
+
tuple[Time, BaselineId],
|
|
1837
|
+
tuple[Time, BaselineId, Frequency],
|
|
1838
|
+
tuple[Time, BaselineId, Frequency, Polarization],
|
|
1839
|
+
],
|
|
1840
|
+
QuantityInSecondsArray,
|
|
1841
|
+
]
|
|
1842
|
+
] = None
|
|
1843
|
+
"""
|
|
1844
|
+
The integration time, including the effects of missing data, in contrast to
|
|
1845
|
+
``integration_time`` attribute of the ``time`` coordinate,
|
|
1846
|
+
see :py:class:`TimeArray`. (MS v2: ``exposure``).
|
|
1847
|
+
"""
|
|
1848
|
+
TIME_CENTROID: Optional[Dataof[TimeSamplingArray]] = None
|
|
1849
|
+
"""
|
|
1850
|
+
The time centroid of the visibility, includes the effects of missing data
|
|
1851
|
+
unlike the ``time`` coordinate, see :py:class:`TimeArray`.
|
|
1852
|
+
"""
|
|
1853
|
+
TIME_CENTROID_EXTRA_PRECISION: Optional[Dataof[TimeSamplingArray]] = None
|
|
1854
|
+
"""Additional precision for ``TIME_CENTROID``"""
|
|
1855
|
+
EFFECTIVE_CHANNEL_WIDTH: Optional[Dataof[FreqSamplingArray]] = None
|
|
1856
|
+
"""The channel bandwidth that includes the effects of missing data."""
|
|
1857
|
+
FREQUENCY_CENTROID: Optional[Dataof[FreqSamplingArray]] = None
|
|
1858
|
+
"""Includes the effects of missing data unlike ``frequency``."""
|
|
1859
|
+
|
|
1860
|
+
# --- Optional Attributes ---
|
|
1861
|
+
pointing_xds: Optional[Attr[PointingXds]] = None
|
|
1862
|
+
system_calibration_xds: Optional[Attr[SystemCalibrationXds]] = None
|
|
1863
|
+
gain_curve_xds: Optional[Attr[GainCurveXds]] = None
|
|
1864
|
+
phase_calibration_xds: Optional[Attr[PhaseCalibrationXds]] = None
|
|
1865
|
+
weather_xds: Optional[Attr[WeatherXds]] = None
|
|
1866
|
+
phased_array_xds: Optional[Attr[PhasedArrayXds]] = None
|
|
1867
|
+
|
|
1868
|
+
xradio_version: Optional[Attr[str]] = None
|
|
1869
|
+
""" Version of XRADIO used if converted from MSv2. """
|
|
1870
|
+
|
|
1871
|
+
intent: Optional[Attr[str]] = None
|
|
1872
|
+
"""Identifies the intention of the scan, such as to calibrate or observe a
|
|
1873
|
+
target. See :ref:`scan intents` for possible values.
|
|
1874
|
+
"""
|
|
1875
|
+
data_description_id: Optional[Attr[str]] = None
|
|
1876
|
+
"""
|
|
1877
|
+
The id assigned to this combination of spectral window and polarization setup.
|
|
1878
|
+
"""
|
|
1879
|
+
|
|
1880
|
+
|
|
1881
|
+
@xarray_dataset_schema
|
|
1882
|
+
class SpectrumXds:
|
|
1883
|
+
"""Main dataset for single dish data"""
|
|
1884
|
+
|
|
1885
|
+
# --- Required Coordinates ---
|
|
1886
|
+
time: Coordof[TimeCoordArray]
|
|
1887
|
+
"""
|
|
1888
|
+
The time coordinate is the mid-point of the nominal sampling interval, as
|
|
1889
|
+
specified in the ``ms_v4.time.attrs['integration_time']`` (ms v2 interval).
|
|
1890
|
+
"""
|
|
1891
|
+
antenna_name: Coordof[AntennaNameArray]
|
|
1892
|
+
""" antenna_name """
|
|
1893
|
+
frequency: Coordof[FrequencyArray]
|
|
1894
|
+
"""Center frequencies for each channel."""
|
|
1895
|
+
polarization: Coordof[PolarizationArray]
|
|
1896
|
+
"""
|
|
1897
|
+
Labels for polarization types, e.g. ``['XX','XY','YX','YY']``, ``['RR','RL','LR','LL']``.
|
|
1898
|
+
"""
|
|
1899
|
+
|
|
1900
|
+
# --- Required data variables ---
|
|
1901
|
+
SPECTRUM: Dataof[SpectrumArray]
|
|
1902
|
+
"""Single dish data, either simulated or measured by an antenna."""
|
|
1903
|
+
|
|
1904
|
+
# --- Required Attributes ---
|
|
1905
|
+
partition_info: Attr[PartitionInfoDict]
|
|
1906
|
+
observation_info: Attr[ObservationInfoDict]
|
|
1907
|
+
processor_info: Attr[ProcessorInfoDict]
|
|
1908
|
+
antenna_xds: Attr[AntennaXds]
|
|
1909
|
+
|
|
1910
|
+
schema_version: Attr[str]
|
|
1911
|
+
"""Semantic version of xradio data format"""
|
|
1912
|
+
creation_date: Attr[str]
|
|
1913
|
+
"""Date MSv4 was created . Format: YYYY-MM-DDTHH:mm:ss.SSS (ISO 8601)"""
|
|
1914
|
+
|
|
1915
|
+
type: Attr[Literal["spectrum"]] = "spectrum"
|
|
1916
|
+
"""
|
|
1917
|
+
Dataset type
|
|
1918
|
+
"""
|
|
1919
|
+
|
|
1920
|
+
# --- Optional Coordinates ---
|
|
1921
|
+
polarization_mixed: Optional[Coord[tuple[AntennaName, Polarization], str]] = None
|
|
1922
|
+
"""
|
|
1923
|
+
If the polarizations are not constant over baseline
|
|
1924
|
+
"""
|
|
1925
|
+
scan_number: Optional[Coord[Time, Union[numpy.int64, numpy.int32]]] = None
|
|
1926
|
+
"""Arbitary scan number to identify data taken in the same logical scan."""
|
|
1927
|
+
|
|
1928
|
+
# SPECTRUM_CORRECTED: Optional[Dataof[SpectrumArray]] = None
|
|
1929
|
+
|
|
1930
|
+
FLAG: Dataof[FlagArray] = None
|
|
1931
|
+
WEIGHT: Dataof[WeightArray] = None
|
|
1932
|
+
|
|
1933
|
+
# --- Optional data variables / arrays ---
|
|
1934
|
+
EFFECTIVE_INTEGRATION_TIME: Optional[
|
|
1935
|
+
Data[
|
|
1936
|
+
Union[
|
|
1937
|
+
tuple[Time, AntennaName],
|
|
1938
|
+
tuple[Time, AntennaName, Frequency],
|
|
1939
|
+
tuple[Time, AntennaName, Frequency, Polarization],
|
|
1940
|
+
],
|
|
1941
|
+
QuantityInSecondsArray,
|
|
1942
|
+
]
|
|
1943
|
+
] = None
|
|
1944
|
+
"""
|
|
1945
|
+
The integration time, including the effects of missing data, in contrast to
|
|
1946
|
+
``integration_time`` attribute of the ``time`` coordinate,
|
|
1947
|
+
see :py:class:`TimeArray`. (MS v2: ``exposure``).
|
|
1948
|
+
"""
|
|
1949
|
+
TIME_CENTROID: Optional[Dataof[TimeSamplingArray]] = None
|
|
1950
|
+
"""
|
|
1951
|
+
The time centroid of the visibility, includes the effects of missing data
|
|
1952
|
+
unlike the ``time`` coordinate, see :py:class:`TimeArray`.
|
|
1953
|
+
"""
|
|
1954
|
+
TIME_CENTROID_EXTRA_PRECISION: Optional[Dataof[TimeSamplingArray]] = None
|
|
1955
|
+
"""Additional precision for ``TIME_CENTROID``"""
|
|
1956
|
+
EFFECTIVE_CHANNEL_WIDTH: Optional[Dataof[FreqSamplingArray]] = None
|
|
1957
|
+
"""The channel bandwidth that includes the effects of missing data."""
|
|
1958
|
+
FREQUENCY_CENTROID: Optional[Dataof[FreqSamplingArray]] = None
|
|
1959
|
+
"""Includes the effects of missing data unlike ``frequency``."""
|
|
1960
|
+
|
|
1961
|
+
# --- Optional Attributes ---
|
|
1962
|
+
pointing_xds: Optional[Attr[PointingXds]] = None
|
|
1963
|
+
system_calibration_xds: Optional[Attr[SystemCalibrationXds]] = None
|
|
1964
|
+
gain_curve_xds: Optional[Attr[GainCurveXds]] = None
|
|
1965
|
+
phase_calibration_xds: Optional[Attr[PhaseCalibrationXds]] = None
|
|
1966
|
+
weather_xds: Optional[Attr[WeatherXds]] = None
|
|
1967
|
+
phased_array_xds: Optional[Attr[PhasedArrayXds]] = None
|
|
1968
|
+
|
|
1969
|
+
xradio_version: Optional[Attr[str]] = None
|
|
1970
|
+
""" Version of XRADIO used if converted from MSv2. """
|
|
1971
|
+
|
|
1972
|
+
intent: Optional[Attr[str]] = None
|
|
1973
|
+
"""Identifies the intention of the scan, such as to calibrate or observe a
|
|
1974
|
+
target. See :ref:`scan intents` for possible values.
|
|
1975
|
+
"""
|
|
1976
|
+
data_description_id: Optional[Attr[str]] = None
|
|
1977
|
+
"""
|
|
1978
|
+
The id assigned to this combination of spectral window and polarization setup.
|
|
1979
|
+
"""
|