xradio 0.0.55__py3-none-any.whl → 0.0.58__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/__init__.py +2 -2
- xradio/_utils/_casacore/casacore_from_casatools.py +1001 -0
- xradio/_utils/_casacore/tables.py +6 -1
- xradio/_utils/coord_math.py +22 -23
- xradio/_utils/dict_helpers.py +76 -11
- xradio/_utils/schema.py +5 -2
- xradio/_utils/zarr/common.py +1 -73
- xradio/image/_util/_casacore/common.py +11 -3
- xradio/image/_util/_casacore/xds_from_casacore.py +59 -35
- xradio/image/_util/_casacore/xds_to_casacore.py +47 -16
- xradio/image/_util/_fits/xds_from_fits.py +172 -77
- xradio/image/_util/casacore.py +9 -4
- xradio/image/_util/common.py +4 -4
- xradio/image/_util/image_factory.py +8 -8
- xradio/image/image.py +45 -5
- xradio/measurement_set/__init__.py +19 -9
- xradio/measurement_set/_utils/__init__.py +1 -3
- xradio/measurement_set/_utils/_msv2/__init__.py +0 -0
- xradio/measurement_set/_utils/_msv2/_tables/read.py +35 -90
- xradio/measurement_set/_utils/_msv2/_tables/read_main_table.py +6 -686
- xradio/measurement_set/_utils/_msv2/_tables/table_query.py +13 -3
- xradio/measurement_set/_utils/_msv2/conversion.py +129 -145
- xradio/measurement_set/_utils/_msv2/create_antenna_xds.py +9 -16
- xradio/measurement_set/_utils/_msv2/create_field_and_source_xds.py +125 -221
- xradio/measurement_set/_utils/_msv2/msv2_to_msv4_meta.py +1 -2
- xradio/measurement_set/_utils/_msv2/msv4_info_dicts.py +13 -8
- xradio/measurement_set/_utils/_msv2/msv4_sub_xdss.py +27 -72
- xradio/measurement_set/_utils/_msv2/partition_queries.py +5 -262
- xradio/measurement_set/_utils/_msv2/subtables.py +0 -107
- xradio/measurement_set/_utils/_utils/interpolate.py +60 -0
- xradio/measurement_set/_utils/_zarr/encoding.py +2 -7
- xradio/measurement_set/convert_msv2_to_processing_set.py +0 -2
- xradio/measurement_set/load_processing_set.py +2 -2
- xradio/measurement_set/measurement_set_xdt.py +14 -14
- xradio/measurement_set/open_processing_set.py +1 -3
- xradio/measurement_set/processing_set_xdt.py +41 -835
- xradio/measurement_set/schema.py +96 -123
- xradio/schema/check.py +91 -97
- xradio/schema/dataclass.py +159 -22
- xradio/schema/export.py +99 -0
- xradio/schema/metamodel.py +51 -16
- xradio/schema/typing.py +5 -5
- {xradio-0.0.55.dist-info → xradio-0.0.58.dist-info}/METADATA +43 -11
- xradio-0.0.58.dist-info/RECORD +65 -0
- {xradio-0.0.55.dist-info → xradio-0.0.58.dist-info}/WHEEL +1 -1
- xradio/image/_util/fits.py +0 -13
- xradio/measurement_set/_utils/_msv2/_tables/load.py +0 -63
- xradio/measurement_set/_utils/_msv2/_tables/load_main_table.py +0 -487
- xradio/measurement_set/_utils/_msv2/_tables/read_subtables.py +0 -395
- xradio/measurement_set/_utils/_msv2/_tables/write.py +0 -320
- xradio/measurement_set/_utils/_msv2/_tables/write_exp_api.py +0 -385
- xradio/measurement_set/_utils/_msv2/chunks.py +0 -115
- xradio/measurement_set/_utils/_msv2/descr.py +0 -165
- xradio/measurement_set/_utils/_msv2/msv2_msv3.py +0 -7
- xradio/measurement_set/_utils/_msv2/partitions.py +0 -392
- xradio/measurement_set/_utils/_utils/cds.py +0 -40
- xradio/measurement_set/_utils/_utils/xds_helper.py +0 -404
- xradio/measurement_set/_utils/_zarr/read.py +0 -263
- xradio/measurement_set/_utils/_zarr/write.py +0 -329
- xradio/measurement_set/_utils/msv2.py +0 -106
- xradio/measurement_set/_utils/zarr.py +0 -133
- xradio-0.0.55.dist-info/RECORD +0 -77
- {xradio-0.0.55.dist-info → xradio-0.0.58.dist-info}/licenses/LICENSE.txt +0 -0
- {xradio-0.0.55.dist-info → xradio-0.0.58.dist-info}/top_level.txt +0 -0
xradio/measurement_set/schema.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from typing import Literal, Optional, Union
|
|
3
|
+
from typing import Literal, Optional, Union
|
|
4
4
|
from xradio.schema.bases import (
|
|
5
5
|
xarray_dataset_schema,
|
|
6
6
|
xarray_dataarray_schema,
|
|
7
7
|
dict_schema,
|
|
8
8
|
)
|
|
9
|
-
from xradio.schema.typing import Attr, Coord, Coordof, Data, Dataof
|
|
9
|
+
from xradio.schema.typing import Attr, Coord, Coordof, Data, Dataof
|
|
10
10
|
import numpy
|
|
11
11
|
|
|
12
12
|
MSV4_SCHEMA_VERSION = "4.0.-9988"
|
|
@@ -46,16 +46,16 @@ UvwLabel = Literal["uvw_label"]
|
|
|
46
46
|
""" Coordinate dimension of UVW data (typically shape 3 for 'u', 'v', 'w') """
|
|
47
47
|
SkyDirLabel = Literal["sky_dir_label"]
|
|
48
48
|
""" Coordinate labels of sky directions (typically shape 2 and 'ra', 'dec') """
|
|
49
|
+
SkyDisLabel = Literal["sky_dis_label"]
|
|
50
|
+
""" Coordinate labels of sky distance (typically shape 1 and 'dist') """
|
|
49
51
|
LocalSkyDirLabel = Literal["local_sky_dir_label"]
|
|
50
52
|
""" Coordinate labels of local sky directions (typically shape 2 and 'az', 'alt') """
|
|
51
|
-
|
|
52
|
-
""" Coordinate labels of
|
|
53
|
-
|
|
54
|
-
""" Coordinate labels of sky positions (typically shape 3 and 'ra', 'dec', 'dist') """
|
|
55
|
-
SphericalPosLabel = Literal["spherical_pos_label"]
|
|
56
|
-
""" Coordinate labels of spherical positions (shape shape 3 and 'lon', 'lat1', 'dist2') """
|
|
57
|
-
EllipsoidPosLabel = Literal["ellipsoid_pos_label"]
|
|
53
|
+
LocalSkyDisLabel = Literal["local_sky_dis_label"]
|
|
54
|
+
""" Coordinate labels of local sky distance (typically shape 1 and 'dist') """
|
|
55
|
+
EllipsoidDirLabel = Literal["ellipsoid_dir_label"]
|
|
58
56
|
""" Coordinate labels of geodetic earth location data (typically shape 3 and 'lon', 'lat', 'height')"""
|
|
57
|
+
EllipsoidDisLabel = Literal["ellipsoid_dis_label"]
|
|
58
|
+
""" Coordinate label of geodetic earth height (typically shape 1 and 'dist')"""
|
|
59
59
|
CartesianPosLabel = Literal["cartesian_pos_label"]
|
|
60
60
|
""" Coordinate labels of geocentric earth location data (typically shape 3 and 'x', 'y', 'z')"""
|
|
61
61
|
CartesianPosLabelLocal = Literal["cartesian_pos_label_local"]
|
|
@@ -83,29 +83,27 @@ Doppler = Literal["doppler"]
|
|
|
83
83
|
RotationMatrix = Literal["rotation_matrix"]
|
|
84
84
|
|
|
85
85
|
# Units of quantities and measures
|
|
86
|
-
|
|
87
|
-
Literal["undimensioned"]
|
|
88
|
-
] # name consistent with casacore measures
|
|
89
|
-
UnitsSeconds = list[Literal["s"]]
|
|
90
|
-
UnitsHertz = list[Literal["Hz"]]
|
|
91
|
-
UnitsMeters = list[Literal["m"]]
|
|
92
|
-
|
|
93
|
-
UnitsOfSkyCoordInRadians = list[Literal["rad"], Literal["rad"]]
|
|
94
|
-
UnitsOfLocationInMetersOrRadians = Union[
|
|
95
|
-
list[Literal["m"], Literal["m"], Literal["m"]],
|
|
96
|
-
list[Literal["rad"], Literal["rad"], Literal["m"]],
|
|
97
|
-
]
|
|
98
|
-
UnitsOfPositionInRadians = list[Literal["rad"], Literal["rad"], Literal["m"]]
|
|
99
|
-
UnitsOfDopplerShift = Union[list[Literal["ratio"]], list[Literal["m/s"]]]
|
|
100
|
-
|
|
101
|
-
UnitsRadians = list[Literal["rad"]]
|
|
102
|
-
UnitsKelvin = list[Literal["K"]]
|
|
103
|
-
UnitsKelvinPerJansky = list[Literal["K/Jy"]]
|
|
104
|
-
UnitsMetersPerSecond = list[Literal["m/s"]]
|
|
105
|
-
UnitsPascal = list[Literal["Pa"]] # hPa? (in MSv2)
|
|
106
|
-
UnitsPerSquareMeters = list[Literal["/m^2"]]
|
|
86
|
+
UnitsDimensionless = Literal["dimensionless"] # name consistent with casacore measures
|
|
107
87
|
|
|
88
|
+
UnitsSeconds = Literal["s"]
|
|
89
|
+
UnitsHertz = Literal["Hz"]
|
|
90
|
+
UnitsMeters = Literal["m"]
|
|
108
91
|
|
|
92
|
+
# UnitsOfSkyCoordInRadians = Literal["rad"]
|
|
93
|
+
UnitsOfSkyCoordInMetersOrRadians = Literal["m", "rad"]
|
|
94
|
+
UnitsOfLocationInMetersOrRadians = Literal[
|
|
95
|
+
"m",
|
|
96
|
+
"rad",
|
|
97
|
+
]
|
|
98
|
+
UnitsOfPositionInRadians = Literal["rad"]
|
|
99
|
+
UnitsOfDopplerShift = Literal["ratio", "m/s"]
|
|
100
|
+
|
|
101
|
+
UnitsRadians = Literal["rad"]
|
|
102
|
+
UnitsKelvin = Literal["K"]
|
|
103
|
+
UnitsKelvinPerJansky = Literal["K/Jy"]
|
|
104
|
+
UnitsMetersPerSecond = Literal["m/s"]
|
|
105
|
+
UnitsPascal = Literal["Pa"] # hPa? (in MSv2)
|
|
106
|
+
UnitsPerSquareMeters = Literal["/m^2"]
|
|
109
107
|
# Quantities
|
|
110
108
|
|
|
111
109
|
|
|
@@ -250,7 +248,7 @@ class TimeArray:
|
|
|
250
248
|
|
|
251
249
|
type: Attr[Time] = "time"
|
|
252
250
|
""" Array type. Should be ``"time"``. """
|
|
253
|
-
units: Attr[UnitsSeconds] =
|
|
251
|
+
units: Attr[UnitsSeconds] = "s"
|
|
254
252
|
""" Units to associate with axis"""
|
|
255
253
|
scale: Attr[AllowedTimeScales] = "utc"
|
|
256
254
|
"""
|
|
@@ -298,10 +296,9 @@ AllowedSkyCoordFrames = Literal[
|
|
|
298
296
|
class SkyCoordArray:
|
|
299
297
|
"""Measures array for data variables that are sky coordinates, used in :py:class:`FieldSourceXds`"""
|
|
300
298
|
|
|
301
|
-
data: Data[Union[SkyDirLabel,
|
|
302
|
-
|
|
299
|
+
data: Data[Union[SkyDirLabel, SkyDisLabel], float]
|
|
300
|
+
units: Attr[UnitsOfSkyCoordInMetersOrRadians]
|
|
303
301
|
type: Attr[SkyCoord] = "sky_coord"
|
|
304
|
-
units: Attr[UnitsOfSkyCoordInRadians] = ("rad", "rad")
|
|
305
302
|
frame: Attr[AllowedSkyCoordFrames] = "icrs"
|
|
306
303
|
"""
|
|
307
304
|
Possible values are astropy SkyCoord frames.
|
|
@@ -330,7 +327,7 @@ class PointingBeamArray:
|
|
|
330
327
|
]
|
|
331
328
|
|
|
332
329
|
type: Attr[SkyCoord] = "sky_coord"
|
|
333
|
-
units: Attr[
|
|
330
|
+
units: Attr[UnitsOfSkyCoordInMetersOrRadians] = "rad"
|
|
334
331
|
frame: Attr[AllowedSkyCoordFrames] = "icrs"
|
|
335
332
|
"""
|
|
336
333
|
From fixvis docs: clean and the im tool ignore the reference frame claimed by the UVW column (it is often mislabelled
|
|
@@ -347,7 +344,7 @@ class LocalSkyCoordArray:
|
|
|
347
344
|
data: Data[LocalSkyDirLabel, float]
|
|
348
345
|
|
|
349
346
|
type: Attr[SkyCoord] = "sky_coord"
|
|
350
|
-
units: Attr[
|
|
347
|
+
units: Attr[UnitsOfSkyCoordInMetersOrRadians] = "rad"
|
|
351
348
|
frame: Attr[AllowedSkyCoordFrames] = "icrs"
|
|
352
349
|
"""
|
|
353
350
|
From fixvis docs: clean and the im tool ignore the reference frame claimed by the UVW column (it is often mislabelled
|
|
@@ -371,7 +368,7 @@ class TimeCoordArray:
|
|
|
371
368
|
type: Attr[Time] = "time"
|
|
372
369
|
""" Coordinate type. Should be ``"time"``. """
|
|
373
370
|
|
|
374
|
-
units: Attr[UnitsSeconds] =
|
|
371
|
+
units: Attr[UnitsSeconds] = "s"
|
|
375
372
|
""" Units to associate with axis"""
|
|
376
373
|
|
|
377
374
|
scale: Attr[AllowedTimeScales] = "utc"
|
|
@@ -407,7 +404,7 @@ class TimeInterpolatedCoordArray:
|
|
|
407
404
|
type: Attr[Time] = "time"
|
|
408
405
|
""" Coordinate type. Should be ``"time"``. """
|
|
409
406
|
|
|
410
|
-
units: Attr[UnitsSeconds] =
|
|
407
|
+
units: Attr[UnitsSeconds] = "s"
|
|
411
408
|
""" Units to associate with axis"""
|
|
412
409
|
|
|
413
410
|
scale: Attr[AllowedTimeScales] = "utc"
|
|
@@ -432,7 +429,7 @@ class TimeSystemCalCoordArray:
|
|
|
432
429
|
type: Attr[Time] = "time_system_cal"
|
|
433
430
|
""" Coordinate type. Should be ``"time_system_cal"``. """
|
|
434
431
|
|
|
435
|
-
units: Attr[UnitsSeconds] =
|
|
432
|
+
units: Attr[UnitsSeconds] = "s"
|
|
436
433
|
""" Units to associate with axis"""
|
|
437
434
|
|
|
438
435
|
scale: Attr[AllowedTimeScales] = "utc"
|
|
@@ -457,7 +454,7 @@ class TimePointingCoordArray:
|
|
|
457
454
|
type: Attr[TimePointing] = "time_pointing"
|
|
458
455
|
""" Coordinate type. Should be ``"time_pointing"``. """
|
|
459
456
|
|
|
460
|
-
units: Attr[UnitsSeconds] =
|
|
457
|
+
units: Attr[UnitsSeconds] = "s"
|
|
461
458
|
""" Units to associate with axis"""
|
|
462
459
|
|
|
463
460
|
scale: Attr[AllowedTimeScales] = "utc"
|
|
@@ -482,7 +479,7 @@ class TimeEphemerisCoordArray:
|
|
|
482
479
|
type: Attr[TimeEphemeris] = "time_ephemeris"
|
|
483
480
|
""" Coordinate type. Should be ``"time_ephemeris"``. """
|
|
484
481
|
|
|
485
|
-
units: Attr[UnitsSeconds] =
|
|
482
|
+
units: Attr[UnitsSeconds] = "s"
|
|
486
483
|
""" Units to associate with axis"""
|
|
487
484
|
|
|
488
485
|
scale: Attr[AllowedTimeScales] = "utc"
|
|
@@ -504,10 +501,10 @@ class TimeWeatherCoordArray:
|
|
|
504
501
|
``format``).
|
|
505
502
|
"""
|
|
506
503
|
|
|
507
|
-
type: Attr[
|
|
504
|
+
type: Attr[TimeWeather] = "time_weather"
|
|
508
505
|
""" Coordinate type. Should be ``"time_weather"``. """
|
|
509
506
|
|
|
510
|
-
units: Attr[UnitsSeconds] =
|
|
507
|
+
units: Attr[UnitsSeconds] = "s"
|
|
511
508
|
""" Units to associate with axis"""
|
|
512
509
|
|
|
513
510
|
scale: Attr[AllowedTimeScales] = "utc"
|
|
@@ -545,7 +542,7 @@ class SpectralCoordArray:
|
|
|
545
542
|
|
|
546
543
|
data: Data[ZD, float]
|
|
547
544
|
|
|
548
|
-
units: Attr[UnitsHertz] =
|
|
545
|
+
units: Attr[UnitsHertz] = "Hz"
|
|
549
546
|
|
|
550
547
|
observer: Attr[AllowedSpectralCoordFrames] = "icrs"
|
|
551
548
|
"""
|
|
@@ -582,17 +579,14 @@ class LocationArray:
|
|
|
582
579
|
Measure type used for example in antenna_xds/ANTENNA_POSITION, weather_xds/STATION_POSITION,
|
|
583
580
|
field_and_source_xds(ephemeris)/OBSERVER_POSITION.
|
|
584
581
|
|
|
585
|
-
Data dimensions can be CartesianPosLabel or
|
|
582
|
+
Data dimensions can be CartesianPosLabel or EllipsoidDirLabel or EllipsoidDisLabel
|
|
586
583
|
"""
|
|
587
584
|
|
|
588
|
-
data: Data[Union[
|
|
585
|
+
data: Data[Union[EllipsoidDirLabel, EllipsoidDisLabel, CartesianPosLabel], float]
|
|
589
586
|
|
|
590
587
|
units: Attr[UnitsOfLocationInMetersOrRadians]
|
|
591
588
|
"""
|
|
592
|
-
|
|
593
|
-
the last dimension of the data array. This allows for having different
|
|
594
|
-
units in the same data array, for example geodetic coordinates could use
|
|
595
|
-
``['rad','rad','m']``.
|
|
589
|
+
Units of the location coordinates (typically 'm' or 'rad').
|
|
596
590
|
"""
|
|
597
591
|
|
|
598
592
|
frame: Attr[AllowedLocationFrames]
|
|
@@ -610,45 +604,12 @@ class LocationArray:
|
|
|
610
604
|
|
|
611
605
|
ellipsoid: Optional[Attr[AllowedEllipsoid]]
|
|
612
606
|
"""
|
|
613
|
-
Ellipsoid used in geodetic Earth locations (with
|
|
614
|
-
"""
|
|
615
|
-
|
|
616
|
-
type: Attr[Location] = "location"
|
|
617
|
-
""" Measure type. Should be ``"location"``."""
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
@xarray_dataarray_schema
|
|
621
|
-
class EllipsoidPosLocationArray:
|
|
622
|
-
"""
|
|
623
|
-
Measure type used for example in field_and_source_xds(ephemeris) / SUB_OBSERVER_DIRECTION, SUB_SOLAR_POSITION
|
|
624
|
-
"""
|
|
625
|
-
|
|
626
|
-
data: Data[EllipsoidPosLabel, float]
|
|
627
|
-
|
|
628
|
-
frame: Attr[AllowedLocationFrames]
|
|
629
|
-
"""
|
|
630
|
-
Reference frame. Can be ITRS (assumed for all Earth locations) or Undefined (used in non-Earth locations).
|
|
631
|
-
"""
|
|
632
|
-
|
|
633
|
-
coordinate_system: Attr[AllowedLocationCoordinateSystems]
|
|
634
|
-
""" Can be ``geocentric/planetcentric, geodetic/planetodetic, orbital`` """
|
|
635
|
-
|
|
636
|
-
origin_object_name: Attr[str]
|
|
637
|
-
"""
|
|
638
|
-
earth/sun/moon/etc
|
|
607
|
+
Ellipsoid used in geodetic Earth locations (with EllipsoidDirLabel and EllipsoidDirLabel coordinate)
|
|
639
608
|
"""
|
|
640
609
|
|
|
641
610
|
type: Attr[Location] = "location"
|
|
642
611
|
""" Measure type. Should be ``"location"``."""
|
|
643
612
|
|
|
644
|
-
units: Attr[UnitsOfPositionInRadians] = ("rad", "rad", "m")
|
|
645
|
-
"""
|
|
646
|
-
If the units are a list of strings then it must be the same length as
|
|
647
|
-
the last dimension of the data array. This allows for having different
|
|
648
|
-
units in the same data array,for example geodetic coordinates could use
|
|
649
|
-
``['rad','rad','m']``.
|
|
650
|
-
"""
|
|
651
|
-
|
|
652
613
|
|
|
653
614
|
@xarray_dataarray_schema
|
|
654
615
|
class BaselineArray:
|
|
@@ -695,7 +656,7 @@ class DopplerArray:
|
|
|
695
656
|
type: Attr[Doppler] = "doppler"
|
|
696
657
|
""" Coordinate type. Should be ``"doppler"``. """
|
|
697
658
|
|
|
698
|
-
units: Attr[UnitsOfDopplerShift] =
|
|
659
|
+
units: Attr[UnitsOfDopplerShift] = "m/s"
|
|
699
660
|
""" Units to associate with axis, [ratio]/[m/s]"""
|
|
700
661
|
|
|
701
662
|
doppler_type: Attr[AllowedDopplerTypes] = "radio"
|
|
@@ -731,7 +692,7 @@ class FrequencyArray:
|
|
|
731
692
|
""" Coordinate type. Should be ``"spectral_coord"``. """
|
|
732
693
|
long_name: Optional[Attr[str]] = "Frequency"
|
|
733
694
|
""" Long-form name to use for axis"""
|
|
734
|
-
units: Attr[UnitsHertz] =
|
|
695
|
+
units: Attr[UnitsHertz] = "Hz"
|
|
735
696
|
""" Units to associate with axis"""
|
|
736
697
|
observer: Attr[AllowedSpectralCoordFrames] = "icrs"
|
|
737
698
|
"""
|
|
@@ -751,7 +712,7 @@ class FrequencySystemCalArray:
|
|
|
751
712
|
""" Center frequencies for each channel. """
|
|
752
713
|
|
|
753
714
|
type: Attr[SpectralCoord] = "spectral_coord"
|
|
754
|
-
units: Attr[UnitsHertz] =
|
|
715
|
+
units: Attr[UnitsHertz] = "Hz"
|
|
755
716
|
""" Units to associate with axis"""
|
|
756
717
|
|
|
757
718
|
observer: Attr[AllowedSpectralCoordFrames] = "icrs"
|
|
@@ -933,7 +894,7 @@ class UvwArray:
|
|
|
933
894
|
type: Attr[Literal["uvw"]] = "uvw"
|
|
934
895
|
frame: Attr[AllowedUvwFrames] = "icrs"
|
|
935
896
|
""" To be defined in astropy (see for example https://github.com/astropy/astropy/issues/7766) """
|
|
936
|
-
units: Attr[UnitsMeters] =
|
|
897
|
+
units: Attr[UnitsMeters] = "m"
|
|
937
898
|
|
|
938
899
|
allow_mutiple_versions: Optional[Attr[bool]] = True
|
|
939
900
|
|
|
@@ -963,7 +924,7 @@ class TimeSamplingArray:
|
|
|
963
924
|
""" Astropy format, see :py:class:`astropy.time.Time`. Default seconds from 1970-01-01 00:00:00 UTC """
|
|
964
925
|
|
|
965
926
|
long_name: Optional[Attr[str]] = "Time sampling data"
|
|
966
|
-
units: Attr[UnitsSeconds] =
|
|
927
|
+
units: Attr[UnitsSeconds] = "s"
|
|
967
928
|
|
|
968
929
|
|
|
969
930
|
# @xarray_dataarray_schema
|
|
@@ -991,7 +952,7 @@ class TimeSamplingArray:
|
|
|
991
952
|
# baseline_id: Optional[Coordof[BaselineArray]] = None
|
|
992
953
|
# polarization: Optional[Coordof[PolarizationArray]] = None
|
|
993
954
|
# long_name: Optional[Attr[str]] = "Frequency sampling data"
|
|
994
|
-
# units: Attr[UnitsHertz] =
|
|
955
|
+
# units: Attr[UnitsHertz] = "Hz"
|
|
995
956
|
# observer: Attr[AllowedSpectralCoordFrames] = "icrs"
|
|
996
957
|
# """
|
|
997
958
|
# Astropy velocity reference frames (see :external:ref:`astropy-spectralcoord`).
|
|
@@ -1018,7 +979,7 @@ class FrequencyCentroidArray:
|
|
|
1018
979
|
"""
|
|
1019
980
|
frequency: Coordof[FrequencyArray]
|
|
1020
981
|
long_name: Optional[Attr[str]] = "Frequency sampling data"
|
|
1021
|
-
units: Attr[UnitsHertz] =
|
|
982
|
+
units: Attr[UnitsHertz] = "Hz"
|
|
1022
983
|
observer: Attr[AllowedSpectralCoordFrames] = "icrs"
|
|
1023
984
|
"""
|
|
1024
985
|
Astropy velocity reference frames (see :external:ref:`astropy-spectralcoord`).
|
|
@@ -1051,7 +1012,7 @@ class EffectiveChannelWidthArray:
|
|
|
1051
1012
|
baseline_id: Optional[Coordof[BaselineArray]] = None
|
|
1052
1013
|
polarization: Optional[Coordof[PolarizationArray]] = None
|
|
1053
1014
|
long_name: Optional[Attr[str]] = "Frequency sampling data"
|
|
1054
|
-
units: Attr[UnitsHertz] =
|
|
1015
|
+
units: Attr[UnitsHertz] = "Hz"
|
|
1055
1016
|
observer: Attr[AllowedSpectralCoordFrames] = "icrs"
|
|
1056
1017
|
"""
|
|
1057
1018
|
Astropy velocity reference frames (see :external:ref:`astropy-spectralcoord`).
|
|
@@ -1081,7 +1042,7 @@ class FieldSourceXds:
|
|
|
1081
1042
|
sky_dir_label: Coord[SkyDirLabel, str]
|
|
1082
1043
|
""" Coordinate labels of sky directions (typically shape 2 and 'ra', 'dec') """
|
|
1083
1044
|
|
|
1084
|
-
|
|
1045
|
+
FIELD_PHASE_CENTER_DIRECTION: Optional[Data[FieldName, SkyCoordArray]]
|
|
1085
1046
|
"""
|
|
1086
1047
|
Offset from the SOURCE_DIRECTION that gives the direction of phase
|
|
1087
1048
|
center for which the fringes have been stopped-that is a point source in
|
|
@@ -1091,14 +1052,14 @@ class FieldSourceXds:
|
|
|
1091
1052
|
varies with field, it refers DelayDir_Ref column instead.
|
|
1092
1053
|
"""
|
|
1093
1054
|
|
|
1094
|
-
|
|
1055
|
+
FIELD_REFERENCE_CENTER_DIRECTION: Optional[Data[FieldName, SkyCoordArray]]
|
|
1095
1056
|
"""
|
|
1096
1057
|
Used in single-dish to record the associated reference direction if positionswitching
|
|
1097
1058
|
been applied. For conversion from MSv2, frame refers column keywords by default. If
|
|
1098
1059
|
frame varies with field, it refers DelayDir_Ref column instead.
|
|
1099
1060
|
"""
|
|
1100
1061
|
|
|
1101
|
-
|
|
1062
|
+
SOURCE_DIRECTION: Optional[Data[FieldName, SkyCoordArray]]
|
|
1102
1063
|
"""
|
|
1103
1064
|
CASA Table Cols: RA,DEC,Rho."Astrometric RA and Dec and Geocentric
|
|
1104
1065
|
distance with respect to the observer’s location (Geocentric). "Adjusted
|
|
@@ -1169,7 +1130,7 @@ class FieldSourceEphemerisXds:
|
|
|
1169
1130
|
time: Coordof[TimeInterpolatedCoordArray]
|
|
1170
1131
|
"""Midpoint of time for which this set of parameters is accurate. Labeled 'time' when interpolated to main time """
|
|
1171
1132
|
|
|
1172
|
-
|
|
1133
|
+
FIELD_PHASE_CENTER_DIRECTION: Optional[Data[tuple[Time], SkyCoordArray]]
|
|
1173
1134
|
"""
|
|
1174
1135
|
Offset from the SOURCE_DIRECTION that gives the direction of phase
|
|
1175
1136
|
center for which the fringes have been stopped-that is a point source in
|
|
@@ -1179,7 +1140,24 @@ class FieldSourceEphemerisXds:
|
|
|
1179
1140
|
varies with field, it refers DelayDir_Ref column instead.
|
|
1180
1141
|
"""
|
|
1181
1142
|
|
|
1182
|
-
|
|
1143
|
+
FIELD_PHASE_CENTER_DISTANCE: Optional[Data[tuple[Time], SkyCoordArray]]
|
|
1144
|
+
"""
|
|
1145
|
+
Offset from the SOURCE_DIRECTION that gives the direction of phase
|
|
1146
|
+
center for which the fringes have been stopped-that is a point source in
|
|
1147
|
+
this direction will produce a constant measured phase (page 2 of
|
|
1148
|
+
https://articles.adsabs.harvard.edu/pdf/1999ASPC..180...79F). For
|
|
1149
|
+
conversion from MSv2, frame refers column keywords by default. If frame
|
|
1150
|
+
varies with field, it refers DelayDir_Ref column instead.
|
|
1151
|
+
"""
|
|
1152
|
+
|
|
1153
|
+
FIELD_REFERENCE_CENTER_DIRECTION: Optional[Data[tuple[Time], SkyCoordArray]]
|
|
1154
|
+
"""
|
|
1155
|
+
Used in single-dish to record the associated reference direction if positionswitching
|
|
1156
|
+
been applied. For conversion from MSv2, frame refers column keywords by default. If
|
|
1157
|
+
frame varies with field, it refers DelayDir_Ref column instead.
|
|
1158
|
+
"""
|
|
1159
|
+
|
|
1160
|
+
FIELD_REFERENCE_CENTER_DISTANCE: Optional[Data[tuple[Time], SkyCoordArray]]
|
|
1183
1161
|
"""
|
|
1184
1162
|
Used in single-dish to record the associated reference direction if positionswitching
|
|
1185
1163
|
been applied. For conversion from MSv2, frame refers column keywords by default. If
|
|
@@ -1234,7 +1212,7 @@ class FieldSourceEphemerisXds:
|
|
|
1234
1212
|
tuple[Time],
|
|
1235
1213
|
tuple[TimeEphemeris],
|
|
1236
1214
|
],
|
|
1237
|
-
|
|
1215
|
+
LocationArray,
|
|
1238
1216
|
]
|
|
1239
1217
|
]
|
|
1240
1218
|
""" 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 """
|
|
@@ -1245,7 +1223,7 @@ class FieldSourceEphemerisXds:
|
|
|
1245
1223
|
tuple[Time],
|
|
1246
1224
|
tuple[TimeEphemeris],
|
|
1247
1225
|
],
|
|
1248
|
-
|
|
1226
|
+
LocationArray,
|
|
1249
1227
|
]
|
|
1250
1228
|
]
|
|
1251
1229
|
""" 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 """
|
|
@@ -1285,13 +1263,14 @@ class FieldSourceEphemerisXds:
|
|
|
1285
1263
|
# --- Optional coordinates ---
|
|
1286
1264
|
sky_dir_label: Optional[Coord[SkyDirLabel, str]] = ("ra", "dec")
|
|
1287
1265
|
""" Coordinate labels of sky directions (typically shape 2 and 'ra', 'dec') """
|
|
1288
|
-
|
|
1289
|
-
""" Coordinate lables of sky
|
|
1290
|
-
|
|
1266
|
+
sky_dis_label: Optional[Coord[SkyDisLabel, str]] = "dist"
|
|
1267
|
+
""" Coordinate lables of sky distance (typically shape 1 and 'dist') """
|
|
1268
|
+
ellipsoid_dir_label: Optional[Coord[EllipsoidDirLabel, str]] = (
|
|
1291
1269
|
"lon",
|
|
1292
1270
|
"lat",
|
|
1293
|
-
"height",
|
|
1294
1271
|
)
|
|
1272
|
+
ellipsoid_dis_label: Optional[Coord[EllipsoidDisLabel, str]] = "height"
|
|
1273
|
+
|
|
1295
1274
|
""" Coordinate labels of geodetic earth location data (typically shape 3 and 'lon', 'lat', 'height')"""
|
|
1296
1275
|
cartesian_pos_label: Optional[Coord[CartesianPosLabel, str]] = ("x", "y", "z")
|
|
1297
1276
|
""" Coordinate labels of geocentric earth location data (typically shape 3 and 'x', 'y', 'z')"""
|
|
@@ -1322,7 +1301,7 @@ class SpectrumArray:
|
|
|
1322
1301
|
|
|
1323
1302
|
long_name: Optional[Attr[str]] = "Spectrum values"
|
|
1324
1303
|
""" Long-form name to use for axis. Should be ``"Spectrum values"``"""
|
|
1325
|
-
units: Attr[
|
|
1304
|
+
units: Attr[str] = "Jy"
|
|
1326
1305
|
|
|
1327
1306
|
|
|
1328
1307
|
@xarray_dataarray_schema
|
|
@@ -1341,8 +1320,7 @@ class VisibilityArray:
|
|
|
1341
1320
|
|
|
1342
1321
|
long_name: Optional[Attr[str]] = "Visibility values"
|
|
1343
1322
|
""" Long-form name to use for axis. Should be ``"Visibility values"``"""
|
|
1344
|
-
units: Attr[
|
|
1345
|
-
|
|
1323
|
+
units: Attr[str] = "Jy"
|
|
1346
1324
|
allow_mutiple_versions: Optional[Attr[bool]] = True
|
|
1347
1325
|
|
|
1348
1326
|
|
|
@@ -1379,7 +1357,7 @@ class VisibilityArray:
|
|
|
1379
1357
|
|
|
1380
1358
|
@dict_schema
|
|
1381
1359
|
class ObservationInfoDict:
|
|
1382
|
-
observer: list
|
|
1360
|
+
observer: list[str]
|
|
1383
1361
|
"""List of observer names."""
|
|
1384
1362
|
project: str
|
|
1385
1363
|
"""Project Code/Project_UID"""
|
|
@@ -1432,7 +1410,7 @@ class DataGroupDict:
|
|
|
1432
1410
|
uvw: Optional[str]
|
|
1433
1411
|
""" Name of the UVW variable of the group, for example 'UVW'. """
|
|
1434
1412
|
field_and_source: str
|
|
1435
|
-
""" Name of the field_and_source_xds, for example
|
|
1413
|
+
""" Name of the field_and_source_xds, for example field_and_source_base_xds. """
|
|
1436
1414
|
description: str
|
|
1437
1415
|
""" More details about the data group. """
|
|
1438
1416
|
date: str
|
|
@@ -1488,7 +1466,9 @@ class AntennaXds:
|
|
|
1488
1466
|
as measured after all polarization combiners. ['X','Y'], ['R','L'] """
|
|
1489
1467
|
cartesian_pos_label: Optional[Coord[CartesianPosLabel, str]]
|
|
1490
1468
|
""" (x,y,z) - either cartesian or ellipsoid """
|
|
1491
|
-
|
|
1469
|
+
ellipsoid_dir_label: Optional[Coord[EllipsoidDirLabel, str]]
|
|
1470
|
+
""" (lon, lat, dist) - either cartesian or ellipsoid"""
|
|
1471
|
+
ellipsoid_dis_label: Optional[Coord[EllipsoidDisLabel, str]]
|
|
1492
1472
|
""" (lon, lat, dist) - either cartesian or ellipsoid"""
|
|
1493
1473
|
|
|
1494
1474
|
# Data variables
|
|
@@ -1644,7 +1624,7 @@ class PhaseCalibrationXds:
|
|
|
1644
1624
|
tuple[AntennaName, Time, ReceptorLabel, ToneLabel],
|
|
1645
1625
|
tuple[AntennaName, TimePhaseCal, ReceptorLabel, ToneLabel],
|
|
1646
1626
|
],
|
|
1647
|
-
numpy.complex64,
|
|
1627
|
+
Union[numpy.complex64, numpy.complex128],
|
|
1648
1628
|
]
|
|
1649
1629
|
"""
|
|
1650
1630
|
Phase calibration measurements. These are provided as complex values that represent both the phase
|
|
@@ -1698,12 +1678,13 @@ class WeatherXds:
|
|
|
1698
1678
|
""" Mid-point of the time interval. Labeled 'time' when interpolated to main time axis """
|
|
1699
1679
|
time_weather: Optional[Coordof[TimeWeatherCoordArray]]
|
|
1700
1680
|
""" Mid-point of the time interval. Labeled 'time_weather' when not interpolated to main time axis """
|
|
1701
|
-
|
|
1681
|
+
ellipsoid_dir_label: Optional[Coord[EllipsoidDirLabel, str]] = (
|
|
1702
1682
|
"lon",
|
|
1703
1683
|
"lat",
|
|
1704
|
-
"height",
|
|
1705
1684
|
)
|
|
1706
|
-
""" Coordinate labels of geodetic earth location data (typically shape
|
|
1685
|
+
""" Coordinate labels of geodetic earth location data (typically shape 2 and 'lon', 'lat')"""
|
|
1686
|
+
ellipsoid_dis_label: Optional[Coord[EllipsoidDisLabel, str]] = ("height",)
|
|
1687
|
+
""" Coordinate labels of geodetic earth height data (typically shape 1 and 'height')"""
|
|
1707
1688
|
cartesian_pos_label: Optional[Coord[CartesianPosLabel, str]] = ("x", "y", "z")
|
|
1708
1689
|
""" Coordinate labels of geocentric earth location data (typically shape 3 and 'x', 'y', 'z')"""
|
|
1709
1690
|
|
|
@@ -2023,13 +2004,6 @@ class SystemCalibrationXds:
|
|
|
2023
2004
|
"""
|
|
2024
2005
|
|
|
2025
2006
|
|
|
2026
|
-
@xarray_dataset_schema
|
|
2027
|
-
class PhasedArrayXds:
|
|
2028
|
-
"""Not specified. Not implemented."""
|
|
2029
|
-
|
|
2030
|
-
pass
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
2007
|
@xarray_dataset_schema
|
|
2034
2008
|
class DopplerXds:
|
|
2035
2009
|
"""Not specified. Not implemented."""
|
|
@@ -2237,8 +2211,7 @@ class PhasedArrayElementOffsetArray:
|
|
|
2237
2211
|
tuple[AntennaName, CartesianPosLabelLocal, ElementId],
|
|
2238
2212
|
float,
|
|
2239
2213
|
]
|
|
2240
|
-
|
|
2241
|
-
units: Attr[list[Literal["m"]]]
|
|
2214
|
+
units: Attr[Literal["m"]]
|
|
2242
2215
|
|
|
2243
2216
|
type: Attr[Location]
|
|
2244
2217
|
""" Measure type. Should be ``"location"``."""
|
|
@@ -2261,7 +2234,7 @@ class PhasedArrayCoordinateAxesArray:
|
|
|
2261
2234
|
|
|
2262
2235
|
data: Data[tuple[AntennaName, CartesianPosLabelLocal, CartesianPosLabel], float]
|
|
2263
2236
|
|
|
2264
|
-
units: Attr[
|
|
2237
|
+
units: Attr[UnitsDimensionless]
|
|
2265
2238
|
|
|
2266
2239
|
type: Attr[RotationMatrix]
|
|
2267
2240
|
""" Measure type. Should be ``"rotation_matrix"``."""
|